Repository navigation
Conversation
4662dab to
2c7b968
Compare
|
Thanks. Splitting as suggested: this PR will keep only the NemotronH MTP On the kernels: you're right that the existing path already reduces per shard first. The new kernels keep that algorithm and only cut the kernel count. Today it's |
2c7b968 to
39ac201
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
…_argmax_reduction With --speculative_config.use_local_argmax_reduction true, the speculator calls the drafter's get_top_tokens() instead of computing full-vocab logits; NemotronHMTP did not implement it, so the option was rejected for Nemotron-H MTP. Delegate to LogitsProcessor.get_top_tokens() with the shared lm_head, as other MTP drafters do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39ac201 to
72fe56b
Compare
Overview
Implement
NemotronHMTP.get_top_tokens()so that--speculative_config.use_local_argmax_reduction trueworks with the Nemotron-H MTP drafter. Split after review: the fused vocab-parallel argmax kernels that were also in this PR are now #60099. Related: #56995 (same hook for the generic MTP drafter).Claims
use_local_argmax_reductionswitch (no new flag). Before this change the speculator rejected the option because the drafter had noget_top_tokens().compute_logits(...).argmax(-1): the method delegates to the existingLogitsProcessor.get_top_tokens()with the sharedlm_head, as other MTP drafters do.Validation
ac9126e58(nightly image with this file overlaid), Nemotron-H (NVFP4) with MTP (7 draft tokens), TP4 on 4x B200, MRV2,--speculative_config.use_local_argmax_reduction true: startup, including CUDA graph capture of the drafter, succeeded, and the speculator'sUsing local argmax reduction for draft token generation ...line appeared on all 4 ranks._validate_local_argmax_reduction()rejects the option for this drafter (... does not implement get_top_tokens()).Details
nemotron_h_mtp.py, mirroringcompute_logits()(samelm_headassertion).LogitsProcessor.get_top_tokens()itself is addressed separately in [Perf][Spec Decode] Fused vocab-parallel argmax for LogitsProcessor.get_top_tokens() #60099.AI assistance: Claude Code was used to write this change and its tests, run the validation and draft this description. The human submitter reviews every changed line before this leaves draft.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
🤖 Generated with Claude Code