Efficient audio understanding with general audio captions
See the codeFlexible Model Sizes
State-of-the-Art Performance
High Efficiency (MDL-7B)
Caption-based Alignment
Full Transparency
Although MiDashengLM demonstrates superior audio understanding performance and efficiency compared to Qwen2.5-Omni models, we acknowledge Qwen2.5-Omni as a remarkable and respected foundational work in the field. Our 7B model specifically uses Qwen2.5-Omni-7B Thinker as the initialization for decoder training, building upon its robust architecture and weight initialization. The 0.6B variant uses Qwen3-0.6B as the decoder initialization, offering a lightweight alternative for resource-constrained deployment.
The audio encoder is built upon Dasheng, an open-source audio encoder for general audio understanding with state-of-the-art performance. Dasheng serves as the core foundation enabling MiDashengLM's exceptional performance.
MiDashengLM integrates the powerful Dasheng audio encoder with the Qwen2.5-Omni-7B Thinker decoder through a unique caption-based alignment strategy. Unlike conventional ASR-driven approaches, our model leverages general audio captions to capture comprehensive audio representations encompassing speech, environmental sounds, and musical elements in a unified textual format. This design enables holistic audio understanding while maintaining exceptional computational efficiency.
ASR Limitations:
Caption Advantages:
ACAVCaps is a meticulously curated 38,662-hour collection of general audio captions derived from the open-source ACAV100M audio repository. While leveraging ACAV100M's extensive raw audio materials, we completely re-engineered the annotation process to create a dataset for holistic audio understanding. We devide the dataset into six categories:
| Category | Example Caption |
|---|---|
| Pure Speech | "A female voice narrates historical competition with synthetic modulation" |
| Pure Sound | "Outdoor scene with wind, birds, duck quacking and background noise" |
| Pure Music | "Crowd cheering with electronic synthesizer-driven soundscape" |
| Mixed Music | "The audio features a crowd cheering and clapping alongside electronic music with a synthesizer-driven, dark, and energetic soundscape." |
| Mixed Speech | "A Russian voice demonstrates a synthesizer’s capabilities over an experimental electronic backdrop, explaining its sound design and value in a gritty, vocal-fry tone." |
| Mixed Sound | "A man speaks in English about entering a city and village, accompanied by the sounds of a running vehicle." |
The figure below illustrates our data curation pipeline for ACAVCaps:
Each caption is generated through a three-step process:
We will release the ACAVCaps dataset after the ICASSP 2026 review process.
We provide multiple precision / quantization formats to cover different deployment and fine-tuning scenarios:
The 0.6B GGUF models can be deployed on CPU using llama.cpp, or run directly in the browser. See the GGUF model page for instructions, or try the WASM demo (video).
| Variant | Format | Hugging Face (1021) | ModelScope (1021)) |
|---|---|---|---|
| midashenglm-7b | FP32 | Link | Link |
| midashenglm-7b-bf16 | BF16 | Link | Link |
| midashenglm-7b-fp8 | FP8 | Link | Link |
| midashenglm-7b-w4a16-gptq | GPTQ W4A16 | Link | Link |
Usage Guidance:
The full list model variants of MiDashengLM: Hugging Face / Model Scope
from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
# For 7B:
model_id = "mispeech/midashenglm-7b-1021-bf16"
# For 0.6B:
# model_id = "mispeech/midashenglm-0.6b-fp32"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
If you are in a region with limited access to Hugging Face resources, you may want to use hf-mirror as a mirror of Hugging Face:
export HF_ENDPOINT=https://hf-mirror.com
user_prompt = "Caption the audio." # You may try any other prompt
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": user_prompt},
{
"type": "audio",
"path": "/path/to/example.wav",
# or "url": "https://example.com/example.wav"
# or "audio": np.random.randn(16000)
},
],
},
]
import torch
with torch.no_grad():
model_inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
add_special_tokens=True,
return_dict=True,
)
generation = model.generate(**model_inputs)
output = tokenizer.batch_decode(generation, skip_special_tokens=True) # ["An engine is idling."]
We appreciate the ms-swift implementation contributed by @JimmyMa99 in ms-swift#5325.
We also provide MDL-Toolkit, a user-friendly fine-tuning toolkit for MiDashengLM.
vLLM provides a high-performance, user-friendly library for LLM inference and serving.
Install vLLM with pip or from source:
# Set up using Python-only build (without compilation)
git clone https://github.com/vllm-project/vllm.git
cd vllm
VLLM_USE_PRECOMPILED=1 pip install --editable .
# Full build (with compilation)
git clone https://github.com/vllm-project/vllm.git
cd vllm
pip install -e .
You can find sample code for offline execution in the VLLM repository audio_language.
# Offline inference
python3 examples/offline_inference/audio_language.py -m midashenglm
# Online serving using OpenAI-compatible server
python3 -m vllm.entrypoints.openai.api_server --model mispeech/midashenglm-7b --tensor-parallel-size 1 --served-model-name default --port 8000 --dtype float16 --max_model_len 4096 --trust_remote_code
The technical report primarily evaluates the midashenglm-7b-0804-fp32 model, which represents our initial release from August 4, 2025. Note that our current best-performing model is midashenglm-7b-1021, though the technical report has not been updated to include its results. For detailed experimental tables and performance metrics, please refer to the Hugging Face model pages or the technical report.
To reproduce our results, we provide:
pip install -r requirements.txt
Generate responses using the model's official framework with prompts from prompt.csv.
Format model outputs using the example JSONL files:
| Task | Example File |
|---|---|
| Automatic Speech Recognition | MiDashengLM_LibriSpeech_test-clean.jsonl |
| Single-target Audio Tagging | MiDashengLM_NSynth.jsonl |
| Gender Recognition | MiDashengLM_VoxCeleb-Gender.jsonl |
| Multi-target Audio Tagging | MiDashengLM_FSD50K.jsonl |
| Audio Captioning | MiDashengLM_AutoACD.jsonl |
| Open Audio Question Answering | MiDashengLM_MusicQA.jsonl |
| Audio QA with Options | MiDashengLM_MuChoMusic.jsonl |
Execute the corresponding evaluation scripts:
# Automatic Speech Recognition (WER)
# Uses: lang, text, model_output
python evaluate/wer/compute_wer.py -i evaluate/jsonl/MiDashengLM_LibriSpeech_test-clean.jsonl
# Single-target Audio Tagging (ACC)
# Uses: label, model_output
python evaluate/compute_at_acc.py -i evaluate/jsonl/MiDashengLM_NSynth.jsonl
# Gender Recognition (ACC)
# Uses: label, model_output
python evaluate/compute_gender_acc.py -i evaluate/jsonl/MiDashengLM_VoxCeleb-Gender.jsonl
# Multi-target Audio Tagging (mAP)
# Uses: dataset_name, label, model_output, model_name
python evaluate/compute_map.py -i evaluate/jsonl/MiDashengLM_FSD50K.jsonl
# Audio Captioning (FENSE)
# Uses: audio, text, model_output
python evaluate/compute_fense.py -i evaluate/jsonl/MiDashengLM_AutoACD.jsonl
# Open Audio QA (FENSE)
# Uses: audio, answer, model_output
python evaluate/compute_fense.py -i evaluate/jsonl/MiDashengLM_MusicQA.jsonl
# Audio QA with Options (ACC)
# Uses: answer, model_output
python evaluate/compute_qa_acc.py -i evaluate/jsonl/MiDashengLM_MuChoMusic.jsonl
Please refer to the official repositories for evaluation on the MECAT and MMAU benchmarks.
MiDashengLM-7B demonstrates superior inference efficiency compared to Qwen2.5-Omni-7B, achieving 3.2× speedup at comparable batch sizes and an overall potential speedup of 20.2× with larger batches.
| Batch Size | MiDashengLM-7B (samples/s) | Qwen2.5-Omni-7B (samples/s) | Speedup |
|---|---|---|---|
| 1 | 0.45 | 0.36 | 1.25x |
| 4 | 1.40 | 0.91 | 1.53x |
| 8 | 2.72 | 1.15 | 2.36x |
| 16 | 5.18 | OOM | - |
| 32 | 9.78 | OOM | - |
| 64 | 17.07 | OOM | - |
| 128 | 22.73 | OOM | - |
| 200 | 25.15 | OOM | - |
Tested on 80GB GPU with 30s audio, 100-token output.
MiDashengLM is under the Apache License 2.0, and we encourage its use in both research and business applications.
If you find MiDashengLM useful in your research, please consider citing our work:
@techreport{midashenglm7b,
title = {MiDashengLM: Efficient Audio Understanding with General Audio Captions},
author = {{Horizon Team, MiLM Plus}},
institution= {Xiaomi Inc.},
year = {2025},
note = {Contributors: Heinrich Dinkel et al. (listed alphabetically in Appendix B)},
url = {https://arxiv.org/abs/2508.03983},
eprint = {2508.03983},
}
439 followers · starred Aug 2025
254 followers · starred Aug 2025
971 followers · starred Aug 2025
706 followers · starred Aug 2025
Efficient audio understanding with general audio captions
See the codeFlexible Model Sizes
State-of-the-Art Performance
High Efficiency (MDL-7B)
Caption-based Alignment
Full Transparency
Although MiDashengLM demonstrates superior audio understanding performance and efficiency compared to Qwen2.5-Omni models, we acknowledge Qwen2.5-Omni as a remarkable and respected foundational work in the field. Our 7B model specifically uses Qwen2.5-Omni-7B Thinker as the initialization for decoder training, building upon its robust architecture and weight initialization. The 0.6B variant uses Qwen3-0.6B as the decoder initialization, offering a lightweight alternative for resource-constrained deployment.
The audio encoder is built upon Dasheng, an open-source audio encoder for general audio understanding with state-of-the-art performance. Dasheng serves as the core foundation enabling MiDashengLM's exceptional performance.
MiDashengLM integrates the powerful Dasheng audio encoder with the Qwen2.5-Omni-7B Thinker decoder through a unique caption-based alignment strategy. Unlike conventional ASR-driven approaches, our model leverages general audio captions to capture comprehensive audio representations encompassing speech, environmental sounds, and musical elements in a unified textual format. This design enables holistic audio understanding while maintaining exceptional computational efficiency.
ASR Limitations:
Caption Advantages:
ACAVCaps is a meticulously curated 38,662-hour collection of general audio captions derived from the open-source ACAV100M audio repository. While leveraging ACAV100M's extensive raw audio materials, we completely re-engineered the annotation process to create a dataset for holistic audio understanding. We devide the dataset into six categories:
| Category | Example Caption |
|---|---|
| Pure Speech | "A female voice narrates historical competition with synthetic modulation" |
| Pure Sound | "Outdoor scene with wind, birds, duck quacking and background noise" |
| Pure Music | "Crowd cheering with electronic synthesizer-driven soundscape" |
| Mixed Music | "The audio features a crowd cheering and clapping alongside electronic music with a synthesizer-driven, dark, and energetic soundscape." |
| Mixed Speech | "A Russian voice demonstrates a synthesizer’s capabilities over an experimental electronic backdrop, explaining its sound design and value in a gritty, vocal-fry tone." |
| Mixed Sound | "A man speaks in English about entering a city and village, accompanied by the sounds of a running vehicle." |
The figure below illustrates our data curation pipeline for ACAVCaps:
Each caption is generated through a three-step process:
We will release the ACAVCaps dataset after the ICASSP 2026 review process.
We provide multiple precision / quantization formats to cover different deployment and fine-tuning scenarios:
The 0.6B GGUF models can be deployed on CPU using llama.cpp, or run directly in the browser. See the GGUF model page for instructions, or try the WASM demo (video).
| Variant | Format | Hugging Face (1021) | ModelScope (1021)) |
|---|---|---|---|
| midashenglm-7b | FP32 | Link | Link |
| midashenglm-7b-bf16 | BF16 | Link | Link |
| midashenglm-7b-fp8 | FP8 | Link | Link |
| midashenglm-7b-w4a16-gptq | GPTQ W4A16 | Link | Link |
Usage Guidance:
The full list model variants of MiDashengLM: Hugging Face / Model Scope
from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
# For 7B:
model_id = "mispeech/midashenglm-7b-1021-bf16"
# For 0.6B:
# model_id = "mispeech/midashenglm-0.6b-fp32"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
If you are in a region with limited access to Hugging Face resources, you may want to use hf-mirror as a mirror of Hugging Face:
export HF_ENDPOINT=https://hf-mirror.com
user_prompt = "Caption the audio." # You may try any other prompt
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": user_prompt},
{
"type": "audio",
"path": "/path/to/example.wav",
# or "url": "https://example.com/example.wav"
# or "audio": np.random.randn(16000)
},
],
},
]
import torch
with torch.no_grad():
model_inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
add_special_tokens=True,
return_dict=True,
)
generation = model.generate(**model_inputs)
output = tokenizer.batch_decode(generation, skip_special_tokens=True) # ["An engine is idling."]
We appreciate the ms-swift implementation contributed by @JimmyMa99 in ms-swift#5325.
We also provide MDL-Toolkit, a user-friendly fine-tuning toolkit for MiDashengLM.
vLLM provides a high-performance, user-friendly library for LLM inference and serving.
Install vLLM with pip or from source:
# Set up using Python-only build (without compilation)
git clone https://github.com/vllm-project/vllm.git
cd vllm
VLLM_USE_PRECOMPILED=1 pip install --editable .
# Full build (with compilation)
git clone https://github.com/vllm-project/vllm.git
cd vllm
pip install -e .
You can find sample code for offline execution in the VLLM repository audio_language.
# Offline inference
python3 examples/offline_inference/audio_language.py -m midashenglm
# Online serving using OpenAI-compatible server
python3 -m vllm.entrypoints.openai.api_server --model mispeech/midashenglm-7b --tensor-parallel-size 1 --served-model-name default --port 8000 --dtype float16 --max_model_len 4096 --trust_remote_code
The technical report primarily evaluates the midashenglm-7b-0804-fp32 model, which represents our initial release from August 4, 2025. Note that our current best-performing model is midashenglm-7b-1021, though the technical report has not been updated to include its results. For detailed experimental tables and performance metrics, please refer to the Hugging Face model pages or the technical report.
To reproduce our results, we provide:
pip install -r requirements.txt
Generate responses using the model's official framework with prompts from prompt.csv.
Format model outputs using the example JSONL files:
| Task | Example File |
|---|---|
| Automatic Speech Recognition | MiDashengLM_LibriSpeech_test-clean.jsonl |
| Single-target Audio Tagging | MiDashengLM_NSynth.jsonl |
| Gender Recognition | MiDashengLM_VoxCeleb-Gender.jsonl |
| Multi-target Audio Tagging | MiDashengLM_FSD50K.jsonl |
| Audio Captioning | MiDashengLM_AutoACD.jsonl |
| Open Audio Question Answering | MiDashengLM_MusicQA.jsonl |
| Audio QA with Options | MiDashengLM_MuChoMusic.jsonl |
Execute the corresponding evaluation scripts:
# Automatic Speech Recognition (WER)
# Uses: lang, text, model_output
python evaluate/wer/compute_wer.py -i evaluate/jsonl/MiDashengLM_LibriSpeech_test-clean.jsonl
# Single-target Audio Tagging (ACC)
# Uses: label, model_output
python evaluate/compute_at_acc.py -i evaluate/jsonl/MiDashengLM_NSynth.jsonl
# Gender Recognition (ACC)
# Uses: label, model_output
python evaluate/compute_gender_acc.py -i evaluate/jsonl/MiDashengLM_VoxCeleb-Gender.jsonl
# Multi-target Audio Tagging (mAP)
# Uses: dataset_name, label, model_output, model_name
python evaluate/compute_map.py -i evaluate/jsonl/MiDashengLM_FSD50K.jsonl
# Audio Captioning (FENSE)
# Uses: audio, text, model_output
python evaluate/compute_fense.py -i evaluate/jsonl/MiDashengLM_AutoACD.jsonl
# Open Audio QA (FENSE)
# Uses: audio, answer, model_output
python evaluate/compute_fense.py -i evaluate/jsonl/MiDashengLM_MusicQA.jsonl
# Audio QA with Options (ACC)
# Uses: answer, model_output
python evaluate/compute_qa_acc.py -i evaluate/jsonl/MiDashengLM_MuChoMusic.jsonl
Please refer to the official repositories for evaluation on the MECAT and MMAU benchmarks.
MiDashengLM-7B demonstrates superior inference efficiency compared to Qwen2.5-Omni-7B, achieving 3.2× speedup at comparable batch sizes and an overall potential speedup of 20.2× with larger batches.
| Batch Size | MiDashengLM-7B (samples/s) | Qwen2.5-Omni-7B (samples/s) | Speedup |
|---|---|---|---|
| 1 | 0.45 | 0.36 | 1.25x |
| 4 | 1.40 | 0.91 | 1.53x |
| 8 | 2.72 | 1.15 | 2.36x |
| 16 | 5.18 | OOM | - |
| 32 | 9.78 | OOM | - |
| 64 | 17.07 | OOM | - |
| 128 | 22.73 | OOM | - |
| 200 | 25.15 | OOM | - |
Tested on 80GB GPU with 30s audio, 100-token output.
MiDashengLM is under the Apache License 2.0, and we encourage its use in both research and business applications.
If you find MiDashengLM useful in your research, please consider citing our work:
@techreport{midashenglm7b,
title = {MiDashengLM: Efficient Audio Understanding with General Audio Captions},
author = {{Horizon Team, MiLM Plus}},
institution= {Xiaomi Inc.},
year = {2025},
note = {Contributors: Heinrich Dinkel et al. (listed alphabetically in Appendix B)},
url = {https://arxiv.org/abs/2508.03983},
eprint = {2508.03983},
}
439 followers · starred Aug 2025
254 followers · starred Aug 2025
971 followers · starred Aug 2025
706 followers · starred Aug 2025