[Model] Voxtral Realtime: add support for CUDAGraphMode.FULL_DECODE_ONLY (#51167)

Signed-off-by: NickLucche <nicolo.lucchesi@mistral.ai>
Co-authored-by: Jorge Gallego Feliciano <jorge.gallego@mistral.ai>
This commit is contained in:
Nicolò Lucchesi
2026-09-14 19:16:39 +00:00
committed by GitHub
co-authored by Jorge Gallego Feliciano
parent 0a5747d410
commit 995e8581f4
3 changed files with 174 additions and 62 deletions
@@ -217,9 +217,15 @@ class VoxtralRealtimeGeneration(VoxtralForConditionalGeneration, SupportsRealtim
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__(vllm_config=vllm_config, prefix=prefix)
assert (
not vllm_config.compilation_config.cudagraph_mode.has_full_cudagraphs()
), "Voxtral realtime doesn't support full cudagraphs yet. Please use PIECEWISE."
# Full cudagraphs are supported for decode-only batches (the encoder's
# block-pooling attention builder is capture-safe for uniform
# single-token decode). Mixed/prefill batches are not, so block only
# pure FULL; FULL_DECODE_ONLY and FULL_AND_PIECEWISE are allowed.
cudagraph_mode = vllm_config.compilation_config.cudagraph_mode
assert not cudagraph_mode.mixed_mode().has_full_cudagraphs(), (
"Voxtral realtime supports full cudagraphs for decode-only batches. "
"Use cudagraph_mode=FULL_DECODE_ONLY or FULL_AND_PIECEWISE (not FULL)."
)
self.time_embedding: TimeEmbedding = TimeEmbedding(
dim=self.config.text_config.hidden_size