fix(glm5-next): remap quantized lm head parameters - #2231
Open
raullenchai wants to merge 1 commit into
Open
raullenchai wants to merge 1 commit into
raullenchai wants to merge 1 commit into
Conversation
|
Please sign every commit, then update the PR. You can review the commits on the commits tab and follow GitHub's commit-signing guide if needed. |
This was referenced Sep 13, 2026
raullenchai
force-pushed
the
fix/glm5-next-quantized-lm-head
branch
from
September 13, 2026 16:57
0f5c1db to
2720675
Compare
Contributor
Author
|
The sole commit has been re-signed and force-updated as |
Lazarus-931
requested changes
Sep 14, 2026
| @@ -0,0 +1,46 @@ | |||
| from types import SimpleNamespace | |||
Collaborator
There was a problem hiding this comment.
can we squeeze this into another test file?
This branch has not been deployed
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.
Summary
GLM-5-Next checkpoints with a quantized output head carry
lm_head.weight,lm_head.scales, andlm_head.biases. The multimodal sanitizer previously remapped only the weight, leaving scales and biases at the checkpoint root; strict model loading then failed withReceived 2 parameters not in model: lm_head.biases, lm_head.scales.This remaps the complete
lm_head.*parameter family underlanguage_model.*, while preserving already-remapped keys on repeated sanitizer passes.Verification
pytest mlx_vlm/tests/test_glm5_next_sanitize.py -q— 2 passedruff checkandruff format --checkon changed filesVontra/GLM-5.3-Flash-MLX-4bit-MTP(184 GB target) now completes strict loading; before this patch it failed on the two orphaned quantization tensors.