[Bugfix] Fix PD disagg + MTP correctness for Qwen3.5(GDN) (#47466)

Signed-off-by: Dakai An <dakaian108@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Dakai An
2026-07-07 13:51:22 +00:00
committed by GitHub
co-authored by Nick Hill
parent 65a7b46284
commit 65dcde1695
6 changed files with 22 additions and 22 deletions
+4 -2
View File
@@ -340,10 +340,12 @@ def _combine_sampled_and_draft_tokens_kernel(
# Handling prefill tokens. No sampled or draft tokens.
return
if NUM_NEW_SAMPLED_TOKENS > 0:
# Keep prompt-tail slots intact; only rewrite generated-token slots.
first_logit_seq_pos = seq_len - num_logits
if NUM_NEW_SAMPLED_TOKENS > 0 and first_logit_seq_pos >= prefill_len:
# Write the last sampled token ID to input_ids.
last_token_id = tl.load(last_sampled_tokens_ptr + req_state_idx)
tl.store(input_ids_ptr + query_end - num_logits, last_token_id)
tl.store(input_ids_ptr + logits_start, last_token_id)
# Write the draft tokens (if any) to input_ids.
if num_draft_tokens > 0: