[quantization] fix QuantGemma4ClippableLinear module - #855
Open
Torrero wants to merge 1 commit into
Open
Conversation
Torrero
force-pushed
the
fix_QuantGemma4ClippableLinear
branch
from
August 4, 2026 20:22
c2cb6bf to
b638c9a
Compare
This commit corrects the `fp_name` of inner linear wrapper of QuantGemma4ClippableLinear and introduces _clippable_linear_tree_override in gemma4_builders.py TICO-DCO-1.0-Signed-off-by: Evgenii Maltsev <e.maltsev@samsung.com>
Torrero
force-pushed
the
fix_QuantGemma4ClippableLinear
branch
from
August 4, 2026 21:03
b638c9a to
648f3e7
Compare
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 corrects
fp_namefor QuantGemma4ClippableLinear module and introduces_clippable_linear_tree_overrideingemma4_builders.py.Why
fp_namepassed to the innerPTQWrapperwas wrong — it passed the parent's name (e.g.,"layers.0.self_attn.q_proj") instead of the child's qualified name (e.g.,"layers.0.self_attn.q_proj.linear")._clippable_linear_tree_overrideresolves the problem when vision modules useGemma4ClippableLinear(which wraps an innernn.Linearas.linear), andQuantGemma4ClippableLinearscopes the child config viaqcfg.child("linear"). As Example, the builder was placing weight overrides atgate_proj.weightinstead ofgate_proj.linear.weight, soqcfg.child("linear")found nothing.test_builders.pyhas been corrected accordingly.TICO-DCO-1.0-Signed-off-by: Evgenii Maltsev e.maltsev@samsung.com