Automatic Speech Recognition
Transformers
Safetensors
voxtral_realtime
fp8
quantized
vllm
mistral
compressed-tensors
llm-compressor
Instructions to use ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic") model = AutoModelForMultimodalLM.from_pretrained("ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload FP8-quantized model (FP8_DYNAMIC, via llm-compressor)
Browse files- .gitattributes +1 -0
- README.md +150 -3
- config.json +112 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
- processor_config.json +15 -0
- recipe.yaml +7 -0
- tekken.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tekken.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,150 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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11 |
+
- compressed-tensors
|
| 12 |
+
- llm-compressor
|
| 13 |
+
library_name: transformers
|
| 14 |
+
pipeline_tag: automatic-speech-recognition
|
| 15 |
+
language:
|
| 16 |
+
- en
|
| 17 |
+
- fr
|
| 18 |
+
- de
|
| 19 |
+
- es
|
| 20 |
+
- it
|
| 21 |
+
- pt
|
| 22 |
+
- nl
|
| 23 |
+
- pl
|
| 24 |
+
- sv
|
| 25 |
+
- da
|
| 26 |
+
- fi
|
| 27 |
+
- nb
|
| 28 |
+
- hi
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
# ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic
|
| 32 |
+
|
| 33 |
+
> **FP8-quantized** version of [`mistralai/Voxtral-Mini-4B-Realtime-2602`](https://huggingface.co/mistralai/Voxtral-Mini-4B-Realtime-2602) for faster inference and reduced memory usage.
|
| 34 |
+
|
| 35 |
+
## Overview
|
| 36 |
+
|
| 37 |
+
| Property | Value |
|
| 38 |
+
|---|---|
|
| 39 |
+
| **Base Model** | [`mistralai/Voxtral-Mini-4B-Realtime-2602`](https://huggingface.co/mistralai/Voxtral-Mini-4B-Realtime-2602) |
|
| 40 |
+
| **Quantization** | FP8 Dynamic (`FP8_DYNAMIC`) |
|
| 41 |
+
| **Weight Quantization** | Symmetric, static, per-channel → FP8 (E4M3) |
|
| 42 |
+
| **Activation Quantization** | Symmetric, dynamic, per-token → FP8 (E4M3) |
|
| 43 |
+
| **Format** | `compressed-tensors` (vLLM-native) |
|
| 44 |
+
| **Quantized Size** | ~4.91 GB |
|
| 45 |
+
| **Tool** | [`llm-compressor`](https://github.com/vllm-project/llm-compressor) |
|
| 46 |
+
| **Date** | 2026-04-15 |
|
| 47 |
+
|
| 48 |
+
## What is this?
|
| 49 |
+
|
| 50 |
+
This is an FP8-quantized version of Mistral AI's **Voxtral Mini 4B Realtime** — a multilingual, streaming speech-to-text model. The quantization reduces:
|
| 51 |
+
|
| 52 |
+
- **Memory footprint** by ~50% (from ~8 GB to ~4 GB)
|
| 53 |
+
- **Inference latency** through hardware-accelerated FP8 tensor operations
|
| 54 |
+
- **Time to first token** with smaller weight transfers
|
| 55 |
+
|
| 56 |
+
All while maintaining near-identical transcription quality to the original BF16 model.
|
| 57 |
+
|
| 58 |
+
## Supported Languages
|
| 59 |
+
|
| 60 |
+
English, French, German, Spanish, Italian, Portuguese, Dutch, Polish, Swedish, Danish, Finnish, Norwegian (Bokmål), Hindi
|
| 61 |
+
|
| 62 |
+
## Quantization Details
|
| 63 |
+
|
| 64 |
+
The quantization was performed using [`llm-compressor`](https://github.com/vllm-project/llm-compressor) with the `FP8_DYNAMIC` scheme:
|
| 65 |
+
|
| 66 |
+
- **Weights**: Quantized with symmetric, static, per-channel scaling to FP8 (E4M3)
|
| 67 |
+
- **Activations**: Quantized with symmetric, dynamic, per-token scaling to FP8 (E4M3)
|
| 68 |
+
- **Ignored layers**: `lm_head` (kept in original precision to preserve output quality)
|
| 69 |
+
- **No calibration data required** — the dynamic activation scheme computes scales at inference time
|
| 70 |
+
|
| 71 |
+
## How to Use
|
| 72 |
+
|
| 73 |
+
### With vLLM (Recommended)
|
| 74 |
+
|
| 75 |
+
This model is designed for deployment with [vLLM](https://github.com/vllm-project/vllm), which natively supports the `compressed-tensors` format.
|
| 76 |
+
|
| 77 |
+
#### Serve
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
vllm serve ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic \
|
| 81 |
+
--compilation_config '{"cudagraph_mode": "PIECEWISE"}'
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
#### Docker
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
docker run --runtime nvidia --gpus all \
|
| 88 |
+
--ipc=host \
|
| 89 |
+
-p 8000:8000 \
|
| 90 |
+
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
| 91 |
+
-e HF_TOKEN=your_token_here \
|
| 92 |
+
vllm/vllm-openai:latest \
|
| 93 |
+
--model ghecko78/Voxtral-Mini-4B-Realtime-2602-FP8-Dynamic
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
### Realtime Streaming API
|
| 97 |
+
|
| 98 |
+
The model supports vLLM's Realtime WebSocket API for live audio streaming:
|
| 99 |
+
|
| 100 |
+
```python
|
| 101 |
+
import asyncio
|
| 102 |
+
import websockets
|
| 103 |
+
import json
|
| 104 |
+
import base64
|
| 105 |
+
import soundfile as sf
|
| 106 |
+
|
| 107 |
+
async def stream_audio(audio_path):
|
| 108 |
+
uri = "ws://localhost:8000/v1/realtime"
|
| 109 |
+
async with websockets.connect(uri) as ws:
|
| 110 |
+
# Read and encode audio
|
| 111 |
+
audio, sr = sf.read(audio_path)
|
| 112 |
+
audio_b64 = base64.b64encode(audio.tobytes()).decode()
|
| 113 |
+
|
| 114 |
+
# Send audio
|
| 115 |
+
await ws.send(json.dumps({
|
| 116 |
+
"type": "input_audio_buffer.append",
|
| 117 |
+
"audio": audio_b64,
|
| 118 |
+
}))
|
| 119 |
+
|
| 120 |
+
# Receive transcription
|
| 121 |
+
async for message in ws:
|
| 122 |
+
data = json.loads(message)
|
| 123 |
+
if data.get("type") == "response.audio_transcript.delta":
|
| 124 |
+
print(data["delta"], end="", flush=True)
|
| 125 |
+
|
| 126 |
+
asyncio.run(stream_audio("your_audio.wav"))
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
## Hardware Requirements
|
| 130 |
+
|
| 131 |
+
| Precision | Min VRAM | Recommended GPU |
|
| 132 |
+
|---|---|---|
|
| 133 |
+
| **FP8 (this model)** | ~4 GB | NVIDIA H100, L40S, Blackwell (GB10+), Ada Lovelace |
|
| 134 |
+
| BF16 (original) | ~8 GB | Any CUDA GPU with ≥16 GB |
|
| 135 |
+
|
| 136 |
+
> **Note**: FP8 hardware acceleration requires NVIDIA GPUs with Compute Capability ≥ 8.9 (Ada Lovelace, Hopper, Blackwell).
|
| 137 |
+
|
| 138 |
+
## Evaluation
|
| 139 |
+
|
| 140 |
+
FP8 dynamic quantization typically preserves >99% of the original model's accuracy. For Voxtral Mini 4B Realtime's benchmark results on the original BF16 model, see the [base model card](https://huggingface.co/mistralai/Voxtral-Mini-4B-Realtime-2602).
|
| 141 |
+
|
| 142 |
+
## License
|
| 143 |
+
|
| 144 |
+
This model inherits the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) from the base model.
|
| 145 |
+
|
| 146 |
+
## Acknowledgments
|
| 147 |
+
|
| 148 |
+
- [Mistral AI](https://mistral.ai/) for the original Voxtral Mini 4B Realtime model
|
| 149 |
+
- [vLLM](https://github.com/vllm-project/vllm) team for `llm-compressor` and FP8 inference support
|
| 150 |
+
- [RedHatAI](https://huggingface.co/RedHatAI) for pioneering the FP8 quantization approach for Voxtral models
|
config.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VoxtralRealtimeForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"audio_config": {
|
| 6 |
+
"activation_function": "gelu",
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"head_dim": 64,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 1280,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 5120,
|
| 14 |
+
"max_position_embeddings": 1500,
|
| 15 |
+
"model_type": "voxtral_realtime_encoder",
|
| 16 |
+
"num_attention_heads": 32,
|
| 17 |
+
"num_hidden_layers": 32,
|
| 18 |
+
"num_mel_bins": 128,
|
| 19 |
+
"rms_norm_eps": 1e-05,
|
| 20 |
+
"rope_parameters": {
|
| 21 |
+
"rope_theta": 1000000.0,
|
| 22 |
+
"rope_type": "default"
|
| 23 |
+
},
|
| 24 |
+
"sliding_window": 750,
|
| 25 |
+
"vocab_size": 131072
|
| 26 |
+
},
|
| 27 |
+
"audio_length_per_tok": 8,
|
| 28 |
+
"default_num_delay_tokens": 6,
|
| 29 |
+
"downsample_factor": 4,
|
| 30 |
+
"dtype": "bfloat16",
|
| 31 |
+
"hidden_size": 3072,
|
| 32 |
+
"model_type": "voxtral_realtime",
|
| 33 |
+
"projector_hidden_act": "gelu",
|
| 34 |
+
"quantization_config": {
|
| 35 |
+
"config_groups": {
|
| 36 |
+
"group_0": {
|
| 37 |
+
"format": "float-quantized",
|
| 38 |
+
"input_activations": {
|
| 39 |
+
"actorder": null,
|
| 40 |
+
"block_structure": null,
|
| 41 |
+
"dynamic": true,
|
| 42 |
+
"group_size": null,
|
| 43 |
+
"num_bits": 8,
|
| 44 |
+
"observer": null,
|
| 45 |
+
"observer_kwargs": {},
|
| 46 |
+
"scale_dtype": null,
|
| 47 |
+
"strategy": "token",
|
| 48 |
+
"symmetric": true,
|
| 49 |
+
"type": "float",
|
| 50 |
+
"zp_dtype": null
|
| 51 |
+
},
|
| 52 |
+
"output_activations": null,
|
| 53 |
+
"targets": [
|
| 54 |
+
"Linear"
|
| 55 |
+
],
|
| 56 |
+
"weights": {
|
| 57 |
+
"actorder": null,
|
| 58 |
+
"block_structure": null,
|
| 59 |
+
"dynamic": false,
|
| 60 |
+
"group_size": null,
|
| 61 |
+
"num_bits": 8,
|
| 62 |
+
"observer": "memoryless_minmax",
|
| 63 |
+
"observer_kwargs": {},
|
| 64 |
+
"scale_dtype": null,
|
| 65 |
+
"strategy": "channel",
|
| 66 |
+
"symmetric": true,
|
| 67 |
+
"type": "float",
|
| 68 |
+
"zp_dtype": null
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"format": "float-quantized",
|
| 73 |
+
"global_compression_ratio": null,
|
| 74 |
+
"ignore": [
|
| 75 |
+
"multi_modal_projector.linear_1",
|
| 76 |
+
"multi_modal_projector.linear_2"
|
| 77 |
+
],
|
| 78 |
+
"kv_cache_scheme": null,
|
| 79 |
+
"quant_method": "compressed-tensors",
|
| 80 |
+
"quantization_status": "compressed",
|
| 81 |
+
"sparsity_config": {},
|
| 82 |
+
"transform_config": {},
|
| 83 |
+
"version": "0.15.1.dev9+g37f209a"
|
| 84 |
+
},
|
| 85 |
+
"text_config": {
|
| 86 |
+
"attention_dropout": 0.0,
|
| 87 |
+
"bos_token_id": 1,
|
| 88 |
+
"dtype": "bfloat16",
|
| 89 |
+
"eos_token_id": 2,
|
| 90 |
+
"head_dim": 128,
|
| 91 |
+
"hidden_act": "silu",
|
| 92 |
+
"hidden_size": 3072,
|
| 93 |
+
"initializer_range": 0.02,
|
| 94 |
+
"intermediate_size": 9216,
|
| 95 |
+
"max_position_embeddings": 131072,
|
| 96 |
+
"model_type": "voxtral_realtime_text",
|
| 97 |
+
"num_attention_heads": 32,
|
| 98 |
+
"num_hidden_layers": 26,
|
| 99 |
+
"num_key_value_heads": 8,
|
| 100 |
+
"pad_token_id": null,
|
| 101 |
+
"rms_norm_eps": 1e-05,
|
| 102 |
+
"rope_parameters": {
|
| 103 |
+
"rope_theta": 1000000.0,
|
| 104 |
+
"rope_type": "default"
|
| 105 |
+
},
|
| 106 |
+
"sliding_window": 8192,
|
| 107 |
+
"tie_word_embeddings": true,
|
| 108 |
+
"use_cache": true,
|
| 109 |
+
"vocab_size": 131072
|
| 110 |
+
},
|
| 111 |
+
"transformers_version": "5.5.4"
|
| 112 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 1,
|
| 3 |
+
"eos_token_id": 2,
|
| 4 |
+
"output_attentions": false,
|
| 5 |
+
"output_hidden_states": false,
|
| 6 |
+
"pad_token_id": 11,
|
| 7 |
+
"transformers_version": "5.5.4",
|
| 8 |
+
"use_cache": true
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a32ebf406e269d9a15f0fd4e761b19d8dd119ce2eb5af76f8dad63e8fe622a15
|
| 3 |
+
size 5269400752
|
processor_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_extractor": {
|
| 3 |
+
"feature_extractor_type": "VoxtralRealtimeFeatureExtractor",
|
| 4 |
+
"feature_size": 128,
|
| 5 |
+
"global_log_mel_max": 1.5,
|
| 6 |
+
"hop_length": 160,
|
| 7 |
+
"n_fft": 400,
|
| 8 |
+
"padding_side": "right",
|
| 9 |
+
"padding_value": 0.0,
|
| 10 |
+
"return_attention_mask": true,
|
| 11 |
+
"sampling_rate": 16000,
|
| 12 |
+
"win_length": 400
|
| 13 |
+
},
|
| 14 |
+
"processor_class": "VoxtralRealtimeProcessor"
|
| 15 |
+
}
|
recipe.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
QuantizationModifier:
|
| 4 |
+
targets: [Linear]
|
| 5 |
+
ignore: [lm_head, 're:audio_encoder.*', 're:multi_modal_projector.*']
|
| 6 |
+
scheme: FP8_DYNAMIC
|
| 7 |
+
bypass_divisibility_checks: false
|
tekken.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8434af1d39eba99f0ef46cf1450bf1a63fa941a26933a1ef5dbbf4adf0d00e44
|
| 3 |
+
size 14910348
|