Add vllm support for nemo speechlm#15520
Open
DongjiGao wants to merge 3 commits intoNVIDIA-NeMo:mainfrom
Open
Conversation
added 3 commits
March 17, 2026 17:24
Add vLLM plugin that enables fast inference for NeMo Speech LM models (encoder + projection + LLM) via vLLM's PagedAttention and continuous batching engine. Files: - nemo/collections/speechlm2/vllm/__init__.py: package marker - nemo/collections/speechlm2/vllm/nemotron_v3/__init__.py: plugin registration (config, model, NemotronH patch) - nemo/collections/speechlm2/vllm/nemotron_v3/config.py: NeMoSpeechLMConfig (wraps text_config from LLM backbone) - nemo/collections/speechlm2/vllm/nemotron_v3/model.py: NeMoSpeechLMForConditionalGeneration (NeMo encoder + vLLM LLM) - pyproject.toml: register vllm.general_plugins entry point Validated on Open ASR Leaderboard (8 datasets, 82K samples): WER matches NeMo checkpoint within 0.1%. Signed-off-by: Dongji Gao <dongjig@draco-oci-login-03.cm.cluster>
- Add Apache 2.0 license headers to all plugin files - Add docstrings to all public classes and register() - Remove unused imports (nullcontext, init_logger) - Run black (line_length=119) and isort formatting Signed-off-by: Dongji Gao <dongjig@draco-oci-login-03.cm.cluster>
Tests config creation, special token handling, plugin registration, and audio encoder forward pass with dummy audio. No model weights required; GPU needed only for the perception forward test. All 10 tests pass. Signed-off-by: Dongji Gao <dongjig@draco-oci-login-03.cm.cluster>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add a vLLM plugin that enables fast inference serving for NeMo Speech LM models (speech encoder + projection + LLM backbone) using vLLM's PagedAttention and continuous batching engine.
Collection: speechlm2
Change log
nemo/collections/speechlm2/vllm/nemotron_v3/plugin package:config.py:NeMoSpeechLMConfigwrapping LLM backbone's text config with NeMo speech fieldsmodel.py:NeMoSpeechLMForConditionalGenerationcombining NeMo AudioPerceptionModule with vLLM-native LLM__init__.py: plugin registration viavllm.general_pluginsentry pointvllm.general_pluginsentry point inpyproject.tomltests/collections/speechlm2/test_vllm_plugin.py(10 tests, including GPU forward pass)Usage
Evaluation Results
Open ASR Leaderboard, Nemotron-Nano-v3 + Canary-v2 (30B MoE), A100-80GB. WER computed at corpus level with jiwer + whisper
EnglishTextNormalizer(hf_leaderboard mode), same method as NeMo checkpoint evaluation.WER Comparison (NeMo checkpoint vs vLLM, BS=32, 32 GPUs)
All within 0.1%. NeMo WER recomputed with identical method matches the reported checkpoint summary exactly.
Throughput (WER / RTFx per batch size, 32 GPUs)
WER is consistent across batch sizes. BS=32 recommended for maximum throughput.
Before your PR is "Ready for review"
Pre checks:
PR Type:
Additional Information
speechlm2collectionns generate --num_chunks N), not DP/EP