MiDashengLM is an efficient audio-language model that achieves holistic audio understanding through caption-based alignment.
It achieves state-of-the-art performance on multiple audio understanding benchmarks while maintaining high inference efficiency—delivering 3.2× throughput speedup and supporting batch sizes up to 512.
📖 For more detailed introduction and technical report, please visit our
GitHub repository
.
Note that for most applications, we strongly recommend using the BF16 version (
mispeech/midashenglm-7b-1021-bf16
) for optimal performance and efficiency.
Usage
Load Model
from transformers import AutoModelForCausalLM, AutoProcessor, AutoTokenizer
model_id = "mispeech/midashenglm-7b-1021-fp32"# Only for exact reproduction; otherwise strongly recommend "mispeech/midashenglm-7b-1021-bf16"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
Construct Prompt
user_prompt = "Caption the audio."# You may try any other prompt
messages = [
{
"role": "system",
"content": [
{"type": "text", "text": "You are a helpful language and speech assistant."}
],
},
{
"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)
},
],
},
]
midashenglm-7b-1021-fp32 huggingface.co is an AI model on huggingface.co that provides midashenglm-7b-1021-fp32's model effect (), which can be used instantly with this mispeech midashenglm-7b-1021-fp32 model. huggingface.co supports a free trial of the midashenglm-7b-1021-fp32 model, and also provides paid use of the midashenglm-7b-1021-fp32. Support call midashenglm-7b-1021-fp32 model through api, including Node.js, Python, http.
midashenglm-7b-1021-fp32 huggingface.co is an online trial and call api platform, which integrates midashenglm-7b-1021-fp32's modeling effects, including api services, and provides a free online trial of midashenglm-7b-1021-fp32, you can try midashenglm-7b-1021-fp32 online for free by clicking the link below.
mispeech midashenglm-7b-1021-fp32 online free url in huggingface.co:
midashenglm-7b-1021-fp32 is an open source model from GitHub that offers a free installation service, and any user can find midashenglm-7b-1021-fp32 on GitHub to install. At the same time, huggingface.co provides the effect of midashenglm-7b-1021-fp32 install, users can directly use midashenglm-7b-1021-fp32 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
midashenglm-7b-1021-fp32 install url in huggingface.co: