Repository navigation
[Fix] hybrid: Preserve deterministic prefill and prefix caching - #45545
SouthWest7 wants to merge 3 commits into
Conversation
|
@SouthWest7 FYI, I opened #46525 for #46446, and the two PRs are complementary rather than overlapping. #46525 only changes the GDN backend: under deterministic inference it runs the decode tail of a mixed batch through the decode kernel. The issue's two-request repro needs that, and this PR does not touch it. This PR's chunk alignment covers the concurrency differences that remain with mixed chunk off. I applied this PR on top of #46525 on 1x H200 (main
Also, this PR now conflicts with |
69bc027 to
f43f8ab
Compare
This comment has been minimized.
This comment has been minimized.
9721c17 to
13771a9
Compare
Motivation
Fixes #45481. Deterministic hybrid inference can change greedy outputs when concurrent arrivals split a recurrent prefill chunk, or when a later request restores a prefix whose SSM state and attention KV were computed through different numerical paths.
Modifications
ignore_eos, and continuing requests. Defer an intermediate cut that rounds to zero; allow a short final chunk. Preserve upstream DCP checkpoint alignment.hround trip. Attention output still uses its existing activation-dtypehbuffer.Rebased onto upstream
b702f0d80e.Accuracy Tests
Validated on H100 PCIe, BF16 models, Triton attention/linear attention, with deterministic inference enabled.
Serving comparisons used CUDA graphs disabled and mixed chunk disabled; prefill graph correctness was checked separately by capture/replay tests. #46525 remains complementary for deterministic mixed-batch decode tails.
Speed Tests and Profiling
No throughput benchmark or performance improvement claimed. Selected FP32 snapshots add one state buffer per sequence requiring intermediate tracking. Deterministic extra-buffer caching intentionally forgoes decode-generated prefix reuse to keep reusable KV and SSM checkpoints on the prefill numerical path.
CI States
Latest PR Test (Base): ❌ Run #41914992091
Latest PR Test (Extra): ❌ Run #41914991583
Latest PR Test (AMD ROCm 10): ❌ Run #41914991575
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: