Skip to content

[Kimi Bug] Fix kimi k3 startup cuda graph issue with recoverSSM - #55774

Merged
yewentao256 merged 2 commits into
mainfrom
wentao-fix-kimi-k3-cudagraph-issue
Sep 8, 2026
Merged

yewentao256 merged 2 commits into
mainfrom
wentao-fix-kimi-k3-cudagraph-issue

Conversation

@yewentao256

Copy link
Copy Markdown
Member

Purpose

vllm serve moonshotai/Kimi-K3   --trust-remote-code   --tensor-parallel-size 8   --load-format fastsafetensors   --gpu-memory-utilization 0.9   --enable-prefix-caching   --reasoning-parser kimi_k3   --enable-auto-tool-choice   --tool-call-parser kimi_k3   --host 0.0.0.0   --port 30000   --max-model-len auto   --max-num-seqs 48   --speculative-config '{"model":"RedHatAI/Kimi-K3-speculator.dspark","method":"dspark","num_speculative_tokens":8,"draft_sample_method":"probabilistic","rejection_sample_method":"standard"}'   --use-replayssm 

Will raise error

(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]   File "/home/yewentao256/vllm-source/vllm/v1/worker/gpu/model_states/mamba_hybrid.py", line 313, in prepare_attn
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]     attn_metadata = build_attn_metadata(
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]                     ^^^^^^^^^^^^^^^^^^^^
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]   File "/home/yewentao256/vllm-source/vllm/v1/worker/gpu/attn_utils.py", line 343, in build_attn_metadata
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]     metadata = attn_metadata_builder.build(
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]   File "/home/yewentao256/vllm-source/vllm/models/kimi_k3/nvidia/kda_metadata.py", line 442, in build
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055]     raise ValueError(
(Worker_TP5 pid=1272371) ERROR 09-07 17:14:52 [multiproc_executor.py:1055] ValueError: KDA RecoverSSM speculative decode query length exceeds its activation capacity (9)

This PR fixes the issue by skipping the cudagraph capture outside of workspace

Test

(APIServer pid=2088238) INFO:     Started server process [2088238]
(APIServer pid=2088238) INFO:     Waiting for application startup.
(APIServer pid=2088238) INFO:     Application startup complete.

Signed-off-by: yewentao256 <zhyanwentao@126.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 7, 2026
@yewentao256

Copy link
Copy Markdown
Member Author

/ci run

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87593 for commit 76e5267433ac.

@mergify mergify Bot added mrv2 Model Runner V2 specific bug Something isn't working labels Sep 7, 2026
@yewentao256

Copy link
Copy Markdown
Member Author

/ci run

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #87689 for commit 69998fce9e74.

@yewentao256
yewentao256 enabled auto-merge (squash) September 8, 2026 14:28
@github-project-automation github-project-automation Bot moved this to Ready in NVIDIA Sep 8, 2026
@yewentao256
yewentao256 merged commit 07950d4 into main Sep 8, 2026
101 checks passed
@yewentao256
yewentao256 deleted the wentao-fix-kimi-k3-cudagraph-issue branch September 8, 2026 14:29
@github-project-automation github-project-automation Bot moved this from Ready to Done in NVIDIA Sep 8, 2026
ItsRoy69 pushed a commit to ItsRoy69/vllm that referenced this pull request Sep 10, 2026
…-project#55774)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Jyotirmoy Roy <jyotirmoyroy649@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working k3 kimi mrv2 Model Runner V2 specific nvidia ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants