Skip to content

fix(dspark): checkpoint config carries BOTH rope schemas - #7

Open
Boreas618 wants to merge 1 commit into
mainfrom
fix/dual-rope-schema-save
Open

fix(dspark): checkpoint config carries BOTH rope schemas#7
Boreas618 wants to merge 1 commit into
mainfrom
fix/dual-rope-schema-save

Conversation

@Boreas618

@Boreas618 Boreas618 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Item 11. transformers 5.x save_pretrained writes only rope_parameters and drops legacy rope_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 in specforge/export/to_hf.py as ensure_dual_rope_schema(), called after save_pretrained in both the HF and SGLang exporters. Default (non-scaled) configs untouched.

🤖 Generated with Claude Code

@Boreas618
Boreas618 force-pushed the fix/dual-rope-schema-save branch from 4cfc950 to 414574b Compare August 1, 2026 17:34
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
Boreas618 force-pushed the fix/dual-rope-schema-save branch from 414574b to bddd4ff Compare August 1, 2026 20:00
@Boreas618
Boreas618 changed the base branch from inkling-dspark-v2 to main August 1, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant