fix(dspark): checkpoint config carries BOTH rope schemas - #7
Open
Boreas618 wants to merge 1 commit into
Open
Conversation
Boreas618
force-pushed
the
inkling-dspark-v2
branch
from
August 1, 2026 17:33
1631bbe to
81dd85d
Compare
Boreas618
force-pushed
the
fix/dual-rope-schema-save
branch
from
August 1, 2026 17:34
4cfc950 to
414574b
Compare
transformers 5.x save_pretrained keeps only the new rope_parameters schema and drops legacy rope_scaling. Serving stacks and older transformers that read only the legacy key then silently lose YaRN on long-context drafts — the draft falls back to unscaled RoPE at serve time and accept length collapses beyond the original context. Mirror whichever schema survives into the other after export; default (non-scaled) RoPE configs are left untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Boreas618
force-pushed
the
fix/dual-rope-schema-save
branch
from
August 1, 2026 20:00
414574b to
bddd4ff
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.
Item 11. transformers 5.x
save_pretrainedwrites onlyrope_parametersand drops legacyrope_scaling. Serving stacks and older transformers reading only the legacy key silently lose YaRN — the draft falls back to unscaled RoPE at serve time and accept length collapses past the original context.Rebuilt against
main's architecture: the mirror now lives inspecforge/export/to_hf.pyasensure_dual_rope_schema(), called aftersave_pretrainedin both the HF and SGLang exporters. Default (non-scaled) configs untouched.🤖 Generated with Claude Code