@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 1100a97621
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 08:45 UTC

[Voxstral Realtime] Enable tests (#33803)

Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>

Patrick von Platen committed Feb 12, 2026 at 18:43 UTC 1100a97621ebbf226488268f47d0252b789276e6
5 files changed +22 -18
tests/entrypoints/openai/test_realtime_validation.py
+1 -11
@@ -27,15 +27,6 @@ MISTRAL_FORMAT_ARGS = [
27 MODEL_NAME = "mistralai/Voxtral-Mini-4B-Realtime-2602"
28
29
30 -def _audio_to_base64_pcm16(path: str, target_sr: int = 16000) -> str:
31 - """Load audio file, convert to PCM16 @ target sample rate, base64 encode."""
32 - audio, _ = librosa.load(path, sr=target_sr, mono=True)
33 - # Convert float32 [-1, 1] to int16 [-32768, 32767]
34 - audio_int16 = (audio * 32767).astype(np.int16)
35 - audio_bytes = audio_int16.tobytes()
36 - return base64.b64encode(audio_bytes).decode("utf-8")
37 -
38 -
30 def _get_websocket_url(server: RemoteOpenAIServer) -> str:
31 """Convert HTTP URL to WebSocket URL for realtime endpoint."""
32 http_url = server.url_root
@@ -74,12 +65,11 @@ def mary_had_lamb_audio_chunks() -> list[str]:
65
66 @pytest.mark.asyncio
67 @pytest.mark.parametrize("model_name", [MODEL_NAME])
77 -@pytest.mark.skip(reason="Voxtral streaming is not yet public")
68 async def test_multi_chunk_streaming(
69 model_name, mary_had_lamb_audio_chunks, rocm_aiter_fa_attention
70 ):
71 """Test streaming multiple audio chunks before committing."""
82 - server_args = ["--enforce-eager"]
72 + server_args = ["--enforce-eager", "--max-model-len", "2048"]
73
74 if model_name.startswith("mistralai"):
75 server_args += MISTRAL_FORMAT_ARGS
tests/models/multimodal/generation/test_voxtral_realtime.py
-2
@@ -73,7 +73,6 @@ def async_engine() -> AsyncLLM:
73 return AsyncLLM.from_engine_args(engine_args)
74
75
76 -@pytest.mark.skip(reason="Voxtral streaming is not yet public")
76 def test_voxtral_realtime_forward(audio_assets, tokenizer, engine):
77 audio_config = tokenizer.instruct_tokenizer.tokenizer.audio
78
@@ -218,7 +217,6 @@ class RealTimeAudioInput:
217
218
219 @pytest.mark.asyncio
221 -@pytest.mark.skip(reason="Voxtral streaming is not yet public")
220 async def test_voxtral_realtime_generator(audio_assets, tokenizer, async_engine):
221 sampling_params = SamplingParams(temperature=0.0, max_tokens=1)
222
tests/models/multimodal/processing/test_common.py
+7
@@ -441,6 +441,13 @@ def test_processing_correctness(
441 "Qwen-VL tokenizer requires downloading a font file from "
442 "servers that often refuse connections in CI"
443 )
444 + if model_id == "mistralai/Voxtral-Mini-4B-Realtime-2602":
445 + pytest.skip(
446 + "Voxtral Realtime doesn't make use of any place-holder"
447 + "tokens and hence cannot pass the processing "
448 + "correctness test as is. Let's revisit adapting this "
449 + "test once more realtime models exist."
450 + )
451 if model_id == "internlm/Intern-S1-Pro":
452 # FIXME(Isotr0py): Fix later.
453 pytest.skip("Tokenization issue. Fix later")
tests/models/registry.py
+4 -5
@@ -1031,13 +1031,12 @@ _MULTIMODAL_EXAMPLE_MODELS = {
1031 ),
1032 "VoxtralForConditionalGeneration": _HfExamplesInfo(
1033 "mistralai/Voxtral-Mini-3B-2507",
1034 - # disable this temporarily until we support HF format
1035 - is_available_online=False,
1034 + tokenizer_mode="mistral",
1035 ),
1036 "VoxtralRealtimeGeneration": _HfExamplesInfo(
1038 - "<place-holder>",
1039 - # disable this temporarily until we support HF format
1040 - is_available_online=False,
1037 + "mistralai/Voxtral-Mini-4B-Realtime-2602",
1038 + enforce_eager=True,
1039 + tokenizer_mode="mistral",
1040 ),
1041 # [Encoder-decoder]
1042 "NemotronParseForConditionalGeneration": _HfExamplesInfo(
vllm/model_executor/models/voxtral.py
+10
@@ -54,6 +54,7 @@ from vllm.multimodal.processing.processor import (
54 BaseMultiModalProcessor,
55 BaseProcessingInfo,
56 MultiModalProcessingInfo,
57 + PlaceholderFeaturesInfo,
58 PromptReplacement,
59 PromptUpdate,
60 )
@@ -283,6 +284,15 @@ class VoxtralMultiModalProcessor(BaseMultiModalProcessor[VoxtralProcessingInfo])
284 ) -> Mapping[str, MultiModalFieldConfig]:
285 return dict(audio_arrays=MultiModalFieldConfig.batched("audio"))
286
287 + def _validate_mm_placeholders(
288 + self,
289 + mm_placeholders: Mapping[str, list[PlaceholderFeaturesInfo]],
290 + mm_item_counts: Mapping[str, int],
291 + ) -> None:
292 + # mistral_common's tokenizer's does not follow HF's placeholder norms
293 + # skip validation here
294 + ...
295 +
296 def _get_prompt_updates(
297 self,
298 mm_items: MultiModalDataItems,