Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"gpu_memory_utilization": 0.85,
},
},
"mistralai/Voxtral-Mini-3B-2507": {
"prompt": ("[INST][AUDIO]What can you tell me about this audio?[/INST]"),
},
"microsoft/VibeVoice-ASR-HF": {
"prompt": (
"<|im_start|>system\n"
Expand Down
13 changes: 1 addition & 12 deletions tests/models/multimodal/processing/test_transformers_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,7 @@
[
"ibm-granite/granite-speech-3.3-2b",
"nvidia/audio-flamingo-3-hf",
pytest.param(
"mistralai/Voxtral-Mini-3B-2507",
marks=pytest.mark.xfail(
reason="MistralCommonBackend.encode does not produce the audio "
"placeholder token (ID 24) from raw text. apply_chat_template "
"yields token IDs with placeholders, but MultiModalProcessor."
"apply() decodes the prompt back to text and re-tokenizes, at "
"which point the placeholders are lost. Fix belongs in "
"mistral_common or in the Voxtral-specific path.",
strict=False,
),
),
"mistralai/Voxtral-Mini-3B-2507",
"microsoft/VibeVoice-ASR-HF",
"zai-org/GLM-ASR-Nano-2512",
],
Expand Down
4 changes: 4 additions & 0 deletions vllm/config/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ def __post_init__(
):
raise ValueError("cumem allocator is not supported on current platform.")

# AutoModel.from_config resolves by class, needs typed HF config not params.json
if self.model_impl == "transformers" and self.config_format == "auto":
self.config_format = "hf"

hf_config = get_config(
self.hf_config_path or self.model,
self.trust_remote_code,
Expand Down
7 changes: 7 additions & 0 deletions vllm/config/vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,13 @@ def try_verify_and_update_config(self):
f"Model: {self.model_config.model}"
)

# Mistral's consolidated weight names don't map to HF modules; use HF weights
if (
self.model_config.model_impl == "transformers"
and self.load_config.load_format == "auto"
):
self.load_config.load_format = "hf"

def compile_debug_dump_path(self) -> Path | None:
"""Returns a rank-aware path for dumping
torch.compile debug information.
Expand Down
12 changes: 8 additions & 4 deletions vllm/multimodal/processing/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,21 @@ def get_hf_processor(

typ = ProcessorMixin

tokenizer = self.tokenizer
if is_mistral_tokenizer(tokenizer):
tokenizer = tokenizer.transformers_tokenizer # type: ignore[union-attr]
from transformers import MistralCommonBackend

tokenizer = self.tokenizer
merged_kwargs = self.get_merged_mm_kwargs(kwargs)
merged_kwargs.pop("tokenizer", None)

# `MistralCommonBackend` rejects a forwarded `tokenizer` kwarg
if not is_mistral_tokenizer(tokenizer) and not isinstance(
tokenizer, MistralCommonBackend
):
merged_kwargs["tokenizer"] = tokenizer

return cached_processor_from_config(
self.model_config,
processor_cls=typ,
tokenizer=tokenizer,
**merged_kwargs,
)

Expand Down
Loading