Marimba audio encoder: static INT8 for CPU
CPU builds of the frozen audio encoder behind Marimba, quantized to 8 bits with calibration (static post-training quantization) outside ONNX Runtime.
Marimba answers typed questions about 8-second speech windows. One pass of a frozen speech encoder feeds a small head per question. This repository holds only the audio encoder: the audio tower of Qwen/Qwen3-ASR-0.6B (18 transformer layers, 186.4 M parameters), exported as a graph that takes a log-mel spectrogram [B, 128, 800] and returns the hidden states of layers 9, 12 and 18, each [B, 104, 896]. The question heads are not here. They come from charcot-ai/marimba and are used unchanged.
Files
| Folder | Runtime | Contents |
|---|---|---|
nncf-acc-0p01/ |
OpenVINO | encoder.xml, encoder.bin. NNCF quantize_with_accuracy_control: 8-bit static quantization with the first convolution kept in floating point. |
nncf-ptq/ |
OpenVINO | encoder.xml, encoder.bin. NNCF post-training quantization with the transformer preset, all supported operations in 8 bits. |
ov-fp16/ |
OpenVINO | encoder.xml, encoder.bin. Unquantized graph with 16-bit float weights. OpenVINO runs it in bf16 on CPUs with AVX512_BF16 and in f32 elsewhere; INFERENCE_PRECISION_HINT=f32 forces f32. |
ov-w8/ |
OpenVINO | encoder.xml, encoder.bin. NNCF compress_weights (int8_asym): 8-bit weights for the linear layers, no calibration, activations left in floating point. |
pt2e-float-convs/ |
PyTorch | encoder_l12.pt2, encoder_l18.pt2. PyTorch 2 Export static quantization with X86InductorQuantizer: linear layers in 8 bits, convolutions in floating point. One exported program per exit layer. |
Evaluation
All rows were scored on the same 1,170 public 8-second windows (16 kHz mono) with the released Marimba heads:
turn_end: Smart Turn v3.2, test splitvoice_activity: ESC-50 (classes without human sounds) as non-speech, and speech windows from the sets belowspeaker_change,speaker_count,same_speaker: VoxConverse test and AMI headset-mix test, labels from the human timestamps- FLEURS
pt_br, validation split
The fp32 row is the reference: the PyTorch encoder in 32-bit float. Values in parentheses are differences against it. "Decisions changed" counts answers that differ from the fp32 answer across the six scored outputs.
Quantized kernels round differently on different instruction sets, so each quantized variant is scored with AVX-512 kernels and again with AVX2 kernels. "AVX2" rows ran on an Intel Xeon without AVX-512; "AVX2 (oneDNN capped ...)" rows ran on the AVX-512 machine with oneDNN restricted to AVX2.
| Variant | Scheme | Kernels during evaluation | Size on disk | turn_end AUROC |
voice_activity AUROC (last 1 s) |
voice_activity AUROC (8 s) |
same_speaker AUROC |
speaker_change AUROC |
speaker_count accuracy |
Decisions changed vs fp32 (of 6,516) |
|---|---|---|---|---|---|---|---|---|---|---|
| fp32 reference (PyTorch, no file in this repo) | 32-bit float | AVX-512 | - | 0.9310 | 0.9969 | 0.9999 | 0.9926 | 0.9557 | 0.7862 | 0 |
| OpenVINO fp32 IR (no file in this repo) | 32-bit float | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
739 MB | 0.9310 (+0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (+0.0000) | 0.9557 (+0.0000) | 0.7862 (+0.0000) | 0 |
| OpenVINO fp32 IR (no file in this repo) | 32-bit float | AVX-512 | 739 MB | 0.9310 (+0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (+0.0000) | 0.9557 (+0.0000) | 0.7862 (+0.0000) | 0 |
| OpenVINO fp32 IR (no file in this repo) | 32-bit float | AVX2 | 739 MB | 0.9310 (+0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (+0.0000) | 0.9557 (+0.0000) | 0.7862 (+0.0000) | 0 |
ov-fp16/, f32 inference |
16-bit float weights, 32-bit float inference | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
370 MB | 0.9309 (-0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (+0.0000) | 0.9558 (+0.0000) | 0.7862 (+0.0000) | 0 |
ov-fp16/, f32 inference |
16-bit float weights, 32-bit float inference | AVX-512 | 370 MB | 0.9309 (-0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (+0.0000) | 0.9558 (+0.0000) | 0.7862 (+0.0000) | 0 |
ov-fp16/, bf16 inference |
16-bit float weights, bf16 inference | AVX-512 + AVX512_BF16 | 370 MB | 0.9310 (+0.0000) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9926 (-0.0001) | 0.9557 (+0.0000) | 0.7862 (+0.0000) | 5 |
nncf-ptq/ |
8-bit static (NNCF PTQ, transformer preset); 16-bit float for the rest | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
187 MB | 0.9323 (+0.0013) | 0.9969 (+0.0000) | 0.9999 (-0.0000) | 0.9920 (-0.0006) | 0.9563 (+0.0006) | 0.7770 (-0.0092) | 123 |
nncf-ptq/ |
8-bit static (NNCF PTQ, transformer preset); 16-bit float for the rest | AVX-512 + VNNI | 187 MB | 0.9322 (+0.0012) | 0.9968 (-0.0001) | 0.9999 (-0.0000) | 0.9922 (-0.0004) | 0.9562 (+0.0005) | 0.7782 (-0.0080) | 109 |
nncf-ptq/ |
8-bit static (NNCF PTQ, transformer preset); 16-bit float for the rest | AVX2 | 187 MB | 0.9311 (+0.0001) | 0.9970 (+0.0000) | 0.9999 (+0.0000) | 0.9924 (-0.0003) | 0.9566 (+0.0008) | 0.7782 (-0.0080) | 127 |
nncf-acc-0p01/ |
8-bit static (NNCF accuracy control, first convolution kept in float) | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
187 MB | 0.9324 (+0.0014) | 0.9969 (-0.0000) | 0.9999 (+0.0000) | 0.9926 (-0.0001) | 0.9558 (+0.0001) | 0.7851 (-0.0011) | 97 |
nncf-acc-0p01/ |
8-bit static (NNCF accuracy control, first convolution kept in float) | AVX-512 + VNNI | 187 MB | 0.9335 (+0.0025) | 0.9968 (-0.0001) | 0.9999 (+0.0000) | 0.9927 (+0.0001) | 0.9558 (+0.0000) | 0.7862 (+0.0000) | 79 |
nncf-acc-0p01/ |
8-bit static (NNCF accuracy control, first convolution kept in float) | AVX2 | 187 MB | 0.9331 (+0.0021) | 0.9969 (-0.0001) | 0.9999 (+0.0000) | 0.9929 (+0.0003) | 0.9556 (-0.0001) | 0.7874 (+0.0011) | 92 |
ov-w8/ |
8-bit weights only (NNCF compress_weights, asymmetric); float activations |
AVX-512 (runtime dynamic quantization of linear inputs) | 187 MB | 0.9301 (-0.0008) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9931 (+0.0005) | 0.9555 (-0.0003) | 0.7920 (+0.0057) | 27 |
ov-w8/ |
8-bit weights only (NNCF compress_weights, asymmetric); float activations |
AVX2 | 187 MB | 0.9307 (-0.0003) | 0.9969 (+0.0000) | 0.9999 (+0.0000) | 0.9931 (+0.0005) | 0.9555 (-0.0003) | 0.7897 (+0.0034) | 22 |
pt2e-float-convs/ (reloaded from disk) |
8-bit static linear layers (PT2E X86InductorQuantizer); float convolutions | AVX-512 + VNNI | 1500 MB | 0.9318 (+0.0008) | 0.9968 (-0.0001) | 0.9999 (+0.0000) | 0.9934 (+0.0008) | 0.9563 (+0.0006) | 0.7874 (+0.0011) | 104 |
pt2e-float-convs/ |
8-bit static linear layers (PT2E X86InductorQuantizer); float convolutions | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
- | 0.9272 (-0.0038) | 0.9969 (-0.0000) | 0.9999 (+0.0000) | 0.9932 (+0.0006) | 0.9563 (+0.0006) | 0.7862 (+0.0000) | 109 |
pt2e-float-convs/ |
8-bit static linear layers (PT2E X86InductorQuantizer); float convolutions | AVX-512 + VNNI | - | 0.9318 (+0.0008) | 0.9968 (-0.0001) | 0.9999 (+0.0000) | 0.9934 (+0.0008) | 0.9563 (+0.0006) | 0.7874 (+0.0011) | 104 |
| PyTorch bf16 (no file in this repo) | 16-bit float (bf16) | AVX-512 + AVX512_BF16 | - | 0.9306 (-0.0004) | 0.9969 (-0.0000) | 0.9999 (+0.0000) | 0.9928 (+0.0002) | 0.9557 (-0.0000) | 0.7862 (+0.0000) | 8 |
PyTorch dynamic INT8 on nn.Linear (no file in this repo) |
8-bit dynamic linear layers | AVX-512 + VNNI | - | 0.8845 (-0.0464) | 0.9968 (-0.0002) | 0.9999 (+0.0000) | 0.9939 (+0.0013) | 0.9564 (+0.0006) | 0.7724 (-0.0138) | 410 |
voice_activity reads layer 9; speaker_change, speaker_count and same_speaker read layer 12; turn_end reads layer 18.
Latency
Encoder time only (log-mel to hidden states), measured on CPU. "Layer 12" stops after layer 12 (enough for every question except turn_end); "Layer 18" runs the full encoder. Rows on the same CPU, instruction set and core count are comparable; the PyTorch fp32 row in each group is the baseline on that machine. Marimba's live pipeline asks for about two layer-12 windows per second per stream.
The AMD EPYC 4564P supports AVX-512 with VNNI and BF16. "AVX2 (capped)" rows ran on the same machine with ONEDNN_MAX_CPU_ISA=AVX2, which makes oneDNN pick AVX2 kernels; the OpenVINO kernel profile confirmed the switch. The Intel Xeon rows come from a shared virtual machine without AVX-512 and are noisier.
At batch 1 the OpenVINO and PT2E rows stop at layer 12, while the PyTorch fp32, bf16 and dynamic INT8 rows always run 18 layers (the reference package only exits early with two or more windows). Compare runtimes at batch 8.
| Variant | CPU | Instruction set | Cores / threads | Layer 12, batch 1: p50 / p95 ms | Layer 12, batch 8: windows/s | Layer 18, batch 1: p50 / p95 ms | Layer 18, batch 8: windows/s |
|---|---|---|---|---|---|---|---|
| fp32 reference (PyTorch, no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 636 / 648 | 2.1 | 609 / 630 | 1.8 |
| fp32 reference (PyTorch, no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 197 / 213 | 8.0 | 196 / 214 | 6.8 |
| fp32 reference (PyTorch, no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 615 / 623 | 2.0 | 574 / 581 | 1.8 |
| fp32 reference (PyTorch, no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 8 physical / 16 logical; 16 threads | 195 / 208 | 8.0 | 186 / 198 | 6.8 |
| fp32 reference (PyTorch, no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 355 / 372 | 4.4 | 370 / 379 | 4.4 |
| OpenVINO fp32 IR (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 296 / 316 | 3.5 | 339 / 374 | 3.0 |
| OpenVINO fp32 IR (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 153 / 222 | 7.9 | 176 / 260 | 6.7 |
| OpenVINO fp32 IR (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 243 / 267 | 4.3 | 286 / 313 | 3.5 |
| OpenVINO fp32 IR (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 8 physical / 16 logical; 16 threads | 130 / 194 | 9.8 | 161 / 241 | 8.1 |
| OpenVINO fp32 IR (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 169 / 215 | 6.7 | 205 / 232 | 5.4 |
| OpenVINO fp32 IR (no file in this repo) | Intel(R) Xeon(R) Processor | AVX2 | 4 vCPU (taskset 0-3); 4 threads | 422 / 468 | 2.4 | 835 / 987 | 1.3 |
| OpenVINO fp32 IR (no file in this repo) | Intel(R) Xeon(R) Processor | AVX2 | 8 vCPU (no SMT exposed); 8 threads | 383 / 410 | 2.7 | 476 / 489 | 3.7 |
ov-fp16/, f32 inference |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 325 / 369 | 3.2 | 394 / 416 | 2.7 |
ov-fp16/, f32 inference |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 161 / 224 | 7.1 | 183 / 263 | 6.1 |
ov-fp16/, f32 inference |
AMD EPYC 4564P 16-Core Processor | AVX-512 | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 246 / 279 | 4.1 | 305 / 329 | 3.4 |
ov-fp16/, f32 inference |
AMD EPYC 4564P 16-Core Processor | AVX-512 | 8 physical / 16 logical; 16 threads | 131 / 195 | 10.2 | 168 / 234 | 8.5 |
ov-fp16/, bf16 inference |
AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 136 / 162 | 8.7 | 159 / 180 | 7.1 |
ov-fp16/, bf16 inference |
AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 8 physical / 16 logical; 16 threads | 110 / 126 | 17.6 | 127 / 155 | 14.0 |
ov-fp16/, bf16 inference |
AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 92 / 127 | 13.0 | 107 / 143 | 10.9 |
nncf-ptq/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 233 / 269 | 3.7 | 302 / 338 | 3.0 |
nncf-ptq/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 143 / 200 | 8.8 | 161 / 242 | 7.4 |
nncf-ptq/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 81 / 91 | 15.1 | 96 / 104 | 12.7 |
nncf-ptq/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 8 physical / 16 logical; 16 threads | 69 / 77 | 30.9 | 87 / 99 | 23.9 |
nncf-ptq/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 50 / 79 | 22.5 | 61 / 97 | 19.6 |
nncf-ptq/ |
Intel(R) Xeon(R) Processor | AVX2 | 4 vCPU (taskset 0-3); 4 threads | 297 / 364 | 2.9 | 389 / 440 | 2.4 |
nncf-ptq/ |
Intel(R) Xeon(R) Processor | AVX2 | 8 vCPU (no SMT exposed); 8 threads | 156 / 231 | 6.2 | 199 / 268 | 4.9 |
nncf-acc-0p01/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 234 / 269 | 3.6 | 304 / 334 | 2.9 |
nncf-acc-0p01/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 144 / 213 | 9.0 | 183 / 212 | 6.6 |
nncf-acc-0p01/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 86 / 98 | 13.7 | 99 / 115 | 11.8 |
nncf-acc-0p01/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 8 physical / 16 logical; 16 threads | 76 / 83 | 26.4 | 92 / 104 | 23.4 |
nncf-acc-0p01/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 76 / 91 | 20.4 | 79 / 107 | 16.8 |
nncf-acc-0p01/ |
Intel(R) Xeon(R) Processor | AVX2 | 4 vCPU (taskset 0-3); 4 threads | 307 / 373 | 3.0 | 392 / 430 | 2.4 |
nncf-acc-0p01/ |
Intel(R) Xeon(R) Processor | AVX2 | 8 vCPU (no SMT exposed); 8 threads | 348 / 455 | 3.2 | 400 / 429 | 4.4 |
ov-w8/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 (runtime dynamic quantization of linear inputs) | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 197 / 220 | 5.4 | 223 / 247 | 4.8 |
ov-w8/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 (runtime dynamic quantization of linear inputs) | 8 physical / 16 logical; 16 threads | 122 / 160 | 12.1 | 128 / 177 | 10.6 |
ov-w8/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 (runtime dynamic quantization of linear inputs) | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 140 / 176 | 7.8 | 159 / 181 | 7.3 |
ov-w8/ |
Intel(R) Xeon(R) Processor | AVX2 | 4 vCPU (taskset 0-3); 4 threads | 474 / 590 | 2.3 | 555 / 613 | 1.8 |
ov-w8/ |
Intel(R) Xeon(R) Processor | AVX2 | 8 vCPU (no SMT exposed); 8 threads | 446 / 487 | 2.2 | 540 / 582 | 1.9 |
pt2e-float-convs/ (reloaded from disk) |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 8 physical / 16 logical; 16 threads | 72 / 84 | 11.2 | 83 / 92 | 10.5 |
pt2e-float-convs/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 437 / 457 | 2.3 | 514 / 538 | 2.2 |
pt2e-float-convs/ |
AMD EPYC 4564P 16-Core Processor | AVX2 (oneDNN capped with ONEDNN_MAX_CPU_ISA=AVX2) |
8 physical / 16 logical; 16 threads | 148 / 160 | 7.3 | 190 / 211 | 6.5 |
pt2e-float-convs/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 297 / 306 | 3.2 | 328 / 340 | 2.8 |
pt2e-float-convs/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 8 physical / 16 logical; 16 threads | 70 / 79 | 11.7 | 80 / 92 | 11.1 |
pt2e-float-convs/ |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 147 / 154 | 6.0 | 158 / 169 | 5.7 |
| PyTorch bf16 (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 333 / 346 | 4.0 | 314 / 321 | 3.4 |
| PyTorch bf16 (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 8 physical / 16 logical; 16 threads | 98 / 108 | 16.7 | 97 / 110 | 13.9 |
| PyTorch bf16 (no file in this repo) | AMD EPYC 4564P 16-Core Processor | AVX-512 + AVX512_BF16 | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 152 / 163 | 10.7 | 151 / 163 | 8.7 |
PyTorch dynamic INT8 on nn.Linear (no file in this repo) |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 2 physical / 4 logical (taskset 2,18,3,19); 4 threads | 376 / 381 | 3.0 | 377 / 383 | 2.8 |
PyTorch dynamic INT8 on nn.Linear (no file in this repo) |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 8 physical / 16 logical; 16 threads | 119 / 147 | 10.6 | 118 / 133 | 9.6 |
PyTorch dynamic INT8 on nn.Linear (no file in this repo) |
AMD EPYC 4564P 16-Core Processor | AVX-512 + VNNI | 4 threads, not pinned (8 physical / 16 logical allowed); 4 threads | 202 / 214 | 5.5 | 191 / 198 | 5.0 |
8-bit kernels need AVX-512 VNNI (or AMX) to pay off. On AVX2-only CPUs the quantized graphs run at about the speed of fp32 in the same runtime, and the remaining gain over PyTorch comes from OpenVINO itself.
Size, memory and load time
| Variant | Download size | Peak RSS, OpenVINO process with both graphs compiled at batch 8 | Compile time, both graphs |
|---|---|---|---|
| Encoder weights in the original checkpoint (bf16) | 373 MB (inside a 1.88 GB file) | - | - |
| OpenVINO fp32 IR (not in this repo) | 739 MB | 3.0 GB | 6.4 s |
ov-fp16/, f32 inference |
370 MB | 2.7 GB | 6.5 s |
ov-fp16/, bf16 inference |
370 MB | 1.6 GB | 3.8 s |
nncf-ptq/ |
187 MB | 1.0 GB | 3.2 s |
nncf-acc-0p01/ |
187 MB | 1.7 GB | 3.5 s |
ov-w8/ |
187 MB | 1.7 GB | 5.0 s |
pt2e-float-convs/ |
1,500 MB | not measured in isolation | about 110 s (torch.compile) |
Memory and compile time were measured on the AMD EPYC 4564P with 16 threads.
Calibration data
396 public 8-second windows for calibration and 198 different ones for accuracy control. None of them is in the evaluation set (checked by SHA-256 of the samples).
| Source | Calibration | Validation |
|---|---|---|
| Smart Turn v3.2, train split | 140 | 70 |
| VoxConverse, dev split | 80 | 40 |
| AMI headset-mix, train split | 64 | 32 |
| ESC-50, clips not used in the evaluation set | 40 | 20 |
FLEURS train, pt_br, es_419, en_us |
24 each | 12 each |
The accuracy-control metric is the negative normalized squared distance between the quantized and fp32 hidden states of layers 9, 12 and 18, per frame and averaged over time. Plain post-training quantization scores -0.0214; keeping the first convolution in floating point brings it to -0.0069. The PT2E variant was calibrated on the first 128 calibration windows.
How to use
import numpy as np
import openvino as ov
from huggingface_hub import snapshot_download
from transformers import WhisperFeatureExtractor
folder = snapshot_download("charcot-ai/marimba-quant-cpu-int8", allow_patterns=["nncf-acc-0p01/*"])
# 8-second windows, 16 kHz mono, float32 in [-1, 1]
windows = np.zeros((2, 128000), dtype=np.float32)
extractor = WhisperFeatureExtractor(feature_size=128)
mel = extractor(
list(windows), sampling_rate=16000, padding="do_not_pad", truncation=False, return_tensors="np"
)["input_features"] # [2, 128, 800]
core = ov.Core()
model = core.read_model(f"{folder}/nncf-acc-0p01/encoder.xml")
model.reshape([len(windows), 128, 800])
encoder = core.compile_model(model, "CPU", {"PERFORMANCE_HINT": "LATENCY"})
layer9, layer12, layer18 = encoder(mel).values() # each [2, 104, 896] float32
The three outputs are named layer9, layer12 and layer18. To stop at layer 12, build a model from the first two outputs before compiling:
hop = ov.Model([r.input_value(0) for r in model.get_results()[:2]], model.get_parameters(), "hop")
The PT2E programs load with PyTorch:
import torch
import torch._inductor.config as inductor
from torch.ao.quantization.fx import _decomposed # registers the quantized operators
inductor.freezing = True
program = torch.export.load(f"{folder}/pt2e-float-convs/encoder_l18.pt2")
encoder = torch.compile(program.module())
layer9, layer12, layer18 = encoder(torch.from_numpy(mel))
Feed the hidden states to the heads of charcot-ai/marimba. The Python package that ships them is marimba-audio; the numbers above use its commit f58980ab80a54943929074aff23159caa026c7cf.
Versions used: Python 3.12, OpenVINO 2026.4.1, NNCF 3.4.0, PyTorch 2.8.0 (CPU), transformers 4.57.6, NumPy 2.4.6.
Limitations
- Encoder only. No heads, no text decoder, no feature extraction.
- Fixed input length: 8 seconds (800 mel frames). The batch dimension is dynamic.
- Quantized outputs depend on the instruction set, so answers near a decision boundary can differ between CPUs.
- 8-bit variants are no faster than fp32 on CPUs without VNNI or AMX.
ov-fp16/runs in bf16 only on CPUs with AVX512_BF16. On an AVX2-only Intel Xeon OpenVINO ran it in f32, also when bf16 was requested.ov-w8/is faster than fp32 only where the OpenVINO CPU plugin quantizes the inputs of the compressed linear layers at run time (DYNAMIC_QUANTIZATION_GROUP_SIZE, 32 by default). On the AMD EPYC 4564P, setting it to 0 brought the speed back to fp32 and changed the layer-18 output by 2.7% in relative norm. On the AVX2-only Intel Xeon it was no faster than the fp32 graph at layer 12.ov-w8/, and a bf16 request onov-fp16/, failed to compile when oneDNN was capped to AVX2 on the AVX-512 machine (ONEDNN_MAX_CPU_ISA=AVX2). Both loaded on the real AVX2-only CPU.pt2e-float-convs/is larger than the fp32 encoder, slower than the OpenVINO variants, and takes about two minutes to compile. Quantizing its convolutions as well fails in the PyTorch 2.8 Inductor lowering, and the programs did not compile on an AVX2-only Intel Xeon (oneDNN could not create the quantized matmul primitive).- The published
pt2e-float-convs/programs were re-saved without source stack traces after the measurements. Weights and uncompiled outputs are bit-identical to the measured programs; the compiled programs were not measured again. - Calibration covers English, Portuguese and Spanish speech, meetings and environmental sound. Other domains were not evaluated.
- Not a medical device.
Attribution and license
- Backbone: Qwen/Qwen3-ASR-0.6B, Apache-2.0. The encoder weights are unchanged apart from quantization.
- Quantization and weight compression: NNCF 3.4.0 with OpenVINO 2026.4.1; PyTorch 2 Export quantization (
X86InductorQuantizer) in PyTorch 2.8.0. - Released under Apache-2.0.