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

Slight quantization improvement for Q4_K and Q5_K #5361

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

ikawrakow
Copy link
Contributor

Nothing earth-shattering, but I noticed that I have not brought over all changes I made to Q4_K and Q5_K quantization in my repo, so here it is. We get small PPL improvements. E.g., for Mistral-7B with context of 512 and imatrix from wiki.traiin.raw (QError is defined as PPL(Q)/PPL(fp16)-1, where PPL(fp16) = 5.6924 for Mistral-7B):

Quantization PPL Master PPL PR QError(PR)/QError(Master)
Q4_K_S 5.7428 5.7375 0.895
Q5_K_S 5.7107 5.7052 0.699

@BarfingLemurs
Copy link
Contributor

@ikawrakow could you add some PR links to recent quantization changes in the readme?

here are some added a good while back: https://github.com/ggerganov/llama.cpp#quantization

@ikawrakow
Copy link
Contributor Author

@ikawrakow could you add some PR links to recent quantization changes in the readme?

here are some added a good while back: https://github.com/ggerganov/llama.cpp#quantization

See #5366

@ikawrakow ikawrakow merged commit f57fadc into master Feb 6, 2024
56 checks passed
@ikawrakow ikawrakow deleted the ik/q4k_tuning branch February 6, 2024 15:28
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Mar 13, 2024
* Q4_K: slightly better quantization

* Q5_K: slightly better quantization

---------

Co-authored-by: Iwan Kawrakow <[email protected]>
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
* Q4_K: slightly better quantization

* Q5_K: slightly better quantization

---------

Co-authored-by: Iwan Kawrakow <[email protected]>
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.

4 participants