Repository navigation
[Fix] Stop DeepSeek-V4.1 encoder bounded replay from crashing on the first prefill without speculation - #42902
Closed
vincentzed wants to merge 1 commit into
Closed
vincentzed wants to merge 1 commit into
vincentzed wants to merge 1 commit into
Conversation
…first prefill without speculation Without speculation the request windows hold every SWA row and no allocator registers a full-to-SWA mapping, so the pool never had the attribute that prefill reads on every batch.
vincentzed
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
alphabetc1,
hanming-lu,
hebiao064,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
October 7, 2026 04:06
This was referenced Oct 7, 2026
Collaborator
|
Thanks @vincentzed for tracking down this crash! #43165 has since landed the same fix on main: the pool now initializes |
Contributor
Author
|
Thanks @hnyls2002, agreed. #43165 covers this case, including the encoder replay without speculation test. |
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.
Motivation
On main, a DeepSeek-V4.1 server started with
--enable-encoder-swa-bounded-replayand no speculative decoding crashes on its first prefill:Why it crashes:
full_to_swa_index_mappingfrom the pool on every batch.Modifications
full_to_swa_index_mapping. It staysNonewhen no allocator registers one.Accuracy Tests
TestEncoderReplayWithoutSpeculationbuilds the pool in this configuration. It fails on main with the error above and passes with the fix.deepseek-ai/DeepSeek-V4.1-Flash(TP4, EP4), main crashes on the first request with the command below. With this fix the server runs and GSM8K (1319 questions) scores 0.904. That run was on a branch that also carries my decoder bounded replay changes, which do not touch this code path.Speed Tests and Profiling
Not applicable. This only fixes a crash.
Checklist
CI States
Latest PR Test (Base): ❌ Run #37569845440
Latest PR Test (Extra): ❌ Run #37569845137
Latest PR Test (AMD ROCm 10): ❌ Run #37569845389