Open
Conversation
d18e64e to
23a40c6
Compare
This PR quantizes `lm_head` in GPTQ to improve accuracy. TICO-DCO-1.0-Signed-off-by: s.malakhov <s.malakhov@partner.samsung.com>
23a40c6 to
a737b08
Compare
mhs4670go
reviewed
Apr 16, 2026
| static_groups=gptq_conf.static_groups, | ||
| verbose=gptq_conf.verbose, | ||
| ) | ||
| quantizers[f"model.lm_head"] = gptq.quantizer |
Contributor
There was a problem hiding this comment.
Isn't it like this?
Suggested change
| quantizers[f"model.lm_head"] = gptq.quantizer | |
| quantizers[f"lm_head"] = gptq.quantizer |
Contributor
Author
There was a problem hiding this comment.
Ahh. NO. Just lm_head is not injected to PTQ observers. model.lm_head is injected.
Contributor
There was a problem hiding this comment.
Hmm.. turns out that the injection doesn't work well properly. I'll fix this soon. First of all, there are mismatch in wrapped fp_name.
Contributor
There was a problem hiding this comment.
Sorry for bothering you. Could you review this PR and rebase it later?
Contributor
There was a problem hiding this comment.
And, we should re-evaluate the result :(
Contributor
Author
There was a problem hiding this comment.
And, we should re-evaluate the result :(
OK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR quantizes
lm_headin GPTQ to imorove accuracy../ccex test --include-internal -k quantization.algorithm.test_gptq
Value tests:
HuggingFaceTB/SmolLM2-135M-Instruct
TinyLlama/TinyLlama-1.1B-Chat-v1.0:
unsloth/Llama-3.2-1B-Instruct:
unsloth/Llama-3.2-3B-Instruct:
Related: as a fallback to #624
TICO-DCO-1.0-Signed-off-by: s.malakhov s.malakhov@partner.samsung.com