Repository navigation
[Model] Add transcription to the Transformers modeling backend - #65735
Conversation
Serve /v1/audio/transcriptions, including diarized_json, for Transformers speech models through a new TransformersMultiModalForTranscription class. Prompts come from HF's apply_transcription_request and outputs from the processor's decode return formats. post_process_output and parse_diarized_transcript now take model_config so the backend can reach the processor, and parse_diarized_transcript gets the raw output. Audio processors that do not truncate (e.g. VibeVoice-ASR) were limited to their config's max_position_embeddings, which for VibeVoice is the tokens in one 60 s encoder chunk. Read truncation/max_length from the audio processor instead (falling back to n_samples/nb_max_samples until huggingface/transformers#44394 lands). With no cap, bound audio by the context length and profile with one dummy audio of that size. Select ragged per-item fields as a batch of one tensor, which crashed different-length audios in one batch, and allow the sync in that path. Replaces vllm-project#62398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
Documentation preview: https://vllm--65735.org.readthedocs.build/en/65735/ |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Parse each chunk's raw output on its own and shift its timestamps by the chunk offset, so serving needs no second list of raw text and diarization works for models that split audio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…yncs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Sizing every uncapped audio model by the context length stopped Granite Speech starting on small GPUs. Keep the previous budget unless the processor has apply_transcription_request and does not truncate, and cap those models at one hour, which the audio limit can change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
The speech model mapping gave Granite Speech a class it could not use and left out GLM-ASR and Audio Flamingo 3. Check the processor class instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
vLLM's Qwen3ASRConfig replaced the Transformers config for every qwen3_asr checkpoint, which dropped the audio_config of Transformers-format ones. Keep it for native checkpoints only. Measure the audio token limit of transcription models from the processor, as Qwen3-ASR's config limit is per encoder window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
Thanks @hmellor, this covers everything #62398 was for. I ran the evaluation from #62398 against this PR (head
Accuracy and diarization are on par in every set, including single-pass long audio. Three notes:
|
Pass `strip_prefix` to the processor's `decode` when it is supported. Part of vllm-project#65735, which replaces vllm-project#62398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Part of the Qwen3-ASR config port for vllm-project#65735, which replaces vllm-project#62398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Part of the Qwen3-ASR config port for vllm-project#65735, which replaces vllm-project#62398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Part of the Qwen3-ASR config port for vllm-project#65735, which replaces vllm-project#62398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…6097 vllm-project#66097 deletes the vendored config, so both checkpoint formats use the upstream class and this branch no longer needs to choose between them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
The class check only sees processors in Transformers, so a custom processor with `apply_transcription_request` never reached the transcription class. Load it when remote code is trusted, as nothing else exposes its class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…ackend `n_samples` was read as a limit, but MOSS and Qwen3-ASR split longer audio into windows of it, so the server cut MOSS recordings at 30 s and speaker labels restarted. Check whether long audios stop adding tokens instead. That needs the windows of one audio to stay together, which also fixes audio over 30 s crashing the multimodal processor for GLM-ASR and Audio Flamingo 3. Checkpoint output limits are now skipped for unchunked audio, as 512 tokens cut Qwen3-ASR short, and HF-format MOSS keeps the upstream config so it loads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
It was added because the Transformers backend chunked MOSS by mistake. No diarizing model chunks, so parse the raw output as a whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
This pull request has merge conflicts that must be resolved before it can be |
Also pass `processor_cls` so the remote code load shares its cache entry with the bare load in `cached_get_processor_without_dynamic_kwargs`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
|
/ci run |
|
❌ This PR is 136 commits behind upstream |
…d-audio Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> # Conflicts: # vllm/model_executor/models/interfaces.py # vllm/model_executor/models/moss_transcribe_diarize.py
|
/ci run |
|
✅ Triggered Buildkite CI #101068 for commit |
|
Checked that pre-commit passes locally on the PR head (4ac5a05), running |
Overview
Adds
/v1/audio/transcriptionsto the Transformers modeling backend, so VibeVoice-ASR is served without the native implementation in #62398. Needs Transformers 5.23 fortokenizeonapply_transcription_request(huggingface/transformers#49944), and huggingface/transformers#50417 for the sync check, so it stays a draft until those are released.Claims
TransformersMultiModalForTranscription, selected when the HF processor class hasapply_transcription_request, servesjson,textanddiarized_json. Also checked through the API: GLM-ASR, Audio Flamingo 3 andQwen/Qwen3-ASR-1.7B-hftranscribe, and Granite Speech has no endpoint.post_process_outputandparse_diarized_transcriptnow takemodel_config, and the latter parses each chunk's raw output, with timestamps shifted by the chunk offset.--limit-mm-per-promptchanges it), and other audio models keep their budget.padding_maskstays on the CPU so that path passesVLLM_GPU_SYNC_CHECK=errorwith [Bugfix][Model Runner V2] Restore multimodal draft capability detection #50417.Validation
B200, bf16, Transformers 5.23.0.dev0. Native numbers are from #62398 on different hardware. The long clips differ: here it is plain WER on 40 min of concatenated LibriSpeech.
Noise: the backend keeps HF's default VAE sampling, which gave 2.03 % and 2.08 % across two seeds through
LLMbefore this rebase. With that default, 5 min at the default limits gave 2.35 %, and 40 min with the three audio limits raised gave 1.58 % at--max-model-len 32768, on this PR's code applied to9b34fec.--pipeline-parallel-size 2gave 2.48 % on 20 LibriSpeech utterances and 2.47 % on 5 min. A LoRA adapter on the text model loads and changes the output, and a zero adapter leaves it unchanged. VoxPopuli-de, cpWER, 60 min,vllm bench serveand TP from #62398 were not rerun.All pass (86 passed, 1 xfailed).
test_transformers_audio_mixed_lengthsfails without the fix withAttributeError: 'list' object has no attribute 'sum'. NativeQwen/Qwen3-ASR-1.7Bstill transcribes.MossAudioModelinitialization fails with and without this PR. The tests needing 5.23 skip in CI until the pin is bumped.Details
get_num_audio_tokens).languageis accepted but unused.translateraises aValueError, as in [Model][Frontend] Add native VibeVoice-ASR with transcription API support #62398.diarized_jsonneeds VibeVoice's or MOSS's segment format, so other models get a 400.Qwen/Qwen3-ASR-1.7B-hfstays on the native class by default and uses this backend with--model-impl transformers.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