Repository navigation
Conversation
`model_kwargs.prefill_token_buckets` reached only Qwen3.5, the Qwen3-Omni Thinker and GLM-5.2, which plumbed it into `ARNodeSubmodule.__init__`; the eight other models with a packed capture (Orpheus, Whisper, Qwen3-ASR, Qwen3-TTS, Chatterbox, Fish S2, Higgs, Pi0.5) dropped it in `**kwargs`. The key moves to the top level of the serving config, beside `max_batch_tokens`, as node -> capture walk -> ladder. The node's `AcceleratorGraphRunner` applies it to the packed configs the submodule declares (`apply_token_ladders`): a walk with no packed capture, or a malformed ladder, is refused, and rungs past the first that holds the budget the capture's steps are scheduled under (`step_budget`, the combined walk's for a walk inside one) are dropped. No model plumbs it. Deletes `ARNodeSubmodule.__init__`, the Qwen3.5 / Qwen3-Omni constructor arguments, Qwen3.5's per-instance mixed ladder, and GLM-5.2's `Glm52ModelConfig.prefill_token_buckets`. The three Qwen3.5-9B configs name `prefill_text` and `mixed` at the powers of two to 2048: 2176 is past the first rung that holds the LLM's 2048-token budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes on the engine-owned prefill ladder:
- `model_kwargs.prefill_token_buckets` is refused at load with a pointer to
the top-level `prefill_token_buckets: {node: {capture walk: [...]}}`:
every model takes `**kwargs`, so the old place would otherwise be dropped
silently again (the repo refuses a moved key the same way for the
top-level KV-cache keys). A top-level list or scalar gets a ValueError
naming the shape, not "names nodes [...]" or a TypeError.
- docs/serving.rst says what fails at load and what at warmup.
- The trim test now uses Qwen3.5's `prefill_text` capture, which replays
only the walk inside `mixed`, so it fails if the step budget stops
following the combined walk. Orpheus's capture replays `mixed` itself and
could not tell. Dropped a duplicate refusal case and a test that only
checked class constants.
GLM-5.2's reduced variant, whose `[64]` ladder the previous commit removed,
now captures prefill at [32, 64] under its 64-token context limit: one more
capture, for a test-scale variant. The one GPU test that captures it sets
its own ladder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-node settings (max_batch_tokens, can_override_mixed_max_tokens,
prefill_token_buckets) read only the serving config, so EngineManager.build
checks them before get_submodule loads a checkpoint: a GLM-5.2 TP8 config
with the old model_kwargs key no longer loads every worker's weights first.
A node whose ladders aren't a mapping ({LLM: []}) is refused like a
top-level list, rather than read as no ladder. The test goes through
EngineManager.build with a model that must not be read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Pending GPU testing.
Follow-up to #970: Gaurav found that
model_kwargs.prefill_token_bucketsonly reached Qwen3.5, the Qwen3-Omni Thinker and GLM-5.2. Every other AR model that readsPREFILL_TOKEN_BUCKETS(Orpheus, Whisper, Qwen3-ASR, Qwen3-TTS, Chatterbox, Fish S2, Higgs, Pi0.5) dropped it in**kwargswithout an error.What this does
prefill_token_bucketsis now a top-level serving-config key, per node and capture walk, shaped likemax_batch_tokens:model_kwargs.prefill_token_bucketsis refused at load with a pointer to the new key, before any weights load. So is a ladder in the wrong shape.2176rung goes, since the 2048-token budget already caps the mixed step it was there for. Default ladders don't change when the key is absent. The exception is GLM-5.2's test-scalereduced()variant, which now captures[32, 64]instead of[64].How it works
EngineManagerreads the key besidemax_batch_tokensand checks it before any submodule loads. It's stored on each node'sSubmoduleManagement.AcceleratorGraphRunnercallsapply_token_ladders(accelerator_graph_config.py). That rewritescapture_token_lengthson the packed configs captured on each named walk, then trims each ladder to the walk's step budget.ChunkingManagement.step_budget. A walk scheduled inside a combined walk (Qwen3.5'sprefill_textundermixed) takes the combined walk's budget.ARNodeSubmodule.__init__'s ladder argument, Qwen3.5's, Qwen3-Omni's and GLM-5.2'sprefill_token_bucketsarguments, and their tests.ruff check .9c6f1ad75test_step_threads::test_the_worker_takes_its_row_and_logs_it, which plans CPUs from the host's state; it passes alone and this PR touches no CPU-pinning codetest_chunked_prefill)model_kwargskey, a top-level list and a non-mapping node value are refused byEngineManager.buildbefore any weights loadFollow-up: OmniVoice's
model_kwargs.backbone_token_bucketsis the same kind of per-model knob, on a piecewise capture.🤖 Generated with Claude Code