Repository navigation
Conversation
…nd Ling cookbooks SGLang pins transformers v5, where rope_scaling is only an alias of rope_parameters: assigning it replaces the whole dict, and huggingface/transformers#49515 deprecates the setter (FutureWarning now, ValueError when rope_theta is missing). The Qwen3-Next 1M recipe set rope_scaling without rope_theta, so it would start raising on the next transformers release; the Ling recipes carried the full dict under the deprecated key. Pass the complete rope_parameters dict instead: Qwen3-Next gets its rope_theta (10000000) and partial_rotary_factor (0.25) from the model config, the Ling recipes keep their values and only switch the key.
jinwukong
requested review from
JustinTong0323,
sogalin,
wisclmy0611 and
zijiexia
as code owners
October 14, 2026 01:25
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.
Motivation
SGLang pins transformers v5, where
rope_scalingis only an alias property ofrope_parameters: assigning it replaces the whole dict, and huggingface/transformers#49515 deprecates the setter (aFutureWarningnow, aValueErrorwhenrope_thetais missing). Two cookbook recipes still override through the old key:{"rope_scaling": {"rope_type": "yarn", ...}}withoutrope_theta, so it would start raising on the next transformers release.rope_theta,partial_rotary_factor) but under the deprecated key.This is the cookbook follow-up discussed on huggingface/transformers#49515; the engine side (
--json-model-override-argsmerging the base parameters) is #43067.Modifications
docs/cookbook/autoregressive/Qwen/Qwen3-Next.mdx: both 1M commands pass the completerope_parametersdict;rope_theta: 10000000andpartial_rotary_factor: 0.25come from the model'sconfig.json.docs/cookbook/autoregressive/InclusionAI/Ling-2.6.mdx,Ling-3.0-flash-VL.mdx: prose updated to the new key.docs/src/snippets/autoregressive/ling-26-flash-deployment.jsx,docs/src/snippets/configs/inclusionAI/ling-3.0-flash-vl.jsx: the generated commands switchrope_scaling→rope_parameters, values unchanged.Verification
Loaded the Qwen3-Next config through
sglang.srt.utils.hf_transformers.config.get_configwith the new override (transformers 5.19.0, CPU):rope_parametersafter loadingrope_thetaattributeNonerope_scaling{rope_type: yarn, factor: 4.0, original_max_position_embeddings: 262144}rope_parameters{rope_type: yarn, factor: 4.0, original_max_position_embeddings: 262144, rope_theta: 10000000, partial_rotary_factor: 0.25}get_rope's YaRN branch reads its keys with.get, and SGLang's native v5 configs already pass fullrope_parametersdicts (withrope_thetaandpartial_rotary_factorinside) through the same path, so the extra keys change nothing for the rotary embedding. Norope_scalingreference is left underdocs/.Checklist
CI States
Latest PR Test (Base): ✅ Run #38495646011
Latest PR Test (Extra): ❌ Run #38495646029
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.