Files
sglang/python/sglang/srt
laoyao0822 c6b99f6060 Stabilize spec-v2 draft graph metadata
Spec-v2 draft extend can receive token ids from producers whose dtype is not already int64, while DP collective paths require a stable integer dtype across ranks. EAGLE draft CUDA graph replay also pads raw batches to a captured batch size, so the metadata/replay path must see seq_lens_sum consistent with the padded seq_lens and then restore the caller-visible raw value.

Constraint: Keep this as a narrow correctness port from upstream rather than pulling the larger spec-v2 refactor chain.

Rejected: Cherry-pick broader attention-backend and decode-result refactors | current branch lacks the same upstream forward-context scaffolding and would require a separate port.

Confidence: high

Scope-risk: narrow

Directive: Do not remove the seq_lens_sum restore without rechecking padded EAGLE draft CUDA graph metadata construction.

Tested: python -m pytest test/registered/spec/eagle/test_eagle_v2_draft_extend_contract.py -q

Tested: remote g0034/cjy-glm5-new PYTHONPATH=python python3 -m pytest test/registered/spec/eagle/test_eagle_v2_draft_extend_contract.py -q

Not-tested: full multi-node GLM5 spec-v2 decode startup smoke

Co-authored-by: OmX <omx@oh-my-codex.dev>
2026-06-29 03:16:14 +08:00
..