Repository navigation
Support NoPE layers in the tokenspeed_mla FP8 prefill hook - #38152
Merged
Merged
Conversation
mmangkad
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
hebiao064,
ispobock and
merrymercy
as code owners
September 5, 2026 18:42
Contributor
Author
|
/rerun-test test/registered/dcp/test_kimi_linear_dcp4.py test/registered/dcp/test_kimi_linear_dcp_dspark4.py test/registered/radix_cache/unified_radix_tree/test_unified_radix_cache_kl_dcp.py test/registered/attention/unittests/mla/test_tokenspeed_mla.py |
Contributor
|
Results for 🚀 🚀 |
3 of 5 tasks
Fridge003
approved these changes
Sep 5, 2026
StevenChenSE
pushed a commit
to StevenChenSE/sglang
that referenced
this pull request
Sep 6, 2026
…ct#38152) Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
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
Three
extra-b-test-4-gpu-b200jobs fail on main (run 33962519343):test_kimi_linear_dcp4.py,test_kimi_linear_dcp_dspark4.py,test_unified_radix_cache_kl_dcp.py, all Kimi Linear ontokenspeed_mla+fp8_e4m3under DCP. Every TP rank crashes during prefill and the server is SIGKILLed:Surfaced by #35770, which taught
resolve_attn_backend()to unwrapHybridLinearAttnBackend.full_attn_backend. Kimi Linear is hybrid KDA/MLA, so prefill used to resolve to the wrapper, which has noprepare_prefill_qkvhook, and took the BF16 path guarded byif self.rotary_emb is not None. It now resolves toTokenspeedMLABackend, whose hook dereferenceslayer.rotary_embunconditionally, and Kimi Linear builds its MLA layers withskip_rope=True, which leavesrotary_embasNone.Modifications
_fused_rope_fp8_quantizegains a NoPE branch: whencos_sin_cacheisNone, keep the FP8 quantize and the packed[nope | pe]layout, drop only the rotation. It is an early return, so RoPE layers are unaffected.The
cos_sin_cacheandis_neox_stylereads becomeNonechecks rather thangetattrdefaults, and_fused_rope_fp8_quantizebecomes a@staticmethodwith a unit case, since nothing PR-gated covered this path.Test Plan
dcp/test_kimi_linear_dcp4.pydcp/test_kimi_linear_dcp_dspark4.pyradix_cache/unified_radix_tree/test_unified_radix_cache_kl_dcp.pyattention/unittests/mla/test_tokenspeed_mla.pytest_kimi_linear_dcp4.pywas also reproduced red by stashing the patch.CI States
Latest PR Test (Base): ❌ Run #33984976309
Latest PR Test (Extra): ❌ Run #33984976221
Latest PR Test (AMD ROCm 7.2): ❌ Run #33984976307