Repository navigation
fix(cli): let a scaled SGLang engine serve past its derived window - #265
Merged
Merged
Conversation
A YaRN `context.scaling` block naming `original_max_position_embeddings` makes SGLang derive the unscaled window, so it refused the scaled group's planned `context_length` at startup, after the dry-run had passed and the GPUs were held. A scaled group's SGLang engines now launch with `SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1` (`SCALING_ENV`); `context.max` already states the reachable window. The model's `infer.env` overrides it. The env is on the launch command only: plans, identities and resume are unchanged. Closes #264 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… engine The variable lifts SGLang's derived-window check for every scaling block, not only the YaRN shape from #264, so the guide now says `max` is the only bound. A vLLM case pins that no other backend gets the variable. Comments and docs trimmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ethan-scitix
force-pushed
the
fix/264-sglang-scaled-window
branch
from
October 28, 2026 07:36
21ca7d0 to
556fded
Compare
Merged
7 tasks done
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.
Type
Summary
<model>@<window>) on SGLang failed at startup when itscontext.scalingYaRN block namedoriginal_max_position_embeddings. With that key, SGLang derives the unscaled window (40960), and_derive_context_lengthrefuses the larger planned--context-lengthunlessSGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1is set.--dry-runpassed, so the failure only showed after the GPUs were held.SCALING_ENV(sieval/cli/serving.py) and applied inrun._serving_groups, which the dry-run also uses, so the dry-run'slaunch[].envmatches what the run sets.context.maxis now the only bound on a scaled window. Ifmaxoverstates what the scaling reaches, SGLang no longer catches it at startup.docs/guide/infer.mdnow says this.infer.envtakes precedence (a user can set the variable to0). vLLM has no entry: no failure has been observed there, and a test pins this.engine_params,infer_plans*.yamland the inference identity are unchanged, so resume is unaffected. NoRESULT_SCHEMA_VERSIONbump.Related Issues
Closes #264
Test Plan
Automated
ruff check sieval tests && ruff format --check sieval tests)ty check)pytest tests/unit/cli tests/integration -n 8→ 1744 passedTestServingGroups::test_only_a_scaled_sglang_engine_may_exceed_its_derived_windowhas three cases:=1and the default engine gets nothing;infer.envoverrides it;scaled=Trueat the call site fails the first case;vllmentry toSCALING_ENVfails the third.Manual
context_length64096).Checklist
Required (all PRs)
type(scope): description)AI-Generated Code - <model> (<provider>)in module docstringcore/🤖 Generated with Claude Code