Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
436 commits
Select commit Hold shift + click to select a range
365099d
BAGEL parallel CFG: the guided window is its own walk, decided at int…
dghosef Oct 28, 2026
d065cc5
Merge #859 (review rounds, Higgs H2D, #858 warmup and h2d fixes) into…
dghosef Oct 28, 2026
3e9348c
BAGEL: stage host index lists straight into pinned memory; tests name…
dghosef Oct 28, 2026
ace9c87
BAGEL test: the conductor walk accumulates persist signals and drops …
dghosef Oct 28, 2026
fa24edd
BAGEL: name a window's CFG walk from CFG_WALKS; IMAGE_GEN_LOOP is tes…
dghosef Oct 28, 2026
d7e6e68
BAGEL CFG-parallel: publish only the KV labels the request's CFG walk…
dghosef Oct 28, 2026
93850f1
graph runtime (Rust): drop a finishing loop's loop-back edges to othe…
dghosef Oct 28, 2026
9b717e3
Parallel mesh axes are one ordered list, not per-axis copies
dghosef Oct 28, 2026
d55935f
code predictor: no per-position recompile of cp_attend (GPU recompile…
dghosef Oct 28, 2026
76ba991
run_layers: one compiled frame per layer besides attention
dghosef Oct 28, 2026
1438ea1
Qwen3.5: _attend runs eager, so no frame guards on the layer index
dghosef Oct 28, 2026
99f3ca3
cp_attend docstring: the cuBLAS claim holds up to -O1
dghosef Oct 28, 2026
114407b
Tests: the per-layer frame bound compares the two-layer difference wh…
dghosef Oct 28, 2026
9f26410
Tests: run_layers' compile tests live with the Qwen3 LM, on one count…
dghosef Oct 28, 2026
dfdfe56
run_layers: an empty layer stack is the final norm again (D3)
dghosef Oct 28, 2026
a9bf021
code predictor: cp_attend's projections compile again (D1)
dghosef Oct 28, 2026
5058e89
Merge origin/main 94b038c26 into perf/split-1-shared
dghosef Oct 28, 2026
38c186d
M1: copy an already-pinned host tensor to the device in place
dghosef Oct 28, 2026
1c0569b
M2: size video decode threads from usable_cpus, apart from the torch …
dghosef Oct 28, 2026
8b4a2eb
M3: test GLM-5.2's stop id at prefill
dghosef Oct 28, 2026
da5514d
Tests: the projection-compile test counts through dynamo_counts (E2)
dghosef Oct 28, 2026
591bad1
M4: declare a prefill-sampled first token on TokenStop
dghosef Oct 28, 2026
c84d883
M1: model the mocked host tensor in the pin test as pageable
dghosef Oct 28, 2026
b8a3075
N1: copy a pinned source in place only when it is contiguous
dghosef Oct 28, 2026
f22ef3f
N2: read usable_cpus once per process for video decode threads
dghosef Oct 28, 2026
8fe61cd
N3: say a generated_key counter must count the prefill token itself
dghosef Oct 28, 2026
731bd27
N4: the engine drops the closing token of a reply that ended at prefill
dghosef Oct 28, 2026
5ba5f1e
A lockstep instance is one comm group, and every agreement runs on it
dghosef Oct 28, 2026
69db344
Placement refuses a parallel group whose ranks are out of order
dghosef Oct 28, 2026
0f6dd86
cfg_size: classifier-free-guidance branches get a mesh axis of their own
dghosef Oct 28, 2026
a1a25dd
Wan2.2 splits its guidance branches on cfg_size; splits_heads goes
dghosef Oct 28, 2026
58bad2e
N4: say prefill_walks needs the loop to emit the token as buffer
dghosef Oct 28, 2026
16d6245
Qwen3.5 / run_layers: capture works again (fail_on_recompile)
dghosef Oct 28, 2026
d46cf99
Code predictor: a DepthKV binding serves one pass over the layers
dghosef Oct 28, 2026
f2517bf
Code predictor: the first layer consumes a DepthKV binding
dghosef Oct 28, 2026
f19809b
Merge #858 (origin/main 94b038c26 and its review fixes) into #859
dghosef Oct 28, 2026
bf0a36b
Merge #859 (capture fix, review rounds, #858 with origin/main 94b038c…
dghosef Oct 28, 2026
f5191ce
Rust loop exit: test the sibling-graph path and the routed edge directly
dghosef Oct 28, 2026
5dcbd78
Merge #931 (Rust graph runtime loop-exit fix) into #860
dghosef Oct 28, 2026
204bbcb
Merge #860 (perf/split-3-generation 5dcbd78e5) into perf/cfg-axis-core
dghosef Oct 29, 2026
b58ca20
Read-check vote test: a CFG axis case, which a per-axis vote misses
dghosef Oct 29, 2026
d7ea416
Merge remote-tracking branch 'origin/main' into maint/858
dghosef Oct 29, 2026
0269eec
LingBot-World: call the ragged resource through resource.run, as the …
dghosef Oct 29, 2026
01d9f69
test_subgroup_creation_order: the stub worker graph carries replica_r…
dghosef Oct 29, 2026
71d722c
test_withheld_outputs: the fake check_stop_batched drops step_walk, a…
dghosef Oct 29, 2026
4636844
Merge perf/split-1-shared (with origin/main) into perf/split-2-speech…
dghosef Oct 29, 2026
c58d32f
test_row_output_store: a withheld output stays out of the row store
dghosef Oct 29, 2026
fd7211d
Merge origin/main into perf/split-1-shared
dghosef Oct 29, 2026
7e3791e
Merge perf/split-1-shared into perf/split-2-speech-language
dghosef Oct 29, 2026
ef2216f
Merge perf/split-2-speech-language (#859, with main 8a2095f81) into p…
dghosef Oct 29, 2026
1f8204f
Merge perf/split-3-generation (#860, with main 8a2095f81) into perf/c…
dghosef Oct 29, 2026
c3ba19f
Tests: main's new KV-admission and recurrent-snapshot fakes build rea…
dghosef Oct 29, 2026
6ac8045
Docs: the Cosmos3 two-GPU numbers name their hardware and predate mai…
dghosef Oct 29, 2026
ca73beb
Merge perf/split-3-generation (docs note) into perf/cfg-axis-core
dghosef Oct 29, 2026
97dc8b7
TokenStop: leave the token budget to the loop cap
dghosef Oct 29, 2026
21a8d03
TokenStop: withhold a prefill-ended reply's closing token
dghosef Oct 29, 2026
68cd243
Warmup docs: the solo run happens only when replicas are uneven
dghosef Oct 29, 2026
bc84a25
video_decode_threads: the cap of 8 is per decode
dghosef Oct 29, 2026
d913754
Ragged attention: name each manager uniquely in the op registry
dghosef Oct 29, 2026
844266e
Warmup: a replica count that fails leaves warmup at one copy
dghosef Oct 29, 2026
92ff0c9
one_row_per_step docs: what declare_step receives
dghosef Oct 29, 2026
1d6f481
Docs: MSTAR_PY_SWITCH_INTERVAL_SEC gets its worker-scheduling row
dghosef Oct 29, 2026
6f74e95
Comments: the decode budget is the loop cap, not check_stop
dghosef Oct 29, 2026
f3de748
Docs: a prefill_walks token counts toward the budget, so the loop cap…
dghosef Oct 29, 2026
8266de2
Merge perf/split-1-shared (#858, fd7211dcd..f3de7486c) into perf/spli…
dghosef Oct 30, 2026
ebe1478
Merge perf/split-2-speech-language (#859, with #858's fd7211dcd..f3de…
dghosef Oct 30, 2026
485ec25
Merge perf/split-3-generation (#860, with #858's fd7211dcd..f3de7486c…
dghosef Oct 30, 2026
5286136
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
6e67694
Docs: say which MSTAR_PY_SWITCH_INTERVAL_SEC values the worker ignores
dghosef Oct 30, 2026
bcd00f6
Docs: point api_switch_interval_s to the workers' switch-interval var…
dghosef Oct 30, 2026
ad5f644
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
f4df456
Merge perf/split-1-shared (#858, with origin/main fadeb2759) into per…
dghosef Oct 30, 2026
ed31270
Ragged attention: update a test docstring for unique op keys
dghosef Oct 30, 2026
11a5d33
PiecewisePackedConfig: attn_key is resolved when the region declares,…
dghosef Oct 30, 2026
219098f
Engine: a forward gets a lease_before_step region's runner only on a …
dghosef Oct 30, 2026
6634770
Device loop-back is its own declaration, DeviceLoopback, not a TokenS…
dghosef Oct 30, 2026
a643d39
Stop check: the step closing a reply that ended at prefill withholds …
dghosef Oct 30, 2026
bb96fe8
Chatterbox T3, Higgs Audio, Qwen3-ASR: a stop token sampled at prefil…
dghosef Oct 30, 2026
f659715
Qwen3.5: a captured decode step stages no rotary tables, whatever its…
dghosef Oct 30, 2026
c7fc739
mstar::fused_add_rms_norm: the CUDA kernel takes FlashInfer's fused p…
dghosef Oct 30, 2026
56eca1e
One cuDNN benchmark scope, beside the engine's precision scope
dghosef Oct 30, 2026
7cd33ba
Qwen3-Omni: the audio encoder is the AuT node Qwen3-ASR runs, packed …
dghosef Oct 30, 2026
17fa86f
Ragged attention: a one-row-per-step region's ceiling is max_segments…
dghosef Oct 30, 2026
6f082fe
Qwen3.5: the vision node boots on the image processor alone
dghosef Oct 30, 2026
dae9a7a
Tests: the refused video processor is read into a name (ruff B018)
dghosef Oct 30, 2026
422d385
Qwen3.5 vision: the compile regions warm at start-up; the docs say wh…
dghosef Oct 30, 2026
e260779
Tests: Qwen3-Omni's audio encoder loads no transformers config to check
dghosef Oct 30, 2026
32c0f21
Kokoro: say that cuDNN benchmarking covers both captured halves
dghosef Oct 30, 2026
9aa2036
Kokoro: put the fused BiLSTM in the module tree
dghosef Oct 30, 2026
ef563bf
Split speech configs: run their two workers under MPS
dghosef Oct 30, 2026
fb3440e
One residual code predictor for Qwen3-Omni and Qwen3-TTS
dghosef Oct 30, 2026
1934aec
Qwen3-TTS test: name the row-output test after what it checks
dghosef Oct 30, 2026
ee582fe
Docs: describe the Qwen3-Omni 2-GPU PD config and OmniVoice's token b…
dghosef Oct 30, 2026
b8f4ecf
OmniVoice: check the packed runner at boot, drop the unused plan dtype
dghosef Oct 30, 2026
cad69d3
OmniVoice test: compare the silence trim with pydub at full scale
dghosef Oct 30, 2026
54037d8
Code predictor: check the sampled tokens with is_contiguous
dghosef Oct 30, 2026
bfb1b69
Merge perf/split-1-shared (#858) into perf/split-2-speech-language
dghosef Oct 30, 2026
0dc1f40
Docs: serving keys for the speech split configs and the switch interval
dghosef Oct 30, 2026
19150a2
Docs: Qwen3-Omni's audio encoder is the AuT node
dghosef Oct 30, 2026
da5ef36
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
1cf20c7
Qwen3-TTS, Omnilingual, ragged attention: comments name the new owners
dghosef Oct 30, 2026
509189b
Comments and docs: a shard_over_sp=False ragged resource splits its h…
dghosef Oct 30, 2026
70f8eb6
Merge perf/split-1-shared (#858, with origin/main b433a24a5) into per…
dghosef Oct 30, 2026
5514453
Head sharding: one per-resource switch, shard_over_sp; NodeSubmodule.…
dghosef Oct 30, 2026
d28d18d
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
d27bc7b
AuT encoder: pack a step only up to the largest captured token count
dghosef Oct 30, 2026
a908f31
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
7444428
AuT encoder: count tokens by the checkpoint's own chunk, for both models
dghosef Oct 30, 2026
3fa13b4
Ragged attention: refuse a per-request ceiling on a resource sized pe…
dghosef Oct 30, 2026
9086836
Test: the engine hands a forward only the regions its step leased
dghosef Oct 30, 2026
14823f4
Cosmos3: take cudnn_benchmark from fp32_precision, drop the wan_vae r…
dghosef Oct 30, 2026
66d9334
Qwen3-Omni: drop audio_seqlens, which the audio encoder no longer reads
dghosef Oct 30, 2026
61eb015
AuT encoder node: move it beside the encoder, one loader and spec for…
dghosef Oct 30, 2026
39f4de3
Docs: a Qwen3-Omni audio step over 4096 tokens runs its clips one by one
dghosef Oct 30, 2026
50401ad
Name the TP x SP head-sharding test for the kinds it covers; reflow a…
dghosef Oct 30, 2026
8c77576
AuT encoder: say a step holds up to 4096 tokens; import its loader at…
dghosef Oct 30, 2026
2fe99aa
Merge perf/split-1-shared (#858, with origin/main 18b0859b2) into per…
dghosef Oct 30, 2026
965c8eb
Merge perf/split-2-speech-language (#859, with #858 and origin/main 1…
dghosef Oct 30, 2026
070437f
Wan 2.2: keep the dit's heads whole over SP with shard_over_sp=False
dghosef Oct 30, 2026
78c53ac
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
60d4a68
BAGEL: run a guided window as its own walk on one node too
dghosef Oct 30, 2026
02c4517
Say the api_switch_interval_s numbers predate #849's output-path rewrite
dghosef Oct 30, 2026
82d9fb5
Drop the head-sharding paragraph from the submodule attributes section
dghosef Oct 30, 2026
ac2cd28
Drop the TP x SP head-sharding test that main's sizing already passes
dghosef Oct 30, 2026
25cb21e
BAGEL: hold guidance KV only for the branches a request's window runs
dghosef Oct 30, 2026
bb15c48
Drop the shard_over_sp sizing test, which main's sizing already passes
dghosef Oct 30, 2026
60b297b
BAGEL: comments state the contract instead of the code they replaced
dghosef Oct 30, 2026
8b7f8bf
BAGEL docs: give the measured output shift of guided text-to-image
dghosef Oct 30, 2026
cd0bd5b
test_kv_admission: name the CFG walk BAGEL defines
dghosef Oct 30, 2026
0791582
Merge perf/split-1-shared (#858, with origin/main f83fcaeb3) into per…
dghosef Oct 30, 2026
0ff325d
Cosmos3 and LingBot decode through wan_vae.FastDecoder and decode_dtype
dghosef Oct 30, 2026
beef216
Wan 2.2: drop the FFN GELU epilogue, which has no measurement of its own
dghosef Oct 30, 2026
da89d47
Qwen3 text encoder: refuse a row without text_len instead of never re…
dghosef Oct 30, 2026
0b9c597
Image output knobs: an explicit null is the default, and only integer…
dghosef Oct 30, 2026
6d3d9df
V-JEPA2: say the B=1 guard routes eager steps only, and drop "as befo…
dghosef Oct 30, 2026
a699496
wan_vae.decode_dtype: say that an override of 0 forces bf16
dghosef Oct 30, 2026
0cc8902
Merge origin/main into perf/split-1-shared
dghosef Oct 30, 2026
c6d9efd
Higgs Audio: declare text_output so inline decode tokens skip the per…
dghosef Oct 30, 2026
d1bb3d5
Qwen3.5: say the API_SWITCH_INTERVAL_S gain predates #849
dghosef Oct 30, 2026
bbe03b6
Conductor: build its instance table from WorkerGraph.replica_ranks
dghosef Oct 30, 2026
4e25b96
Image output knobs: serve the whole numbers main served
dghosef Oct 30, 2026
db74664
BAGEL: build only the window walks a deployment can run
dghosef Oct 30, 2026
e436e80
BAGEL: say why a split LLM still publishes both branch labels
dghosef Oct 30, 2026
359e9e8
BAGEL and Cosmos3: drop loop-counter leftovers from comments and names
dghosef Oct 30, 2026
a18e325
Merge perf/split-2-speech-language (#859, with #858 and origin/main f…
dghosef Oct 30, 2026
6e5ba4d
Merge perf/split-1-shared (#858, with origin/main 3e57b37b6) into per…
dghosef Oct 30, 2026
3d83149
Image output: check only the chosen format's compression knob
dghosef Oct 30, 2026
3dd63ee
BAGEL: say LLM-disaggregated, not split, in the branch-label comment
dghosef Oct 30, 2026
62efad1
TP read-failure test: derive the loop-back hooks from device_loopback…
dghosef Oct 30, 2026
a91f25b
TP read-failure test: drop the stale "emit" from the stand-in's comment
dghosef Oct 30, 2026
1a60e50
Merge perf/split-2-speech-language (#859, with #858 and origin/main 3…
dghosef Oct 30, 2026
810a264
Merge perf/split-3-generation (#860, with #859, #858 and origin/main …
dghosef Oct 30, 2026
d8335fd
CFG docs and KV refusal: KV-holding guidance branches are nodes in a …
dghosef Oct 30, 2026
53be2e1
Refuse a paged KV cache on a cfg_size > 1 node at placement
dghosef Oct 30, 2026
fef917a
Refuse a shard_dim signal on an instance wider than its TP group
dghosef Oct 30, 2026
3044814
CommGroup.barrier refuses a group without a cpu_group
dghosef Oct 30, 2026
454830b
A node given two comm groups on one axis is a config error: ValueError
dghosef Oct 30, 2026
8ca17e6
Point a parallel axis refused on a CFG node at cfg_size
dghosef Oct 30, 2026
ed65359
AGENTS.md: leave init_dist's group-naming detail to its own comment
dghosef Oct 30, 2026
b12cc2f
Say what the paged-KV CFG refusal requires: a node group with cfg_size 1
dghosef Oct 30, 2026
3d237b1
Give the cfg_size hint only on a refused sp_size
dghosef Oct 30, 2026
6dc8493
Scope the instance-group first-wins comment to multi-rank instances
dghosef Oct 30, 2026
b8dc824
Say which worker graphs register no instance groups
dghosef Oct 30, 2026
0e495ae
Merge origin/main (bb0e0a8d7: #962, #941, #944) into perf/split-1-shared
dghosef Oct 30, 2026
1b44fda
Merge perf/split-1-shared (#858, with origin/main bb0e0a8d7) into per…
dghosef Oct 30, 2026
3a1ff3b
Merge perf/split-2-speech-language (#859, with #858 and origin/main b…
dghosef Oct 30, 2026
1ffb5c0
Merge perf/split-3-generation (#860, with #859, #858 and origin/main …
dghosef Oct 30, 2026
7ee5eb4
Merge origin/main (c96e02b7d: #968, #856, #778, #876) into perf/split…
dghosef Oct 30, 2026
45226de
Merge perf/split-1-shared (#858, with origin/main c96e02b7d) into per…
dghosef Oct 30, 2026
bde1253
Merge perf/split-2-speech-language (#859, with #858 and origin/main c…
dghosef Oct 30, 2026
ebefbc8
Merge perf/split-3-generation (#860, with #859, #858 and origin/main …
dghosef Oct 30, 2026
15f8249
Merge origin/main (9f84f18cd: #965) into perf/split-1-shared
dghosef Oct 31, 2026
bd9aa67
Merge perf/split-1-shared (#858, with origin/main 9f84f18cd) into per…
dghosef Oct 31, 2026
d4bd60c
Merge perf/split-2-speech-language (#859, with #858 and origin/main 9…
dghosef Oct 31, 2026
dc0c208
Merge perf/split-3-generation (#860, with #859, #858 and origin/main …
dghosef Oct 31, 2026
956a85b
Pass the process group to AllReduce.all_reduce instead of holding the…
dghosef Oct 31, 2026
099f4ea
OmniVoice: key the backbone's step outputs by the engine's row ids
dghosef Oct 31, 2026
85575a0
Merge perf/split-2-speech-language (#859, the OmniVoice request-id fi…
dghosef Oct 31, 2026
849652f
Merge perf/split-3-generation (#860, with #859's OmniVoice request-id…
dghosef Oct 31, 2026
42bb972
Merge main (c829a71cc) into perf/split-1-shared
dghosef Oct 31, 2026
a9da761
Merge perf/split-1-shared (#858, with origin/main c829a71cc) into per…
dghosef Oct 31, 2026
4e410aa
Merge perf/split-2-speech-language (#859, with origin/main c829a71cc)…
dghosef Oct 31, 2026
bff76e2
Merge main (ad0a21eca) into perf/split-1-shared
dghosef Nov 1, 2026
7de9cc6
Pin video decode threads to the CPUs the plan leaves under pinning
dghosef Nov 1, 2026
576d05f
Merge perf/split-1-shared (#858, with origin/main ad0a21eca) into per…
dghosef Nov 1, 2026
5a7b055
Merge perf/split-2-speech-language (#859, with origin/main ad0a21eca)…
dghosef Nov 1, 2026
0022bbe
Ragged attention: a wrapper skips replanning the layout it last planned
dghosef Nov 1, 2026
e1d3def
Wan2.2 docs: date the attention and CFG-parallel timings as before #963
dghosef Nov 1, 2026
bd48d76
Qwen3.5 vision: compile the block loop, so a step past the captured b…
dghosef Nov 1, 2026
bffb067
API server: drop the api_switch_interval_s knob
dghosef Nov 1, 2026
a071d24
Drop the GIL switch-interval knob's model defaults (the knob is remov…
dghosef Nov 1, 2026
641e06c
Tests: the TP2 publish test's KV managers hold one rank's head
dghosef Nov 1, 2026
a25694a
API server: drop warmup_requests' concurrency option
dghosef Nov 1, 2026
34fbf94
Merge remote-tracking branch 'origin/main' into land/858
dghosef Nov 1, 2026
3f8d4af
Qwen3.5 vision: a request too large for a replay gets an encoder step…
dghosef Nov 1, 2026
03f7758
Merge origin/main (165b403b7: #794, #950) into perf/split-1-shared
dghosef Nov 1, 2026
a4b5fca
Tests: Canary's decode cap leaves the prefill's token in the budget
dghosef Nov 1, 2026
f991121
Docs: last_prefill_flag for a prompt prefilled over several passes; G…
dghosef Nov 1, 2026
b0cbacd
Qwen3.5 vision split: review cleanups
dghosef Nov 1, 2026
a3e2053
Merge c2/859-video: Qwen3.5 vision compiles its block loop, and a req…
dghosef Nov 1, 2026
5007896
Merge #858's final head (f99112154) into #859
dghosef Nov 1, 2026
db7eccd
Merge origin/main (160b4bc6d, #858 squash) into #859
dghosef Nov 1, 2026
3b47e16
Chatterbox, Higgs Audio tests: a stop id at prefill ends the partition
dghosef Nov 1, 2026
51b9502
Orpheus test: the stop check's fake info names its walk
dghosef Nov 1, 2026
c26159f
Merge main (3e98682a8: #920 KV-aware routing) into perf/split-2-speec…
dghosef Nov 1, 2026
fd37bb9
Merge c3/859 into perf/split-3-generation
dghosef Nov 1, 2026
5d159d2
Review wording: the vision split's capture-only scope, Qwen3.5 config…
dghosef Nov 1, 2026
22b4d4f
Merge c3/859 into perf/split-3-generation
dghosef Nov 1, 2026
706f986
Wan2.2 docs: date the timings by the DiT step they measured, not a PR…
dghosef Nov 1, 2026
96a4c16
Wan2.2 docs: an earlier version of the DiT block, not an earlier DiT …
dghosef Nov 1, 2026
4e385bc
Engine: capture_cudnn_benchmark's search runs in capture sizing, held…
dghosef Nov 1, 2026
f48f70c
Fish S2 Pro: capture the decode buckets uncompiled, as on main
dghosef Nov 1, 2026
e1e4d81
Fish S2 Pro: TF32 codec decode is the model's default
dghosef Nov 1, 2026
a725282
Code predictor: open the depth loop with position 0 alone
dghosef Nov 1, 2026
fe5f304
Qwen3-TTS: drop the 24- and 48-row decode buckets
dghosef Nov 1, 2026
218c36f
run_layers: the residual stream starts from its own copy
dghosef Nov 1, 2026
1911f1c
OmniVoice silence test: pydub is the oracle, installed with dev
dghosef Nov 1, 2026
3be750e
Code predictor: each Talker keeps its own embedding-sum dtype
dghosef Nov 1, 2026
6c42b33
Merge c3/859 into perf/split-3-generation
dghosef Nov 1, 2026
41a030c
Review wording: Qwen3-TTS's embedding sum, the cuDNN search in captur…
dghosef Nov 1, 2026
0695600
Merge c3/859 into perf/split-3-generation
dghosef Nov 1, 2026
a55cfcf
Merge origin/main (41c77c98c) into perf/split-2-speech-language
dghosef Nov 1, 2026
24bf74f
TokenStop: withholding outputs and the runtime check refuse each other
dghosef Nov 1, 2026
387b08b
test_knobs: take main's version back now that ingraph_decode_rope stays
dghosef Nov 2, 2026
c6a2e09
Merge perf/split-2-speech-language (#859, 387b08b86) into perf/split-…
dghosef Nov 2, 2026
dcc5b22
Wan2.2 CFG-parallel: the scaffold keeps ragged_for, docs say a rank r…
dghosef Nov 2, 2026
746a790
BAGEL docs: quote the guided text-to-image PSNR and the configuration…
dghosef Nov 2, 2026
96e4723
wan22 extra: install flashinfer-python for the default ragged attention
dghosef Nov 2, 2026
5aaa217
Wan2.2: leave CFG-parallel to the cfg_size axis
dghosef Nov 2, 2026
66538d4
Z-Image-Turbo: capture batch sizes 1, 2, 4, 8; every size up to 8 is …
dghosef Nov 2, 2026
005d27a
V-JEPA2-AC test: a rollout request's stamped clip shape keys the enco…
dghosef Nov 2, 2026
9dddee7
Merge perf/split-3-generation into fix/860
dghosef Nov 2, 2026
1843e5e
Merge perf/split-3-generation (#860 at dcc5b2264, with #859 387b08b86…
dghosef Nov 2, 2026
fce6796
Merge perf/split-3-generation (#860 at 9dddee7a6) into perf/cfg-axis-…
dghosef Nov 2, 2026
01a50d6
Size main's new replica and lockstep checks by the whole instance
dghosef Nov 2, 2026
6df580a
Merge main (#859 squash 696065149) into #860
dghosef Nov 2, 2026
45db5c2
Merge perf/split-3-generation (#860 at 6df580a1d, with main 696065149…
dghosef Nov 2, 2026
c58e099
Merge main (#860 squash fdfa1239a) into #948
dghosef Nov 2, 2026
8020ecc
Merge main (9c6f1ad75) into #948
dghosef Nov 4, 2026
b3eaf9d
Read a chunking node's SP size from its joint group
dghosef Nov 4, 2026
5145ad8
AGENTS.md: a lockstep instance spans the CFG axis too
dghosef Nov 4, 2026
5ca1a57
Merge fix: main's LoRA validation test expects the parallel-shape mes…
dghosef Nov 4, 2026
8734621
Name CFG in lockstep-instance wording (R2.1, R2.2)
dghosef Nov 4, 2026
1bf3ac2
Merge origin/main into perf/cfg-axis-core
dghosef Nov 5, 2026
3f35ffc
Docs: fused_draw_args() is off for any lockstep-parallel node, not ju…
dghosef Nov 5, 2026
bbc8bc9
Docs: a data-parallel replica is cfg_size * sp_size * tp_size ranks
dghosef Nov 5, 2026
ac6a2e9
Merge origin/main into perf/cfg-axis-core
dghosef Nov 6, 2026
7adc2e3
Merge origin/main into perf/cfg-axis-core
dghosef Nov 8, 2026
1a72e38
Merge origin/main into perf/cfg-axis-core
dghosef Nov 8, 2026
7b8092a
services.py: the parallel_groups field names the CFG axis too
dghosef Nov 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/command_a_plus/validate_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def __init__(self, args, group):
transfer = TransferEngineInfo(f"validation_{group.rank}", "validation", LocalTransferEngine("localhost"))
self.resources = {key: build_resource(spec, EngineResourceInfo(
device=torch.device("cuda", group.rank), kv_dtype=torch.bfloat16,
joint_comm_group=JointGroups(group, CommGroup.trivial()), transfer_engine_info=transfer,
joint_comm_group=JointGroups(group, CommGroup.trivial(), group), transfer_engine_info=transfer,
needs_remote_transfer=False, dependencies={dep: specs[dep] for dep in spec.depends_on()},
)) for key, spec in specs.items()}
self.runner = StepRunner(self.resources)
Expand Down
31 changes: 31 additions & 0 deletions configs/wan22_cfg_parallel_2gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
model: "wan22"

# See wan22.yaml. CFG-parallel on two GPUs, latency-oriented: the dit runs on
# both, each rank computing one classifier-free-guidance branch over the batch's rows, and
# the two noise predictions are all-gathered every step, so a guided denoise
# step costs one branch's forward. The text encoder and both VAE passes run on
# rank 0.
# For throughput under concurrency, wan22_dp2.yaml (one full replica per GPU)
# avoids rank 1 idling through rank 0's VAE decode.
max_seq_len: 512

model_kwargs:
vae_decode_fast_sizes: ["1280x704", "832x480"]

node_groups:
- node_names:
- text_encoder
ranks:
- 0

- node_names:
- vae_encoder
- vae_decoder
ranks:
- 0

- node_names:
- dit
ranks: [0, 1]
# one classifier-free-guidance branch per rank
cfg_size: 2
39 changes: 36 additions & 3 deletions docs/adding_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,14 @@ You must implement these abstract methods:
(``request_done=True``). A simple prefill-decode model sets ``is_prefill`` to false
once, then repeats the decode walk until EOS.

``get_submodule(self, node_name, device="cpu", tp_group=None, autocast_dtype=None, sp_group=None, moe_parallel=None) -> NodeSubmodule | None``
``get_submodule(self, node_name, device="cpu", tp_group=None, autocast_dtype=None, sp_group=None, moe_parallel=None, cfg_group=None) -> NodeSubmodule | None``
Build and return the ``NodeSubmodule`` for ``node_name``, and cache the result. Load
weights here, on ``device``. Return ``None`` for dummy mode.

``tp_group`` and ``sp_group`` are the node's tensor-parallel and sequence-parallel
communicators when the node is sharded. Pass ``tp_group`` to the parallel-linear
constructors. See :ref:`Step 6 <tensor-parallelism>`.
constructors. See :ref:`Step 6 <tensor-parallelism>`. ``cfg_group`` is passed only to a
node whose group sets ``cfg_size > 1``; see `Guidance (CFG) parallelism`_.

``moe_parallel`` is the node group's ``ep_config``, parsed into a
``MoeParallelConfig``. It is passed only to an EP-enabled node whose group sets one,
Expand Down Expand Up @@ -2259,12 +2260,44 @@ Two separate mechanisms split work across the TP group. Keep them distinct:
the tensor is replicated to every rank. You need an entry only for edges where the
producer and the consumer both keep the data sharded. The common case is replicated
activations, which needs no entry. You can also set ``shard_dim`` per run, under a
``sharding_config`` block in the YAML.
``sharding_config`` block in the YAML. A sharded signal is split over the node's whole
lockstep instance, so placement refuses one on a node group with ``sp_size`` or
``cfg_size`` above 1.

If a node group has ``tp_size > 1`` and names a node that is not in ``tp_enabled_nodes``,
loading fails. See ``configs/qwen3omni_thinker_tp2.yaml`` for an example with several node
types.

.. _Guidance (CFG) parallelism:

Guidance (CFG) parallelism
~~~~~~~~~~~~~~~~~~~~~~~~~~

A diffusion node that runs its classifier-free-guidance branches as one batch can split
them over a node group's ``cfg_size`` ranks, a mesh axis of its own beside ``tp_size``
and ``sp_size`` (see :doc:`serving`). Declare the node and the most branches it runs in
``cfg_enabled_nodes``; placement refuses a ``cfg_size`` that doesn't divide that count:

.. code-block:: python

def get_default_sharding_config(self):
return ShardingConfig(
groups=[], tp_enabled_nodes=set(), shard_dim={},
cfg_enabled_nodes={"dit": 2},
)

The submodule receives ``cfg_group`` from ``get_submodule``, takes its rows of the branch
batch with ``my_rows(cfg_group, branches)``
(``mstar/model/components/distributed/sequence_parallel.py``), and after the forward
reassembles them with ``cfg_group.all_gather(out, dim=0)``. Every rank then runs the same
guidance combine and solver step on replicated latents. CFG ranks keep every attention
head; only TP and SP ranks split them. The ranks run in lockstep on the same requests, so
any per-request resource the node declares must stay the same shape on every rank, and a
node with ``cfg_size > 1`` can't hold a paged KV cache (placement refuses one before
any worker starts): branches that hold different KV are separate nodes in a graph ``Parallel``
instead, on a node group with ``cfg_size: 1``, as BAGEL's ``LLM_cfg_text`` and ``LLM_cfg_img`` are.
``Wan22DitSubmodule`` is the reference.

.. _Expert parallelism (MoE):

Expert parallelism (MoE)
Expand Down
3 changes: 2 additions & 1 deletion docs/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ Communication
Workers on CUDA set ``0`` unless you set it.
* - ``GLOO_SOCKET_IFNAME``
- ``lo``
- PyTorch's variable for the Gloo groups next to each TP/SP group.
- PyTorch's variable for the Gloo groups next to each parallel group
and for each lockstep instance.
Same rule: the conductor sets ``lo`` for its workers unless you set
it, so Gloo does not listen on the address the hostname resolves to.

Expand Down
15 changes: 12 additions & 3 deletions docs/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1543,9 +1543,18 @@ tiles only when free VRAM at decode time is short of the untiled estimate
32 GiB card. No CUDA-graph capture, no continuous batching (one request per
step) and no component offload.

**Two GPUs.** ``configs/wan22_dp2.yaml`` serves a whole replica per GPU: 5.2
videos/min at 4 concurrent on H200s (measured on an earlier version), while one
request takes the 1-GPU time.
**Two GPUs.** ``configs/wan22_cfg_parallel_2gpu.yaml`` is CFG-parallel: it runs
the dit over two ranks (``cfg_size: 2``) that split the classifier-free guidance
batch: each rank runs one branch over the batch's rows and the two noise
predictions are all-gathered
every step, so a guided step costs one branch's forward (502 vs 1000 ms at
1280x704x81 on H200s; one request 13.4 s vs 23.3 s end to end at 20 steps;
measured on that earlier version). The
text encoder and VAE run on rank 0. Without guidance both ranks compute the same
step, correct but no faster. For throughput under concurrency,
``configs/wan22_dp2.yaml`` serves a whole replica per GPU instead: 5.2 videos/min
at 4 concurrent vs 4.7 CFG-parallel (whose rank 1 idles through rank 0's VAE
decode; measured on that earlier version), while one request takes the 1-GPU time.

LTX-2.5 (``ltx2_5``)
--------------------
Expand Down
34 changes: 27 additions & 7 deletions docs/serving.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ A config maps the model's computation-graph nodes to physical GPU ranks. The key
- Maximum sequence length (sizes the KV cache).
* - ``node_groups``
- List of placements. Each entry assigns ``node_names`` to ``ranks``, optionally
scoped to specific ``graph_walks`` and/or sharded with ``tp_size``. An
``ep_config`` block picks TP or EP for the group's MoE experts.
scoped to specific ``graph_walks`` and/or parallelized with ``tp_size``,
``sp_size`` and ``cfg_size``. An ``ep_config`` block picks TP or EP for the
group's MoE experts.
* - ``resources``
- *(optional)* Per-resource overrides, keyed by the model's resource names (see
below).
Expand Down Expand Up @@ -358,7 +359,7 @@ A config maps the model's computation-graph nodes to physical GPU ranks. The key
Unset keeps PyTorch's default throughout. Raise it only where weight load,
JIT or CUDA-graph capture can exceed that default.
* - ``tp_allreduce``
- *(optional)* Small-message all-reduce path of every TP and SP group:
- *(optional)* Small-message all-reduce path of every TP, SP and CFG group:
``nccl`` (default), ``symm_oneshot``, ``symm_multimem`` or ``flashinfer``;
any other value fails at startup. ``flashinfer`` sends 2-D bf16 CUDA messages
up to ``tp_allreduce_max_kb`` through FlashInfer's one-kernel all-reduce.
Expand Down Expand Up @@ -620,10 +621,29 @@ weight loaders then shard parameters automatically, with no model-code changes.
:ref:`Tensor parallelism <tensor-parallelism>` in the model guide for the model-side
details.

Several TP (or SP) nodes can share GPUs when, on each worker, they are in the same TP and SP
groups, each listed in the model's ``tp_enabled_nodes`` (or ``sp_enabled_nodes``). The ranks
then run every node's steps in one order. The conductor refuses lockstep nodes on one worker
in different TP or SP groups, and two lockstep nodes on one worker that share a paged KV cache:
**Sequence and guidance parallelism.** ``sp_size`` splits a node's token sequence over
that many ranks (Ulysses: an all-to-all around attention), and ``cfg_size`` splits its
classifier-free-guidance branches, each rank running its share of them and the noise
predictions gathered every step. Each needs the model to declare the node SP- or
CFG-enabled, and ``cfg_size`` must divide the node's guidance branches (two for Wan2.2).
The axes compose: a group's ``ranks`` form lockstep instances of
``cfg_size * sp_size * tp_size`` ranks, laid out ``[cfg][sp][tp]`` (TP on adjacent ranks),
each instance's ranks listed in ascending order, and the conductor routes each request to
one whole instance:

.. code-block:: yaml

model: "wan22"
max_seq_len: 512
node_groups:
- {node_names: [text_encoder, vae_encoder, vae_decoder], ranks: [0]}
# one guidance branch per rank
- {node_names: [dit], ranks: [0, 1], cfg_size: 2}

Several lockstep-parallel nodes can share GPUs when, on each worker, they are in the same
groups on every axis, each declared parallel on those axes by the model. The ranks then run
every node's steps in one order. The conductor refuses lockstep nodes on one worker in
different groups, and two lockstep nodes on one worker that share a paged KV cache:
rank 0 replicates the page moves it makes on a pool (host offloads and reloads, for example)
per node, riding on one node's next step, so two nodes on one pool could admit out of step on
a follower. Until rank 0 journals a shared pool's moves in one stream, place such nodes on
Expand Down
3 changes: 2 additions & 1 deletion mstar/api_server/data_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
NameToTensorList,
create_tensor_communication_manager,
)
from mstar.distributed.base import node_group_axis_sizes
from mstar.engine.resources.kv.config import KVSpec, prefix_caches_by_rank
from mstar.engine.resources.kv.keys import PageItem, chain, end_key, fingerprint, page_items
from mstar.engine.resources.spec import apply_yaml_overrides
Expand Down Expand Up @@ -201,7 +202,7 @@ def _kv_page_sizes(model: Model, model_config: dict) -> dict[str, int]:
specs = model.get_node_resources()
apply_yaml_overrides(specs, model_config)
groups = [
(group["ranks"], int(group.get("tp_size", 1)) * int(group.get("sp_size", 1)), group["node_names"])
(group["ranks"], math.prod(node_group_axis_sizes(group).values()), group["node_names"])
for group in model_config.get("node_groups") or []
]
opened = frozenset().union(*prefix_caches_by_rank(specs, groups, names_checkpoint(model)).values())
Expand Down
12 changes: 6 additions & 6 deletions mstar/conductor/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def __init__(
}

# Set up worker graph TP ranks; validate_deployment checked each worker
# graph belongs to one sharding group of its tp_size.
# graph belongs to one sharding group of its instance size.
self.streaming_consumers = set()
self.node_walk_to_wg: dict[tuple[str, str], WorkerGraph] = {}

Expand Down Expand Up @@ -573,7 +573,7 @@ def __init__(
continue
wg = self.node_walk_to_wg[(node, walk)]
# The instance rank is the worker's index within the
# lockstep instance (0..tp*sp-1), used by the
# lockstep instance (0..instance size - 1), used by the
# replicated-signal fanout (so exactly one rank — index 0
# — forwards a replicated tensor to a downstream node).
for ranks in wg._instance_ranks:
Expand Down Expand Up @@ -968,10 +968,10 @@ def _assign_worker_graphs_to_workers(self, replicas: dict[int, int]) -> dict[int
"""
result = {}
for wg_id, wg in self.worker_graphs.items():
# Route to a whole instance (the lockstep unit): every rank of a
# tp*sp instance runs the request together, so its TP all-reduce
# and SP all-to-all collectives stay in sync. Picking a single TP
# row here would desync the SP all-to-all across rows.
# Route to a whole instance (the lockstep unit): every rank of an
# instance runs the request together, so the collectives of each
# of its axes stay in sync. Picking a single TP row here would
# desync the SP all-to-all across rows.
result[wg_id] = [f"worker_{r}" for r in wg.replica_ranks[replicas[wg._group_id]]]
return result

Expand Down
5 changes: 3 additions & 2 deletions mstar/conductor/routing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Choosing a new request's data-parallel replica in each node group.

A replica is one lockstep instance of a group: its ``tp_size * sp_size`` ranks,
A replica is one lockstep instance of a group: its ``cfg_size * sp_size * tp_size`` ranks,
or one rank. A replica's cost for the request is ``routing_weights.load`` times
its live requests, plus ``routing_cost`` of the facts the mirrors predict for
the request there:
Expand Down Expand Up @@ -133,7 +133,8 @@ def __init__(
for key, labels in keyed_labels(model).items()
}
by_rank = prefix_caches_by_rank(
specs, ((wg.ranks, wg.tp_size, wg.section.get_nodes()) for wg in worker_graphs), names_checkpoint(model),
specs, ((wg.ranks, wg.instance_size, wg.section.get_nodes()) for wg in worker_graphs),
names_checkpoint(model),
)
self._units: list[_Unit] = []
for instances, wgs in units.items():
Expand Down
Loading
Loading