Marimba audio encoder, PyTorch-native quantization
Quantized copies of the audio encoder that Marimba
runs: the thinker.audio_tower of
Qwen/Qwen3-ASR-0.6B at revision
5eb144179a02acc5e5ba31e748d22b0cf3e303b0 (186.4 M parameters, 18 transformer layers of
width 896). Each folder holds the same encoder quantized with one PyTorch library:
bitsandbytes 0.50.2,
torchao 0.13.0 or
optimum-quanto 0.2.7. The files load into
regular torch modules on a CUDA GPU; there is no new runtime or file format.
Only the 182.2 M parameters in the encoder's nn.Linear modules are quantized. The three
Conv2d layers, the layer norms and the biases stay in bfloat16, the precision of the original
checkpoint.
What is in a folder
Each folder is one self-contained audio encoder: audio_tower.safetensors (bitsandbytes and
optimum-quanto) or audio_tower.pt (torchao, a state_dict of torchao tensor subclasses), the
encoder configuration in audio_tower_config.json, and for optimum-quanto the
quantization_map.json that requantize needs.
The folders do not contain the Marimba heads and readouts, the Qwen3-ASR text decoder, the
tokenizer or the feature extractor. The heads and readouts come from
charcot-ai/marimba and are used unchanged, in
float32. Questions answered by the text decoder (language, term, transcripts) need the
original checkpoint and are outside the scope of these files.
Evaluation
All numbers below come from one protocol. Each encoder produces the hidden states of layers 9, 12 and 18 for 1,170 public eight-second windows (16 kHz mono), and the unchanged Marimba heads and readouts turn them into decisions:
| Source | Dataset and revision | Windows |
|---|---|---|
| Smart Turn v3.2 test | pipecat-ai/smart-turn-data-v3.2-test @ dfc17924 |
300 |
| VoxConverse test | diarizers-community/voxconverse @ 3acfa1b4 |
513 |
| AMI (ihm) test | diarizers-community/ami @ 8cdaae2e |
107 |
| ESC-50, non-human classes | ashraq/esc50 @ e3e2a63f |
150 |
FLEURS pt_br validation |
google/fleurs @ 168de341 |
100 |
turn_end is scored on the Smart Turn windows, voice_activity on windows with a speech or
non-speech label, and the three speaker questions on the VoxConverse and AMI windows, labeled
from the human timestamps. The reference row is the Marimba package on CPU in float32, one
window at a time. AUROC and accuracy are computed against the dataset labels; "decisions
changed" and "max. probability change" compare each encoder with that reference window by
window.
The package is marimba-audio 0.1.2 at commit f58980ab80a54943929074aff23159caa026c7cf, with
torch 2.8.0+cu128 and transformers 4.57.6. Quantized encoders run on its batched GPU path with
bfloat16 activations, 16 windows per batch.
Quality
The quantized rows are measured on the files of this repository, reloaded from disk without the original checkpoint, on an NVIDIA RTX PRO 4500 Blackwell.
| Folder | Library | Scheme | Weight bits | Size on disk | turn_end AUROC |
voice_activity AUROC (8 s) |
voice_activity AUROC (last 1 s) |
same_speaker AUROC |
speaker_change AUROC |
speaker_count accuracy |
Max. probability change | Decisions changed |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| fp32 reference (original weights, not in this repository) | - | float32 on CPU | 16 as stored, 32 in memory | 372.8 MB of the original 1,876 MB checkpoint | 0.9310 | 0.9999 | 0.9969 | 0.9926 | 0.9557 | 0.7862 | 0 | 0 |
| unquantized (original weights, not in this repository) | - | float32 on GPU | 16 as stored, 32 in memory | 372.8 MB of the original 1,876 MB checkpoint | 0.9309 | 0.9999 | 0.9969 | 0.9926 | 0.9558 | 0.7862 | 0.002 | 1 |
| unquantized (original weights, not in this repository) | - | bfloat16 on GPU | 16 | 372.8 MB of the original 1,876 MB checkpoint | 0.9307 | 0.9999 | 0.9969 | 0.9929 | 0.9557 | 0.7862 | 0.117 | 8 |
bnb_int8/ |
bitsandbytes | Linear8bitLt, per-row absmax int8 weights; int8 matmul, threshold=0.0 |
8 | 191.4 MB | 0.9311 | 0.9999 | 0.9968 | 0.9934 | 0.9553 | 0.7828 | 0.363 | 58 |
bnb_int8/ loaded with threshold=6.0 |
bitsandbytes | same files as bnb_int8, loaded with threshold=6.0 (outlier columns in 16-bit) |
8 | 191.4 MB | 0.9308 | 0.9999 | 0.9969 | 0.9931 | 0.9556 | 0.7851 | 0.171 | 45 |
bnb_nf4/ |
bitsandbytes | Linear4bit, NF4 weights in blocks of 64, no double quantization; bf16 compute |
4 | 111.2 MB | 0.9166 | 0.9999 | 0.9966 | 0.9938 | 0.9531 | 0.7701 | 0.578 | 256 |
torchao_int8wo/ |
torchao | Int8WeightOnlyConfig, per-channel symmetric int8 weights; bf16 activations |
8 | 192.4 MB | 0.9314 | 0.9999 | 0.9970 | 0.9934 | 0.9555 | 0.7885 | 0.095 | 39 |
torchao_int8dyn/ |
torchao | Int8DynamicActivationInt8WeightConfig, int8 weights and dynamic per-token int8 activations |
8 | 191.2 MB | 0.9336 | 0.9999 | 0.9969 | 0.9924 | 0.9548 | 0.7885 | 0.229 | 72 |
torchao_int4wo/ |
torchao | Int4WeightOnlyConfig, asymmetric int4 weights in groups of 128; bf16 activations |
4 | 119.1 MB | 0.9339 | 0.9999 | 0.9967 | 0.9938 | 0.9556 | 0.7540 | 0.727 | 400 |
torchao_float8wo/ |
torchao | Float8WeightOnlyConfig, float8 (e4m3) weights; bf16 activations |
8 | 191.5 MB | 0.9316 | 0.9999 | 0.9969 | 0.9924 | 0.9557 | 0.7851 | 0.207 | 62 |
torchao_float8dyn/ |
torchao | Float8DynamicActivationFloat8WeightConfig, float8 (e4m3) weights and dynamic float8 activations |
8 | 190.9 MB | 0.9278 | 0.9999 | 0.9967 | 0.9928 | 0.9549 | 0.7862 | 0.227 | 74 |
quanto_qint8/ |
optimum-quanto | qint8 per-channel weights; bf16 activations |
8 | 191.1 MB | 0.9303 | 0.9999 | 0.9968 | 0.9929 | 0.9553 | 0.7862 | 0.142 | 31 |
quanto_qint4/ |
optimum-quanto | qint4 per-channel weights; bf16 activations |
4 | 105.5 MB | 0.9334 | 0.9999 | 0.9967 | 0.9938 | 0.9555 | 0.7540 | 0.731 | 403 |
quanto_qint8_act8/ |
optimum-quanto | qint8 weights and calibrated qint8 activations |
8 | 191.1 MB | 0.8271 | 0.9999 | 0.9968 | 0.9917 | 0.9553 | 0.7908 | 0.904 | 422 |
quanto_qint4_act8/ |
optimum-quanto | qint4 weights and calibrated qint8 activations |
4 | 105.5 MB | 0.7942 | 0.9999 | 0.9964 | 0.9924 | 0.9555 | 0.7517 | 0.948 | 642 |
"Decisions changed" counts, over 6,516 decisions (six questions on every window that has them), how many land on the other side of the question's decision point, or on another class for speaker_count, compared with the fp32 reference. "Max. probability change" is the largest absolute change of any probability.
voice_activity has two rows of labels: the full eight-second window and its last second, which
is what a streaming pipeline reads.
The two calibrated rows used 128 public eight-second windows that are not in the evaluation set:
48 from pipecat-ai/smart-turn-data-v3.2-train @ f8c95d28, 48 from the dev split of
diarizers-community/voxconverse @ 3acfa1b4 and 32 from the es_419 train split of
google/fleurs @ 168de341. Every other folder was quantized without data.
Latency and throughput
Encoder time for one call, from audio samples to hidden states on the host (log-mel features
included, heads excluded). "12 layers" is the pass that stops at layer 12, which serves
voice_activity and the speaker questions; "18 layers" also serves turn_end. One window
always runs all 18 layers. Each table is one machine, with the unquantized float32 and bfloat16
encoders measured in the same session; numbers from different tables are not comparable.
_compile rows wrap every transformer layer in torch.compile(mode="max-autotune-no-cudagraphs").
NVIDIA L4 (24 GB), host CPU AMD EPYC 7702 64-Core Processor, 16 torch threads, torch 2.8.0+cu128, one process
| Encoder | Batch 1, 18 layers: p50 ms | Batch 16, 12 layers: p50 ms | windows/s | vs. bf16 | Batch 16, 18 layers: p50 ms | windows/s | vs. bf16 | Encoder weights on GPU | Peak GPU memory allocated, batches up to 32 |
|---|---|---|---|---|---|---|---|---|---|
| unquantized float32 | 15.7 | 101.0 | 159 | 0.34x | 129.6 | 123 | 0.31x | 711 MiB | 6505 MiB |
| unquantized bfloat16 | 11.6 | 34.1 | 468 | 1.00x | 40.0 | 400 | 1.00x | 355 MiB | 3118 MiB |
bnb_int8 |
44.8 | 40.0 | 400 | 0.85x | 48.9 | 326 | 0.81x | 182 MiB | 2945 MiB |
bnb_int8_t6 |
73.6 | 68.5 | 231 | 0.49x | 97.2 | 164 | 0.41x | 182 MiB | 2945 MiB |
torchao_int8wo |
26.9 | 38.0 | 420 | 0.90x | 46.0 | 347 | 0.87x | 183 MiB | 2945 MiB |
torchao_int8dyn |
179.5 | 138.1 | 115 | 0.25x | 193.3 | 82 | 0.20x | 182 MiB | 2944 MiB |
torchao_float8wo |
28.9 | 40.0 | 400 | 0.85x | 48.9 | 327 | 0.82x | 182 MiB | 2945 MiB |
torchao_float8dyn |
62.0 | 42.5 | 373 | 0.80x | 57.3 | 275 | 0.69x | 182 MiB | 2944 MiB |
quanto_qint8 |
20.9 | 37.0 | 432 | 0.92x | 44.2 | 361 | 0.90x | 182 MiB | 2944 MiB |
NVIDIA RTX PRO 4500 Blackwell (32 GB), host CPU AMD EPYC 7663 56-Core Processor, 16 torch threads, torch 2.8.0+cu128, one process
| Encoder | Batch 1, 18 layers: p50 ms | Batch 16, 12 layers: p50 ms | windows/s | vs. bf16 | Batch 16, 18 layers: p50 ms | windows/s | vs. bf16 | Encoder weights on GPU | Peak GPU memory allocated, batches up to 32 |
|---|---|---|---|---|---|---|---|---|---|
| unquantized float32 | 11.1 | 46.0 | 348 | 0.34x | 57.9 | 277 | 0.32x | 711 MiB | 6505 MiB |
| unquantized bfloat16 | 9.7 | 15.8 | 1013 | 1.00x | 18.4 | 867 | 1.00x | 355 MiB | 3118 MiB |
unquantized bfloat16, _compile |
8.1 | 16.3 | 978 | 0.96x | 19.5 | 818 | 0.94x | 355 MiB | 3118 MiB |
bnb_int8 |
37.4 | 24.9 | 641 | 0.63x | 36.0 | 444 | 0.51x | 182 MiB | 2945 MiB |
bnb_int8_t6 |
63.3 | 51.2 | 312 | 0.31x | 75.2 | 212 | 0.24x | 182 MiB | 2945 MiB |
bnb_nf4 |
17.4 | 16.0 | 999 | 0.99x | 19.0 | 842 | 0.97x | 106 MiB | 2868 MiB |
torchao_int8wo |
17.6 | 18.9 | 847 | 0.84x | 23.2 | 689 | 0.79x | 183 MiB | 2945 MiB |
torchao_int8dyn |
146.1 | 104.5 | 153 | 0.15x | 150.5 | 106 | 0.12x | 182 MiB | 2944 MiB |
torchao_int4wo |
18.1 | 37.0 | 432 | 0.43x | 50.1 | 320 | 0.37x | 128 MiB | 2891 MiB |
torchao_float8wo |
20.5 | 17.7 | 902 | 0.89x | 21.5 | 744 | 0.86x | 182 MiB | 2945 MiB |
torchao_float8dyn |
52.0 | 34.4 | 454 | 0.45x | 50.3 | 316 | 0.36x | 182 MiB | 2944 MiB |
quanto_qint8 |
18.8 | 18.6 | 859 | 0.85x | 22.8 | 702 | 0.81x | 182 MiB | 2944 MiB |
quanto_qint4 |
13.6 | 33.2 | 482 | 0.48x | 44.3 | 361 | 0.42x | 101 MiB | 2863 MiB |
quanto_qint8_act8 |
53.0 | 36.4 | 428 | 0.42x | 53.4 | 297 | 0.34x | 183 MiB | 2945 MiB |
quanto_qint4_act8 |
49.9 | 38.3 | 417 | 0.41x | 51.7 | 310 | 0.36x | 102 MiB | 2864 MiB |
torchao_int8wo_compile |
12.0 | 16.5 | 966 | 0.95x | 19.7 | 812 | 0.94x | 183 MiB | 2945 MiB |
torchao_int8dyn_compile |
17.7 | 18.5 | 857 | 0.85x | 22.9 | 695 | 0.80x | 182 MiB | 2944 MiB |
torchao_float8wo_compile |
20.6 | 18.6 | 859 | 0.85x | 22.9 | 695 | 0.80x | 182 MiB | 2945 MiB |
torchao_float8dyn_compile |
15.0 | 14.6 | 1093 | 1.08x | 17.1 | 918 | 1.06x | 182 MiB | 2944 MiB |
torchao_int4wo_compile |
12.8 | 35.7 | 448 | 0.44x | 47.9 | 333 | 0.38x | 128 MiB | 2891 MiB |
NVIDIA L4 (24 GB), host CPU AMD EPYC 7702 64-Core Processor, 4 torch threads, torch 2.8.0+cu128, one process and two processes sharing the GPU
| Encoder | Batch 1, 18 layers: p50 ms | Batch 16, 12 layers: p50 ms | windows/s | vs. bf16 | Batch 16, 18 layers: p50 ms | windows/s | vs. bf16 | Two processes, batch 16, 12 layers: windows/s summed | vs. bf16 |
|---|---|---|---|---|---|---|---|---|---|
| unquantized float32 | 15.0 | 101.5 | 158 | 0.35x | 129.4 | 124 | 0.31x | 148 | 0.33x |
| unquantized bfloat16 | 13.5 | 35.3 | 451 | 1.00x | 40.0 | 399 | 1.00x | 452 | 1.00x |
unquantized bfloat16, _compile |
12.0 | 32.9 | 486 | 1.08x | 37.8 | 423 | 1.06x | 475 | 1.05x |
bnb_int8 |
41.7 | 40.5 | 393 | 0.87x | 49.4 | 323 | 0.81x | 376 | 0.83x |
bnb_int8_t6 |
72.4 | 73.0 | 219 | 0.49x | 100.4 | 158 | 0.40x | 252 | 0.56x |
bnb_nf4 |
19.6 | 35.0 | 456 | 1.01x | 40.6 | 393 | 0.98x | 439 | 0.97x |
torchao_int8wo |
21.7 | 37.9 | 421 | 0.93x | 45.2 | 353 | 0.88x | 406 | 0.90x |
torchao_int8dyn |
199.9 | 140.9 | 113 | 0.25x | 206.0 | 76 | 0.19x | 180 | 0.40x |
torchao_int4wo |
21.9 | 76.5 | 210 | 0.46x | 100.1 | 160 | 0.40x | 189 | 0.42x |
torchao_float8wo |
28.0 | 40.2 | 396 | 0.88x | 49.0 | 327 | 0.82x | 379 | 0.84x |
torchao_float8dyn |
62.3 | 41.7 | 380 | 0.84x | 63.4 | 250 | 0.63x | 390 | 0.86x |
quanto_qint8 |
25.6 | 37.4 | 427 | 0.95x | 44.6 | 358 | 0.90x | 408 | 0.90x |
quanto_qint4 |
18.4 | 69.9 | 229 | 0.51x | 92.0 | 174 | 0.44x | 207 | 0.46x |
torchao_int8wo_compile |
18.0 | 34.2 | 467 | 1.03x | 39.2 | 407 | 1.02x | 457 | 1.01x |
torchao_int8dyn_compile |
22.7 | 35.5 | 447 | 0.99x | 39.8 | 400 | 1.00x | 459 | 1.02x |
torchao_float8wo_compile |
28.8 | 39.9 | 400 | 0.89x | 48.6 | 328 | 0.82x | 387 | 0.86x |
torchao_float8dyn_compile |
29.1 | 33.3 | 480 | 1.06x | 37.5 | 425 | 1.06x | 486 | 1.08x |
Peak GPU memory includes the text decoder of the original checkpoint (about 1,140 MiB in bfloat16), which the measured processes kept on the GPU. On the L4 the encoders were quantized in memory with the same settings as the published files.
On the L4 one process at batch 16 keeps the GPU about 90% busy for the bfloat16 encoder, and two processes share the same total throughput. Runs of the same encoder on the same machine differed by up to 4% in windows/s.
How to use
Requirements: a CUDA GPU, marimba-audio 0.1.2, torch 2.8.0, transformers 4.57.6 and the library
of the folder you load (bitsandbytes==0.50.2, torchao==0.13.0 or optimum-quanto==0.2.7).
loader.py in this repository rebuilds the encoder from its configuration and fills
it from a folder.
import numpy as np
from huggingface_hub import snapshot_download
from marimba import Marimba
import loader # loader.py from this repository
folder = "quanto_qint8"
root = snapshot_download("charcot-ai/marimba-quant-torch-int", allow_patterns=[f"{folder}/*"])
loader.skip_original_weights() # optional: do not download or load the 1.88 GB checkpoint
model = Marimba.from_pretrained(backend="torch", device="cuda", dtype="bfloat16")
loader.load_audio_tower(model, f"{root}/{folder}")
windows = np.zeros((16, 128000), dtype=np.float32) # 8 s of 16 kHz mono audio per row
states = loader.hidden_states(model, windows) # {9: ..., 12: ..., 18: ...}
print({layer: values.shape for layer, values in states.items()}) # (16, 104, 896) each
After load_audio_tower, the encoder questions of the Marimba API (turn_end,
voice_activity, same_speaker, speaker_change, speaker_count) run on the quantized
encoder. bnb_int8 takes an optional threshold argument (load_audio_tower(model, path, threshold=6.0)), the outlier threshold of Linear8bitLt.
With skip_original_weights(), the download is one folder of this repository plus the heads
and small configuration files: about 110 MB of other files instead of the 1,876 MB checkpoint.
Without it, the package loads the original checkpoint first and the encoder is then replaced.
Limitations
- GPU only as published: the folders were produced and measured on CUDA with bfloat16 activations. CPU inference with these files was not evaluated.
loader.pyrelies on private attributes ofmarimba-audio0.1.2 and may need changes for other versions. The torchao files are pickledstate_dicts tied to torchao 0.13.0; load them withweights_only=True, as the loader does.- The Marimba heads and readouts were fitted on activations of the unquantized encoder and were
not refitted for any folder here. Probabilities move with the encoder, as the tables show;
turn_end, which reads layer 18, moves the most. - The evaluation covers 1,170 windows of public English and Portuguese audio. It does not measure other languages, other window lengths, or domain audio such as telephone speech.
- Latency was measured on the machines named above; it depends on the GPU, the batch size and the host CPU.
- The text decoder of Qwen3-ASR-0.6B is not quantized here.
License and attribution
- These files are derived from Qwen/Qwen3-ASR-0.6B by the Qwen team, released under
Apache-2.0 at revision
5eb144179a02acc5e5ba31e748d22b0cf3e303b0, and are distributed under Apache-2.0. - Quantization tools: bitsandbytes 0.50.2 (MIT), torchao 0.13.0 (BSD-3-Clause) and optimum-quanto 0.2.7 (Apache-2.0).
- Heads, readouts and package: charcot-ai/marimba and Charcot-AI/marimba-api, Apache-2.0.
- Evaluation and calibration audio comes from the public datasets listed above, under their own licenses. No audio is distributed in this repository.