[Qwen3-next] support mamba radix cache for overlap scheduler - #14792
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
yizhang2077
reviewed
Dec 10, 2025
hanming-lu
marked this pull request as ready for review
December 11, 2025 01:30
hanming-lu
requested review from
Fridge003,
Ying1123,
hebiao064,
hnyls2002,
ispobock,
merrymercy,
xiezhq-hermann and
zhyncs
as code owners
December 11, 2025 01:30
Collaborator
Author
|
/tag-and-rerun-ci |
added 2 commits
December 13, 2025 23:51
added 4 commits
December 13, 2025 23:53
merrymercy
approved these changes
Dec 14, 2025
Comment on lines
+158
to
+165
| self.enable_mamba_radix_cache_v2 = False | ||
| self._init_mamba_pool( | ||
| size + pre_alloc_size, cache_params, device, speculative_num_draft_tokens | ||
| size + pre_alloc_size, | ||
| size + pre_alloc_size, | ||
| cache_params, | ||
| device, | ||
| self.enable_mamba_radix_cache_v2, | ||
| speculative_num_draft_tokens, |
Contributor
There was a problem hiding this comment.
@ShangmingCai Once this is merged. Can you help support PD + this PR?
| | `--max-mamba-cache-size` | The maximum size of the mamba cache. | `None` | Type: int | | ||
| | `--mamba-ssm-dtype` | The data type of the SSM states in mamba cache. | `float32` | `float32`, `bfloat16` | | ||
| | `--mamba-full-memory-ratio` | The ratio of mamba state memory to full kv cache memory. | `0.2` | Type: float | | ||
| | `--mamba-scheduler-strategy` | The strategy to use for mamba scheduler. `auto` currently defaults to `no_buffer`. 1. `no_buffer` does not support overlap scheduler due to not allocating extra mamba state buffers. Branching point caching support is feasible but not implemented. 2. `extra_buffer` supports overlap schedule by allocating extra mamba state buffers to track mamba state for caching (increases mamba state usage per running req by 2 for non-speculative decoding, 1 for speculative decoding). 2a. `extra_buffer` is strictly better for non-KV-cache-bound cases; for KV-cache-bound cases, the tradeoff depends on whether enabling overlap outweighs reduced max running requests. 2b. mamba caching at radix cache branching point is strictly better than non-branch but requires kernel support (currently only FLA backend), currently only extra_buffer supports branching. | `auto` | `auto`, `no_buffer`, `extra_buffer` | |
Contributor
There was a problem hiding this comment.
What is the meaning of (increases mamba state usage per running req by 2 for non-speculative decoding)? Can we use descriptions such as increase by 1.2x or 1.5x?
Collaborator
@merrymercy Sure. I will support PD + this PR ASAP. |
6 tasks
6 tasks
6 tasks
6 tasks
5 tasks
This was referenced Jan 7, 2026
YChange01
pushed a commit
to YChange01/sglang
that referenced
this pull request
Jan 13, 2026
|
Is there any performance details before and after the overlap scheduler support of qwen3-next? |
popsiclexu
pushed a commit
to popsiclexu/sglang
that referenced
this pull request
Mar 25, 2026
0826joyce
pushed a commit
to 0826joyce/sglang-perf-opt
that referenced
this pull request
May 19, 2026
5 tasks
|
求指教,非投机解码开启extra_buffer给每个请求分配2个slot作用是啥 |
5 tasks
4 tasks
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
Modifications
--mamba-scheduler-strategy extra_bufferAccuracy Tests
--mamba-scheduler-strategy extra_bufferandno_bufferBenchmarking and Profiling
Checklist