Skip to content

[Bugfix][Spec Decode] Warm spec-sized logits all-gather during init - #48572

Open
haosdent wants to merge 2 commits into
vllm-project:mainfrom
haosdent:fix-48568
Open

haosdent wants to merge 2 commits into
vllm-project:mainfrom
haosdent:fix-48568

Conversation

@haosdent

@haosdent haosdent commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fixes DeepSeek/GLM-5.2 MTP speculative decoding hanging at startup (#48568).

Warmup runs compute_logits' vocab-parallel all-gather at one row per request, but spec decode verifies max_num_reqs*(1+num_speculative_tokens) rows. On ROCm/RCCL the larger message connects extra channels lazily on first use, so when that first use is a live decode step the connect fails (no transport for peer on channel N) and the engine hangs. Warm compute_logits at the spec-decode row count during init.

Test Plan

Serve GLM-5.2-FP8 with MTP speculative decoding on 8x MI300X (gfx942):

vllm serve zai-org/GLM-5.2-FP8 --tensor-parallel-size 8 \
  --kv-cache-dtype fp8_e4m3 --linear-backend aiter --moe-backend aiter \
  --speculative-config '{"method":"mtp","num_speculative_tokens":1}'

Test Result

Server starts and serves normally with MTP speculative decoding, producing coherent completions. Without this change the engine hangs in the logits all-gather on the first speculative-decode step.

@mergify mergify Bot added deepseek Related to DeepSeek models v1 bug Something isn't working labels Jul 14, 2026
@haosdent
haosdent force-pushed the fix-48568 branch 2 times, most recently from 3a064ac to 19d5dcb Compare July 14, 2026 06:32
@haosdent

Copy link
Copy Markdown
Contributor Author

@AndreasKaratzas can you help to take a look, this is to fix MTP issues when I run it in AMD Mi300x

@haosdent haosdent changed the title [WIP][Bugfix][Spec Decode] Fix DeepSeek/GLM MTP with sequence-parallel MoE and warm spec-sized logits all-gather [Bugfix][Spec Decode] Fix DeepSeek/GLM MTP with sequence-parallel MoE and warm spec-sized logits all-gather Jul 14, 2026
@haosdent haosdent closed this Jul 14, 2026
@haosdent haosdent reopened this Jul 14, 2026
@haosdent
haosdent marked this pull request as ready for review July 14, 2026 06:39

@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 pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify

mergify Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @haosdent.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Jul 14, 2026
@cjackal

cjackal commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Seems like item 1 has been covered in #48036

Warmup only ran compute_logits' vocab-parallel all-gather at one row per
request, but spec decode verifies max_num_reqs*(1+num_spec_tokens) rows.
On ROCm/RCCL the larger message connects extra channels lazily on first
use, so when that first use is a live decode step the connect fails with
"no transport for peer on channel N" and the engine hangs (vllm-project#48568).

Warm compute_logits at the spec-decode row count during init so those
channels connect before serving.

Signed-off-by: haosdent <haosdent@gmail.com>
@haosdent haosdent changed the title [Bugfix][Spec Decode] Fix DeepSeek/GLM MTP with sequence-parallel MoE and warm spec-sized logits all-gather [WIP][Bugfix][Spec Decode] Warm spec-sized logits all-gather during init Jul 29, 2026
@mergify mergify Bot removed the needs-rebase label Jul 29, 2026
@haosdent haosdent changed the title [WIP][Bugfix][Spec Decode] Warm spec-sized logits all-gather during init [Bugfix][Spec Decode] Warm spec-sized logits all-gather during init Jul 29, 2026
@haosdent

Copy link
Copy Markdown
Contributor Author

@vllmellm I have rebase on the latest main

@haosdent

Copy link
Copy Markdown
Contributor Author

Thx @cjackal , have rebased.

@tjtanaa
tjtanaa requested a review from yewentao256 July 30, 2026 12:23
@arpera arpera moved this to Unsorted queue in Structured Output (arpera) Aug 26, 2026
@arpera arpera moved this from Unsorted queue to Not related in Structured Output (arpera) Aug 27, 2026
@njhill njhill added the mrv1-only Issues/PRs which apply only to Model Runner V1 (not applicable to Model Runner V2) label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working deepseek Related to DeepSeek models mrv1-only Issues/PRs which apply only to Model Runner V1 (not applicable to Model Runner V2) structured-output v1

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants