Skip to content

Add DFlash speculative decoding support to NeMo SpeechLM vLLM plugin - #16129

Closed
Slyne wants to merge 20 commits into
NVIDIA-NeMo:mainfrom
Slyne:slyne/dflash-inference
Closed

Add DFlash speculative decoding support to NeMo SpeechLM vLLM plugin#16129
Slyne wants to merge 20 commits into
NVIDIA-NeMo:mainfrom
Slyne:slyne/dflash-inference

Conversation

@Slyne

@Slyne Slyne commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

This PR depends on #15906. Until that prerequisite merges, GitHub may show its SALM vLLM/MTP commits in this draft's diff.

What does this PR do?

Add checkpoint-backed DFlash and DFlash2 speculative-decoding inference support for NeMo SpeechLM models served through vLLM.

Collection: SpeechLM (nemo.collections.speechlm2)

Changelog

  • Register the NeMo SpeechLM target with vLLM's SupportsEagle3 hidden-state contract used by DFlash.
  • Preserve the SALM audio-conditioned target path while exposing the intermediate hidden states required by the draft model.
  • Route published DFlash checkpoints through vLLM speculative decoding.
  • Document DFlash2 inference, its V2 model-runner requirement, and its required checkpoint configuration.
  • Pin DFlash2 to immutable vLLM commit 3406ec1dae9916f920b90f0dbf90dcf54923d042 from [Spec Decode] DFlash2: local convolution + candidate selector vllm-project/vllm#52816.
  • Add focused coverage for plugin registration, configuration routing, weight handling, and multimodal/speculative-decoding contracts.

Scope

This is inference-only support. It does not train, fine-tune, convert, or bundle DFlash/DFlash2 checkpoints. A DFlash2 checkpoint must be trained or fine-tuned separately for the target Lightning backbone.

Usage

vllm serve /path/to/vllm-ready-speechlm-checkpoint \
  --trust-remote-code \
  --speculative-config '{
    "method": "dflash",
    "model": "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4-DFlash",
    "num_speculative_tokens": 6
  }'

For DFlash2, install the pinned runtime documented in docs/source/speechlm2/vllm_dflash.rst and point model at a separately trained checkpoint declaring DFlash2DraftModel.

Validation

  • Focused unit tests: 116 passed
    • tests/collections/speechlm2/test_to_hf.py
    • tests/collections/speechlm2/test_vllm_plugin.py
  • Repository pre-commit hooks passed for the complete branch diff; all changed Python files pass Black 24.10.0.
  • git diff --check upstream/main...HEAD passed.
  • DFlash1 was validated end-to-end with the Lightning SALM proxy and published trained draft checkpoint.
  • DFlash2 inference plumbing was exercised through vLLM's V2 model runner; no production DFlash2 checkpoint is included in this PR.

Before this PR is ready for review

Slyne added 7 commits August 21, 2026 15:27
- register the NeMo SpeechLM MTP draft model and route compatible repeated-layer checkpoints through vLLM speculative decoding
- fuse audio embeddings at placeholder positions for target and draft models
- load MTP weights while handling SpeechLM checkpoint prefixes and vocabulary padding
- make plugin registration idempotent and validate repeated-layer multi-head configurations
- add focused plugin tests for registration, config routing, embeddings, and MTP properties

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: SlyneD <slyned@nvidia.com>
…r repeated MTP head; and fix for v0.20.0 weight loading

Signed-off-by: SlyneD <slyned@nvidia.com>
Signed-off-by: SlyneD <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Slyne added 5 commits August 24, 2026 17:47
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
@Slyne
Slyne force-pushed the slyne/dflash-inference branch from c1f6947 to 31fab7c Compare August 26, 2026 05:45
@github-actions github-actions Bot added the ASR label Aug 26, 2026
pass

perception.encoder = pe_encoder
perception.eval()
Slyne added 6 commits August 26, 2026 14:39
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
Signed-off-by: slyne deng <slyned@nvidia.com>
@Slyne
Slyne force-pushed the slyne/dflash-inference branch from 31fab7c to d512afe Compare August 26, 2026 21:46
Signed-off-by: slyne deng <slyned@nvidia.com>
@Slyne
Slyne force-pushed the slyne/dflash-inference branch from d512afe to c942cd7 Compare August 26, 2026 23:06
Signed-off-by: SlyneD <slyned@nvidia.com>
@Slyne

Slyne commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Close this PR. Please refer to #16239.

@Slyne Slyne closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants