Instructions to use onnx-community/Voxtral-Mini-3B-2507-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/Voxtral-Mini-3B-2507-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('audio-text-to-text', 'onnx-community/Voxtral-Mini-3B-2507-ONNX');
| {{- bos_token -}} | |
| {%- for message in messages -%} | |
| {%- if (message["role"] == "user") == (loop.index % 2 == 0) -%} | |
| {{- raise_exception("After the optional system message, conversation roles must alternate user/assistant/user/assistant/...") -}} | |
| {%- endif -%} | |
| {%- if message["role"] == "user" -%} | |
| {{- "[INST]" -}} | |
| {%- if message["content"] is string -%} | |
| {{- message["content"] -}} | |
| {%- else -%} | |
| {%- for item in message["content"] -%} | |
| {%- if item["type"] == "audio" -%} | |
| {{- "[AUDIO]" -}} | |
| {%- elif item["type"] == "text" -%} | |
| {{- item["text"] -}} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- endif -%} | |
| {{- "[/INST]" -}} | |
| {%- elif message["role"] == "assistant" -%} | |
| {%- if message["content"] is not string -%} | |
| {{- raise_exception("Assistant message content should be a string.") -}} | |
| {%- endif -%} | |
| {{- message["content"] + eos_token -}} | |
| {%- else -%} | |
| {{- raise_exception("Only user and assistant roles are supported!") -}} | |
| {%- endif -%} | |
| {%- endfor -%} |