fix(template): support MiMo audio inputs - #9891
Conversation
Render the official MiMo audio placeholder sequence for vLLM and SGLang while preserving raw audio for backend processing. Reject unsupported inference backends explicitly and protect the audio placeholder during truncation. Test: python tests/run.py --test_dir tests/general --pattern test_mimo_template.py
|
CI note: all three MiMo audio regression tests pass in the CUDA run:
The run's only error is the repository-wide Lint and the NPU unittest pass. |
|
@z0o0ey, could you take a look when convenient? This is a focused follow-up The change only adds the official MiMo audio placeholder sequence, preserves |
PR type
PR information
MiMo-V2.5 is registered as an audio-capable model, and its official chat
template represents audio with:
However,
MiMoV2Template.replace_tag()accepted only image and video tags.Any SWIFT request containing
<audio>therefore failed before reaching theinference backend. In environments without
qwen_vl_utils, the audio pathalso attempted an unrelated vision import first.
This change:
<|audio_pad|>when prompt truncation is enabled;MiMo support scope introduced by support Xiaomi-MiMo-V2.5 inference( sglang / vllm ) #9880;
Experiment results
Before:
After: