Skip to content

fix(speechlm2): support vLLM 0.29 multimodal processing and keep refit padding on device - #16588

Merged
DongjiGao merged 4 commits into
mainfrom
task/ascend-vllm029-processor-20261107
Nov 12, 2026
Merged

DongjiGao merged 4 commits into
mainfrom
task/ascend-vllm029-processor-20261107

Conversation

@vmendelev

Copy link
Copy Markdown
Collaborator

What does this PR do?

Make the SALM vLLM plugin work with vLLM 0.29 and keep vocabulary padding on the source tensor's device during weight refits.

Collection: SpeechLM2.

Changelog

  • vLLM 0.29 has no BaseMultiModalProcessor._call_hf_processor, so importing nemo.collections.speechlm2.vllm.salm.audio failed while inspecting its signature. Inspect the legacy hook only when it exists; otherwise implement vLLM 0.29's _apply_hf_processor_main, which packages the waveforms without an HF processor and leaves placeholder expansion to the normal prompt-update path. Cached calls with a subset of the audio items, or none, are supported. The vLLM 0.28 and 0.32 paths are unchanged.
  • _pad_to_vocab_size allocated its padding on the default device, so torch.cat mixed CUDA weights received through an IPC refit with CPU padding. Allocate the padding on the input tensor's device.
  • Add test_vllm_native_processor.py (native hook, CTC opt-in, empty-audio passthrough, full apply with exact text-before-audio spans, text-only prompts, cache hits and partial misses; skipped where vLLM has the legacy hook) and test_vllm_vocab_padding.py (values and dtype, non-CPU devices, no-padding identity, ambient default device).

Usage

No API change. NeMo RL generation workers on vLLM 0.29 load SALM checkpoints with VLLM_PLUGINS=nemo_speechlm.

Validation

  • pre-commit run --from-ref 979cc6c6a --to-ref HEAD and git diff --check pass.
  • pytest --cpu -m "not pleasefixme" tests/collections/speechlm2/test_vllm_*.py with vLLM 0.29.0 and transformers 5.12.1: 486 passed, 1 skipped (the existing gate for vLLM versions that apply prompt updates on token ids only).
  • Before the fix, plugin model inspection failed on vLLM 0.29.0 at the missing _call_hf_processor.
  • GPU: NeMo RL GSPO training of Nemotron 3.5 Transcribe 30B-A4B on 4×8 GPUs, with vLLM 0.29 generation and a weight refit every step, completed 100 updates with this commit installed in the generation environment.
  • Documentation: no user-facing API or workflow change, so none is updated.

The branch is based on 979cc6c, the commit validated on GPU, and merges cleanly into current main.

GitHub Actions CI

Trusted PRs run automatically through copy-pr-bot. For an untrusted PR, a maintainer can trigger CI by commenting
/ok to test <head-sha>; repeat this after a new push if the PR remains untrusted.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation? (Not needed; no API change.)
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries? (Only the vLLM plugin module changes; both new tests skip without vLLM.)

PR Type:

  • New Feature
  • Bugfix
  • Documentation

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 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.

vmendelev added a commit to NVIDIA-NeMo/RL that referenced this pull request Nov 10, 2026
Speech 732041d29 (NVIDIA-NeMo/Speech#16588) adds vLLM 0.29's multimodal
processor hook and keeps refit vocabulary padding on the weight's device.
Both environments use the same Speech commit; the lock changes are limited
to nemo-toolkit.

Signed-off-by: Valentin Mendelev <[email protected]>

@DongjiGao DongjiGao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me in general. On vLLM 0.29.0, I checked the basic case: the plugin loads the release checkpoint and generates, and CTC timestamps work. I have not verified MTP, DFlash or ReplaySSM.

@vmendelev

Copy link
Copy Markdown
Collaborator Author

/ok to test 732041d

@DongjiGao

Copy link
Copy Markdown
Contributor

CI stopped at linting on nemo/utils/callbacks/s3_checkpoint_io.py, which this PR doesn't touch. The branch is 17 commits behind main (#16504 changed that file), and the lint job compares the head with main's tip, so it lints the branch's older copy. Could you merge or rebase onto current main?

@DongjiGao
DongjiGao disabled auto-merge November 11, 2026 19:45
@vmendelev

Copy link
Copy Markdown
Collaborator Author

/ok to test 45ee149

@DongjiGao

Copy link
Copy Markdown
Contributor

Reran the MultiTalker ASR job; it timed out on an unrelated hang and passes on main.

@DongjiGao

Copy link
Copy Markdown
Contributor

Updated the branch to start a fresh CI run: on the previous run, the aggregate Nemo_CICD_Test check kept failing on GitHub API 502 errors while listing jobs, after all test jobs had passed.

@DongjiGao

Copy link
Copy Markdown
Contributor

/ok to test c1477f4

@github-actions

Copy link
Copy Markdown
Contributor

[🤖]: Hi @vmendelev 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

@DongjiGao
DongjiGao merged commit 079e487 into main Nov 12, 2026
155 checks passed
@DongjiGao
DongjiGao deleted the task/ascend-vllm029-processor-20261107 branch November 12, 2026 18:00
vmendelev added a commit to NVIDIA-NeMo/RL that referenced this pull request Nov 23, 2026
Speech 732041d29 (NVIDIA-NeMo/Speech#16588) adds vLLM 0.29's multimodal
processor hook and keeps refit vocabulary padding on the weight's device.
Both environments use the same Speech commit; the lock changes are limited
to nemo-toolkit.

Signed-off-by: Valentin Mendelev <[email protected]>
vmendelev added a commit to NVIDIA-NeMo/RL that referenced this pull request Dec 2, 2026
Speech 732041d29 (NVIDIA-NeMo/Speech#16588) adds vLLM 0.29's multimodal
processor hook and keeps refit vocabulary padding on the weight's device.
Both environments use the same Speech commit; the lock changes are limited
to nemo-toolkit.

Signed-off-by: Valentin Mendelev <[email protected]>

This branch was previously deployed

2 inactive deployments
public — c1477f44 Deployed Nov 12, 2026 by copy-pr-bot[bot] via release / finalize / publish-docs #2041
test — c1477f44 Deployed Nov 12, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #21692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants