Voxtral Mini 3B 2507 Transformers
Voxtral Mini是基于Ministral 3B的增强版本,具备先进的音频输入能力,在语音转录、翻译和音频理解等方面表现出色。
下载量 416
发布时间 : 7/18/2025
模型简介
Voxtral Mini是一个结合文本和音频处理能力的多模态模型,保留了Ministral 3B的文本处理能力,同时增加了强大的音频理解功能。
模型特点
专用转录模式
可以在纯语音转录模式下运行,自动识别源音频语言并进行文本转录
长上下文处理
支持32k标记的上下文长度,可处理长达30-40分钟的音频
内置问答和摘要功能
支持直接通过音频提问并生成结构化摘要,无需单独的ASR和语言模型
原生多语言支持
自动检测并支持8种主要语言的音频处理
语音直接调用功能
能够根据语音意图直接触发后端功能、工作流或API调用
模型能力
语音转录
音频理解
多语言支持
长音频处理
文本生成
问答系统
摘要生成
多轮对话
使用案例
语音处理
会议记录转录
将长达30分钟的会议录音自动转录为文字
高准确率的转录文本
多语言语音翻译
将一种语言的语音实时翻译为另一种语言的文本
支持8种主要语言的互译
音频分析
音频内容理解
直接对音频内容提问并获取答案
无需先转录即可理解音频内容
音频摘要生成
分析长音频并生成结构化摘要
节省人工整理时间
🚀 Voxtral Mini 3B - 2507(Transformers版本)
Voxtral Mini是基于Ministral 3B的增强版本,它在保留一流文本处理性能的同时,融入了先进的音频输入能力。该模型在语音转录、翻译和音频理解等方面表现出色。
你可以在我们的博客文章中了解更多关于Voxtral的信息。
✨ 主要特性
Voxtral在Ministral - 3B的基础上,具备强大的音频理解能力:
- 专用转录模式:Voxtral可以在纯语音转录模式下运行,以实现最佳性能。默认情况下,Voxtral会自动识别源音频语言,并相应地进行文本转录。
- 长上下文处理:拥有32k的标记上下文长度,Voxtral能够处理长达30分钟的音频进行转录,或40分钟的音频进行理解。
- 内置问答和摘要功能:支持直接通过音频提问。可以分析音频并生成结构化摘要,无需单独的自动语音识别(ASR)和语言模型。
- 原生多语言支持:自动检测语言,并在世界上使用最广泛的语言(英语、西班牙语、法语、葡萄牙语、印地语、德语、荷兰语、意大利语)中表现出色。
- 语音直接调用功能:能够根据用户的语音意图直接触发后端功能、工作流或API调用。
- 强大的文本处理能力:保留了其语言模型主干Ministral - 3B的文本理解能力。
📊 基准测试结果
音频
在FLEURS、Mozilla Common Voice和Multilingual LibriSpeech基准测试中的平均单词错误率(WER):
文本
📦 安装指南
安装Transformers(从源代码安装)
pip install git+https://github.com/huggingface/transformers
💻 使用示例
该模型可以与以下框架一起使用:
⚠️ 重要提示
- 在聊天完成任务(例如音频理解)中,建议使用
temperature = 0.2
和top_p = 0.95
;在转录任务中,建议使用temperature = 0.0
。- 支持每条消息包含多个音频,以及多轮带音频的用户对话。
- 目前暂不支持系统提示。
Transformers 🤗
Voxtral原生支持Transformers!
音频指令
➡️ 多音频 + 文本指令
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
conversation = [
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/mary_had_lamb.mp3",
},
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/winning_call.mp3",
},
{"type": "text", "text": "What sport and what nursery rhyme are referenced?"},
],
}
]
inputs = processor.apply_chat_template(conversation)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated response:")
print("=" * 80)
print(decoded_outputs[0])
print("=" * 80)
➡️ 多轮对话
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
conversation = [
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/obama.mp3",
},
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/bcn_weather.mp3",
},
{"type": "text", "text": "Describe briefly what you can hear."},
],
},
{
"role": "assistant",
"content": "The audio begins with the speaker delivering a farewell address in Chicago, reflecting on his eight years as president and expressing gratitude to the American people. The audio then transitions to a weather report, stating that it was 35 degrees in Barcelona the previous day, but the temperature would drop to minus 20 degrees the following day.",
},
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/winning_call.mp3",
},
{"type": "text", "text": "Ok, now compare this new audio with the previous one."},
],
},
]
inputs = processor.apply_chat_template(conversation)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated response:")
print("=" * 80)
print(decoded_outputs[0])
print("=" * 80)
➡️ 仅文本输入
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
conversation = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Why should AI models be open-sourced?",
},
],
}
]
inputs = processor.apply_chat_template(conversation)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated response:")
print("=" * 80)
print(decoded_outputs[0])
print("=" * 80)
➡️ 仅音频输入
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
conversation = [
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/winning_call.mp3",
},
],
}
]
inputs = processor.apply_chat_template(conversation)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated response:")
print("=" * 80)
print(decoded_outputs[0])
print("=" * 80)
➡️ 批量推理
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
conversations = [
[
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/obama.mp3",
},
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/bcn_weather.mp3",
},
{
"type": "text",
"text": "Who's speaking in the speach and what city's weather is being discussed?",
},
],
}
],
[
{
"role": "user",
"content": [
{
"type": "audio",
"path": "https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/winning_call.mp3",
},
{"type": "text", "text": "What can you tell me about this audio?"},
],
}
],
]
inputs = processor.apply_chat_template(conversations)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated responses:")
print("=" * 80)
for decoded_output in decoded_outputs:
print(decoded_output)
print("=" * 80)
转录
➡️ 转录示例
from transformers import VoxtralForConditionalGeneration, AutoProcessor
import torch
device = "cuda"
repo_id = "MohamedRashad/Voxtral-Mini-3B-2507-transformers"
processor = AutoProcessor.from_pretrained(repo_id)
model = VoxtralForConditionalGeneration.from_pretrained(repo_id, torch_dtype=torch.bfloat16, device_map=device)
inputs = processor.apply_transcrition_request(language="en", audio="https://huggingface.co/datasets/hf-internal-testing/dummy-audio-samples/resolve/main/obama.mp3", model_id=repo_id)
inputs = inputs.to(device, dtype=torch.bfloat16)
outputs = model.generate(**inputs, max_new_tokens=500)
decoded_outputs = processor.batch_decode(outputs[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\nGenerated responses:")
print("=" * 80)
for decoded_output in decoded_outputs:
print(decoded_output)
print("=" * 80)
📄 许可证
本项目采用Apache - 2.0许可证。
⚠️ 重要提示
如果你想了解更多关于我们如何处理你的个人数据的信息,请阅读我们的隐私政策。
Qwen2 Audio 7B
Apache-2.0
Qwen2-Audio是通义千问大音频语言模型系列,支持语音聊天和音频分析两种交互模式。
音频生成文本
Transformers 英语

Q
Qwen
28.26k
114
Qwen2 Audio 7B GGUF
Apache-2.0
Qwen2-Audio是先进的小规模多模态模型,支持音频与文本输入,无需依赖语音识别模块即可实现语音交互。
音频生成文本 英语
Q
NexaAIDev
5,001
153
Ultravox V0 5 Llama 3 3 70b
MIT
Ultravox是基于Llama3.3-70B和Whisper构建的多模态语音大语言模型,支持语音和文本输入,适用于语音代理、翻译等场景。
音频生成文本
Transformers 支持多种语言

U
fixie-ai
3,817
26
Ultravox V0 4
MIT
Ultravox 是一款基于 Llama3.1-8B-Instruct 和 Whisper-medium 的多模态语音大语言模型,能够同时处理语音和文本输入。
音频生成文本
Transformers 支持多种语言

U
fixie-ai
1,851
48
Aero 1 Audio
MIT
轻量级音频模型,擅长语音识别、音频理解及执行音频指令等多元任务
音频生成文本
Transformers 英语

A
lmms-lab
1,348
74
Ultravox V0 4 1 Mistral Nemo
MIT
Ultravox 是一个基于 Mistral-Nemo 和 Whisper 的多模态模型,可同时处理语音和文本输入,适用于语音代理、语音翻译等任务。
音频生成文本
Transformers 支持多种语言

U
fixie-ai
1,285
25
Ultravox V0 6 Qwen 3 32b
MIT
Ultravox是一个多模态语音大语言模型,能够理解和处理语音输入,支持多种语言和噪声环境。
音频生成文本
Transformers 支持多种语言

U
fixie-ai
1,240
0
Omniaudio 2.6B
Apache-2.0
全球最快、最高效的端侧部署音频语言模型,2.6B参数的多模态模型,可同时处理文本和音频输入。
音频生成文本 英语
O
NexaAIDev
1,149
265
Qwen2 Audio 7B Instruct 4bit
这是Qwen2-Audio-7B-Instruct的4位量化版本,基于阿里巴巴云原版Qwen模型开发,是一个音频-文本多模态大语言模型。
音频生成文本
Transformers

Q
alicekyting
1,090
6
Ultravox V0 5 Llama 3 2 1b ONNX
MIT
Ultravox是一个多语言音频转文本模型,基于LLaMA-3-2.1B架构优化,支持多种语言的语音识别和转录任务。
音频生成文本
Transformers 支持多种语言

U
onnx-community
1,088
3
精选推荐AI模型
Llama 3 Typhoon V1.5x 8b Instruct
专为泰语设计的80亿参数指令模型,性能媲美GPT-3.5-turbo,优化了应用场景、检索增强生成、受限生成和推理任务
大型语言模型
Transformers 支持多种语言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一个基于SODA数据集训练的超小型对话模型,专为边缘设备推理设计,体积仅为Cosmo-3B模型的2%左右。
对话系统
Transformers 英语

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基于RoBERTa架构的中文抽取式问答模型,适用于从给定文本中提取答案的任务。
问答系统 中文
R
uer
2,694
98
智启未来,您的人工智能解决方案智库
简体中文