Skip to content

Support Voxtral audio generation in the Transformers backend - #49958

Draft
harshaljanjani wants to merge 2 commits into
vllm-project:mainfrom
harshaljanjani:feat/voxtral-transformers-backend
Draft

Support Voxtral audio generation in the Transformers backend#49958
harshaljanjani wants to merge 2 commits into
vllm-project:mainfrom
harshaljanjani:feat/voxtral-transformers-backend

Conversation

@harshaljanjani

@harshaljanjani harshaljanjani commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Blocked by the companion Transformers PR making VoxtralProcessor.__call__ audio-capable.
→ Enables Voxtral audio generation through the Transformers backend (--model-impl transformers) currently XFAILed. Stops forwarding tokenizer to MistralCommonBackend (rejects the kwarg), and forces the HF config and weights (not Mistral's params.json / consolidated) when the backend is explicitly requested.
Verified no regressions on the vLLM-side with tests/models/multimodal/processing/test_transformers_audio.py (Voxtral un-XFAILed) and tests/models/multimodal/generation/test_transformers_audio.py (Voxtral added, matches HF via check_logprobs_close); full audio suite green.
→ I've tried to explain why each non-trivial change was made in a one-line comment given much of this involved unwrapping failure modes layer by layer and uncovering deeper issues in the call chain :)

cc: @hmellor

Before (vLLM Voxtral Generation)


After (vLLM Voxtral Generation)


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: Harshal Janjani <harshaljanjani@gmail.com>
@harshaljanjani

Copy link
Copy Markdown
Contributor Author

Keeping this as a draft for now until the Transformers-side PR is merged; looking forward to the reviews!

Comment thread vllm/config/model.py Outdated
):
raise ValueError("cumem allocator is not supported on current platform.")

# The Transformers backend needs the HF config, not Mistral's params.json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it? Transformers supports mistral-common

@harshaljanjani harshaljanjani Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does and the tokenizer loads fine either way, but this due to the model config. As in if we keep config_format=auto it resolves to mistral for Voxtral (ships params.json), and adapt_config_dict gives the backend a generic PreTrainedConfig. AutoModel.from_config resolves by config class not model type, so even with model_type=voxtral and architectures=['VoxtralForConditionalGeneration'] present (left the instrumentation in the screenshot, in_model_mapping=False) we hit the ValueError. Definitely could've been clearer with the comments though, made edits!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok so would I be right in saying that:

  • This forces vLLM to use the HF config
  • Then HF may load the Mistral config inside a HF class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So yes this forces vLLM to use the HF config, and tmk no there isn't a scenario where it can fall back to the Mistral here, the reason being that Voxtral ships both an HF config.json and a Mistral params.json and the PR just swaps which one we read (auto reads params.json and gives PreTrainedConfig; HF reads config.json and gives VoxtralConfig). The forced path only ever fetches config.json and Transformers only reads params.json in its offline convert scripts, not at load time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For the config sure, but for the tokenizers/processors Transformers will wrap the classes in mistral-common if it is installed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In that case yup it's AutoProcessor gives VoxtralProcessor with a MistralCommonBackend tokenizer and we leave that untouched here, we only pin the config/weights to HF and the processor stays on mistral-common. If the comment reads more broadly than intended (the config) I'm happy to reword it :)

@hmellor hmellor changed the title feat[vLLM × v5]: Support Voxtral audio generation in the Transformers backend Support Voxtral audio generation in the Transformers backend Jul 27, 2026
Signed-off-by: Harshal Janjani <harshaljanjani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mistral Related to Mistral models multi-modality Related to multi-modality (#4194)

Projects

Development

Successfully merging this pull request may close these issues.

2 participants