Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: Fix #286 #317

Closed
wants to merge 5 commits into from
Closed

[WIP]: Fix #286 #317

wants to merge 5 commits into from

Conversation

goerch
Copy link
Contributor

@goerch goerch commented Jun 28, 2023

Based on the fix for #292 here a try to fix #286 (with the caveat: tested only on CPU). The patch adds the llama.cpp tests for quantization.

One question I'm pondering is if we should get rid of the *_reference functions or add some more?

@ggerganov
Copy link
Owner

Thanks! Let's rebase on latest master so that the diff takes into account the new macros from #292

Btw, there has been recently an update to ggerganov/llama.cpp#1237
Should synchronize with @sw

One question I'm pondering is if we should get rid of the *_reference functions or add some more?

We need them to have a deterministic way of generating models.
Add more in what sense?

@goerch
Copy link
Contributor Author

goerch commented Jul 2, 2023

Thanks! Let's rebase on latest master so that the diff takes into account the new macros from #292

Should be done.

Btw, there has been recently an update to ggerganov/llama.cpp#1237 Should synchronize with @sw

Will look into this.

One question I'm pondering is if we should get rid of the *_reference functions or add some more?

We need them to have a deterministic way of generating models. Add more in what sense?

We have something like

        .quantize_row_q           = quantize_row_q4_0,
        .quantize_row_q_reference = quantize_row_q4_0_reference,

but the original patch included

        .quantize_row_q           = ggml_fp32_to_fp16_row,
        .quantize_row_q_reference = ggml_fp32_to_fp16_row,

We could define ggml_fp32_to_fp16_row_reference, too. But I also imagine that dropping '.quantize_row_q_reference' member from the struct could work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ggml : generalize quantize_fns for simpler FP16 handling
2 participants