Skip to content

[Bugfix] Fix mamba align mode sync scheduling correctness - #2

Closed
tdoublep wants to merge 5869 commits into
mainfrom
fix-mamba-align-sync-scheduling
Closed

[Bugfix] Fix mamba align mode sync scheduling correctness#2
tdoublep wants to merge 5869 commits into
mainfrom
fix-mamba-align-sync-scheduling

Conversation

@tdoublep

Copy link
Copy Markdown
Owner

Summary

  • The num_speculative_blocks subtraction in MambaManager.remove_skipped_blocks() was applied unconditionally, but is only needed for async scheduling where num_computed_tokens can include unconfirmed draft tokens. With sync scheduling, num_computed_tokens is already accurate and the subtraction delays block freeing, wasting memory under pressure.
  • Added async_scheduling field to MambaSpec (set from scheduler config) and gated the subtraction on it.
  • Parameterized test_mamba_prefix_cache for both sync and async scheduling modes with separate expected StepAction sequences, and gated the fake_execute_model_fn token correction on async mode.

Test plan

  • pytest -xsv tests/v1/e2e/test_mamba_prefix_cache.py::test_mamba_prefix_cache — both [async] and [sync] variants pass on H100

Fixes a regression from vllm-project#33997.

🤖 Generated with Claude Code

hmellor and others added 30 commits March 5, 2026 13:58
…nt (vllm-project#36135)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: zixiao <shunli.dsl@alibaba-inc.com>
Co-authored-by: zixiao <shunli.dsl@alibaba-inc.com>
Co-authored-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Signed-off-by: 1195343015 <1195343015@qq.com>
Signed-off-by: Jiayi Yan <66017932+1195343015@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…r leading to encoder_cache_size is 0 (vllm-project#35994)

Signed-off-by: Miao, Avery <avery.miao@intel.com>
Signed-off-by: Xinyu Chen <xinyu1.chen@intel.com>
…ct#36133)

Signed-off-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com>
…project#36146)

Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
)

Signed-off-by: frankwang28 <frank.wbb@hotmail.com>
…ul (vllm-project#36147)

Signed-off-by: Nikhil Gupta <nikhil.gupta2@arm.com>
Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…gs` (vllm-project#36158)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…ject#34754)

Signed-off-by: Shiyan Deng <dsy842974287@meta.com>
Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
…36047)

Signed-off-by: Shiyan Deng <dsy842974287@meta.com>
Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
…lm-project#35478)

Signed-off-by: Shiyan Deng <dsy842974287@meta.com>
Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
…ix (vllm-project#36208)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Signed-off-by: Xiang Shi <realkevin@tutanota.com>
jennyyyyzhen and others added 28 commits March 11, 2026 13:37
…llm-project#36274)

Signed-off-by: jennyyyyzhen <yzhen@hmc.edu>
Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
…lm-project#33881)

Signed-off-by: Or Ozeri <oro@il.ibm.com>
Co-authored-by: Nicolò Lucchesi <nlucches@redhat.com>
…roject#36129)

Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Co-authored-by: Yihua Cheng <yihua98@uchicago.edu>
…ing (vllm-project#35461)

Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
…uning (vllm-project#36683)

Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…uring config key computation (vllm-project#36563)

Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…llm-project#36698)

Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: ahao-anyscale <ahao@anyscale.com>
…tectures (vllm-project#36499)

Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
…hput improvement (vllm-project#36710)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
vllm-project#36829)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
vllm-project#36831)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Signed-off-by: louie-tsai <louie.tsai@intel.com>
Signed-off-by: Oasis-Git <ayw.sirius19@gmail.com>
…lure (vllm-project#36761)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
…llm-project#36677)

Signed-off-by: Yanan Cao <gmagogsfm@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…treaming (vllm-project#29947)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…rop (vllm-project#36670)

Signed-off-by: István Ketykó <istvan.ketyko@gmail.com>
…llm-project#34328)

Signed-off-by: phaedonsun <phaedonsun@tencent.com>
Co-authored-by: phaedonsun <phaedonsun@tencent.com>
…rage

The num_speculative_blocks subtraction in MambaManager.remove_skipped_blocks()
was applied unconditionally, but it is only needed for async scheduling where
num_computed_tokens can include unconfirmed draft tokens. With sync scheduling,
num_computed_tokens is already accurate, and the subtraction causes delayed
block freeing (wasting memory under pressure).

Changes:
- Add async_scheduling field to MambaSpec, set from scheduler config
- Gate the subtraction in remove_skipped_blocks() on async_scheduling
- Gate the fake_execute_model_fn correction in tests on async scheduling
- Parameterize test_mamba_prefix_cache for both sync and async modes
  with separate expected StepAction sequences for each

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Thomas Parnell <tpa@zurich.ibm.com>
@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@tdoublep tdoublep closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.