DeepSpeed
24261e37 - Perf/rollout multiple graph captures (#9153)

Commit
1 day ago
Perf/rollout multiple graph captures (#9153) ## What Adds a decode bucket ladder to continuous rollout graph capture: decode graphs are captured lazily at powers-of-two widths (plus max_batch_size) and each decode step replays the smallest captured width covering the rows doing work, instead of always replaying the full-batch graph. A failed capture falls back to an eager forward for that bucket; new stats report captures, bucket widths, and padded rows. ## Why A multi-turn rollout re-submits every conversation with the tokens it just generated, and conversations end turns at different times, so the live batch drains over the run. A single max-batch-sized graph pays full-width padding on every late step; the ladder only pads to the next captured width. ## Results (1x A100-SXM4-40GB, driver 595.71.05, torch 2.15.0+cu132, bf16; 16 conversations x 4 staggered turns, 256 new tokens/turn, max_batch_size 16, seed 0, best of 5 after 2 warmups) | model | wide tok/s | ladder tok/s | speedup | row-steps | pad rows | |-----------|-----------:|-------------:|--------:|-----------------|------------| | Qwen3-4B | 294.5 | 388.8 | 1.32x | 16320 -> 11220 (0.69x) | 6120 -> 1020 | | Qwen3-8B | 254.7 | 323.7 | 1.27x | 16320 -> 11220 (0.69x) | 6120 -> 1020 | KV-cache footprint is unchanged (same max-batch static cache in both configurations); only the replayed width per step shrinks. ## Tests - `python benchmarks/rollout/bench_graph_capture_ladder.py --model Qwen/Qwen3-4B --device cuda --dtype bf16 --conversations 16 --turns 4 --max-batch-size 16 --max-new-tokens 256 --trials 5 --warmup 2` --------- Signed-off-by: omersajid9 <omersajid.777@gmail.com>
Author
Parents
Loading