Repository navigation
[Fix] Preserve GLM-5.3 vision RoPE frequencies during meta initializa… - #2138
Merged
jayhenry merged 1 commit intoOct 8, 2026
Conversation
jayhenry
merged commit Oct 8, 2026
df2efc8
into
InternLM:feat/glm53flash-f2-vision-tower
0 of 2 checks passed
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 fixes uninitialized vision RoPE frequencies when GLM-5.3-Flash is constructed on the meta device and loaded from a checkpoint.
inv_freqis nonpersistent: the loader materializes the meta buffer withto_emptybut cannot restore its values from the checkpoint. Image patch embeddings agree with HF, while the first ViT block already diverges.Create the FP32 frequency tensor explicitly on CPU, following the existing text rotary initialization approach. Add a meta-construction regression and a frequency assertion to the real-checkpoint loading test. No checkpoint keys or language-model behavior change.
Stack placement: targets
feat/glm53flash-f2-vision-tower(#2110), so the fix can propagate into #2111. The diff contains only the vision initialization fix and its regression tests.Validation: