[Feat] Support DSv3.2 with sglang-ATOM plugin and sglang sparse MLA#1094
Open
qichu-yun wants to merge 6 commits into
Open
[Feat] Support DSv3.2 with sglang-ATOM plugin and sglang sparse MLA#1094qichu-yun wants to merge 6 commits into
qichu-yun wants to merge 6 commits into
Conversation
Keep DeepSeek-V3.2 sparse MLA decode logic in the SGLang sparse backend so the shared full-attention backend stays focused on common model paths.
valarLip
reviewed
Jun 8, 2026
| k, [self.rope_dim, self.head_dim - self.rope_dim], dim=-1 | ||
| ) | ||
| q_pe, k_pe = rotary_emb(positions, q_pe, k_pe) | ||
| q[..., : self.rope_dim] = q_pe |
Collaborator
There was a problem hiding this comment.
why need this? our rope are inplace op
Contributor
Author
There was a problem hiding this comment.
OK, I check it. The current RoPE implementation uses rope_cached_positions_2c_fwd_inplace, and q_pe/k_pe are views into q/k, so the explicit writeback is indeed redundant. I removed these two lines. Thank you!
RoPE updates the sliced q/k tensors in place, so the explicit assignment back into the parent tensors is unnecessary.
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
This PR adds DeepSeek-V3.2 support for the SGLang ATOM plugin with FP8 KV cache and sparse MLA enabled.
The goal is to make the SGLang path run DeepSeek-V3.2 correctly with its sparse MLA indexer, including prefill and decode, while keeping SGLang-specific logic isolated from the vLLM plugin and avoiding unnecessary changes to other model paths.
Technical Details
atom/plugin/sglang/attention_backend/sparse_mla_indexer.py.max_num_seqswhen SGLang does not passmax_running_requests.Test Plan
server:
benchmark:
Accuracy:
Test Result
Accuracy Results
1.bf16 cache

2.--kv-cache-dtype fp8_e4m3

Performance Results
Submission Checklist