Marimba audio encoder, AWQ weight quantization

Weight-quantized copies of the frozen audio encoder that Marimba reads its decisions from, produced with AWQ (activation-aware weight quantization) at 8, 6, 5 and 4 bits. Every variant that was built is published here with its measured metrics, so the effect of each bit width, group size and layer plan can be compared.

What is in each folder. Only the audio encoder: the three Conv2d layers, conv_out and the 18 transformer layers of the thinker.audio_tower of Qwen/Qwen3-ASR-0.6B. The nn.Linear weights (109 matrices: conv_out and q_proj, k_proj, v_proj, out_proj, fc1, fc2 of every layer) are stored as packed integers with a scale and zero point per group; convolutions, biases and layer norms stay in floating point. The decision heads and readouts are not included: they come from charcot-ai/marimba and are used unchanged. The text decoder is not included either.

What it is not. These are not integer-inference models. At load time the integers are converted back to floating point and the encoder runs the regular bf16 forward, so speed and memory match the unquantized encoder. The gain is the size of the encoder file.

Source code of the package.

Files

Path Content
<variant>/encoder.safetensors Packed integer weights (.q), per-group .scale and .zero, and the floating-point tensors of the encoder
<variant>/awq_config.json Bits, shape and group size of every quantized matrix, calibration summary, source revisions
<variant>/awq_report.json Scale-search result per layer (direct implementation only)
awq_core.py The direct AWQ implementation and the loader used below

For size comparison: the same tensors in the source checkpoint (bf16) take 369.3 MB, the whole thinker.audio_tower 372.8 MB, and the full Qwen3-ASR-0.6B model.safetensors 1.88 GB.

Evaluation

Each variant replaces the encoder weights, and the unchanged Marimba heads turn the hidden states of layers 9, 12 and 18 into decisions. AUROC and accuracy are computed against the public labels. The value in parentheses is the difference from the fp32 reference. "Decision changes" counts decisions that differ from the fp32 reference, out of 6,516 (six decision types over the windows below); "max probability change" is the largest absolute change of any output probability. Quantized variants were run in bf16 on the batched GPU path (NVIDIA GeForce RTX 4090). bf16 arithmetic is not bit-identical across GPUs: on an NVIDIA L4 the same files give figures that differ in the third or fourth decimal (for example awq_w6_g128 speaker_count accuracy 0.7782 instead of 0.7805).

Folder Bits Scheme Size (MB) turn_end AUROC voice_activity AUROC same_speaker AUROC speaker_change AUROC speaker_count accuracy Decision changes Max probability change
fp32 reference 32 unquantized, one window at a time, CPU - 0.9310 0.9969 0.9926 0.9557 0.7862 0 0.000
unquantized bf16 16 source weights, batched GPU path 369.3 0.9319 (+0.0009) 0.9969 (-0.0000) 0.9929 (+0.0003) 0.9556 (-0.0001) 0.7874 (+0.0011) 10 0.122
awq_w8_g128 8 AWQ scale + clip search, asymmetric, group 128 196.3 0.9307 (-0.0003) 0.9970 (+0.0000) 0.9925 (-0.0001) 0.9559 (+0.0002) 0.7885 (+0.0023) 26 0.121
awq_w8_g128_sym 8 AWQ scale + clip search, symmetric, group 128 196.3 0.9316 (+0.0006) 0.9969 (+0.0000) 0.9932 (+0.0006) 0.9559 (+0.0002) 0.7885 (+0.0023) 19 0.152
rtn_w8_g128 8 round to nearest (no search), asymmetric, group 128 196.1 0.9305 (-0.0005) 0.9969 (-0.0000) 0.9929 (+0.0003) 0.9554 (-0.0003) 0.7839 (-0.0023) 16 0.143
llmc_awq_w8a16 8 llm-compressor AWQModifier, W8A16 (symmetric, per output channel) 190.0 0.9297 (-0.0013) 0.9969 (-0.0000) 0.9928 (+0.0002) 0.9556 (-0.0001) 0.7839 (-0.0023) 42 0.101
awq_w6_g128 6 AWQ scale + clip search, asymmetric, group 128 151.2 0.9291 (-0.0019) 0.9968 (-0.0001) 0.9931 (+0.0004) 0.9555 (-0.0002) 0.7805 (-0.0057) 68 0.288
awq_w6_g32 6 AWQ scale + clip search, asymmetric, group 32 172.3 0.9311 (+0.0001) 0.9969 (-0.0000) 0.9936 (+0.0009) 0.9550 (-0.0007) 0.7862 (+0.0000) 53 0.160
awq_w5_g128 5 AWQ scale + clip search, asymmetric, group 128 128.7 0.9327 (+0.0017) 0.9968 (-0.0001) 0.9926 (+0.0000) 0.9559 (+0.0002) 0.7885 (+0.0023) 116 0.342
awq_w5_g32 5 AWQ scale + clip search, asymmetric, group 32 149.8 0.9236 (-0.0073) 0.9969 (-0.0000) 0.9915 (-0.0011) 0.9543 (-0.0014) 0.7908 (+0.0046) 84 0.284
awq_w4_g128 4 AWQ scale + clip search, asymmetric, group 128 106.1 0.9188 (-0.0122) 0.9968 (-0.0002) 0.9900 (-0.0027) 0.9512 (-0.0045) 0.7678 (-0.0184) 221 0.652
awq_w4_g128_sym 4 AWQ scale + clip search, symmetric, group 128 106.1 0.9198 (-0.0112) 0.9970 (+0.0000) 0.9891 (-0.0035) 0.9535 (-0.0022) 0.7575 (-0.0287) 232 0.708
awq_w4_g32 4 AWQ scale + clip search, asymmetric, group 32 127.3 0.9346 (+0.0036) 0.9967 (-0.0003) 0.9924 (-0.0002) 0.9523 (-0.0035) 0.7563 (-0.0299) 210 0.575
rtn_w4_g128 4 round to nearest (no search), asymmetric, group 128 106.0 0.9249 (-0.0060) 0.9968 (-0.0001) 0.9924 (-0.0002) 0.9533 (-0.0024) 0.7862 (+0.0000) 282 0.694
llmc_awq_w4a16 4 llm-compressor AWQModifier, W4A16 (symmetric, group 128) 106.1 0.9098 (-0.0212) 0.9966 (-0.0003) 0.9890 (-0.0036) 0.9506 (-0.0052) 0.7655 (-0.0207) 321 0.725
llmc_awq_w4a16_asym 4 llm-compressor AWQModifier, W4A16_ASYM (asymmetric, group 128) 106.1 0.9263 (-0.0047) 0.9967 (-0.0003) 0.9918 (-0.0008) 0.9525 (-0.0033) 0.7644 (-0.0218) 234 0.777
awq_w4_g128_convout8 4 / 8 AWQ, asymmetric, group 128; conv_out at 8 bits 109.6 0.9241 (-0.0069) 0.9964 (-0.0005) 0.9896 (-0.0030) 0.9512 (-0.0046) 0.7460 (-0.0402) 237 0.762
awq_w4_g128_l1-4w8 4 / 8 AWQ, asymmetric, group 128; conv_out and layers 1-4 at 8 bits 128.8 0.9184 (-0.0126) 0.9966 (-0.0004) 0.9917 (-0.0009) 0.9531 (-0.0027) 0.7471 (-0.0391) 232 0.613
awq_w4_g128_l13-18w8 4 / 8 AWQ, asymmetric, group 128; layers 13-18 at 8 bits 135.0 0.9347 (+0.0037) 0.9968 (-0.0002) 0.9900 (-0.0027) 0.9512 (-0.0045) 0.7678 (-0.0184) 178 0.652
awq_w4_g32_l13-18w8 4 / 8 AWQ, asymmetric, group 32; layers 13-18 at 8 bits 156.2 0.9300 (-0.0009) 0.9967 (-0.0003) 0.9924 (-0.0002) 0.9523 (-0.0035) 0.7563 (-0.0299) 158 0.575
awq_w8_g128_l13-18w4 8 / 4 AWQ, asymmetric, group 128; layers 13-18 at 4 bits 167.4 0.9231 (-0.0079) 0.9970 (+0.0000) 0.9925 (-0.0001) 0.9559 (+0.0002) 0.7885 (+0.0023) 100 0.533

voice_activity is read on the last second of the window, as in streaming use. Read on the full eight seconds, its AUROC is 0.9999 in every row.

Evaluation data

1,170 public eight-second windows (16 kHz mono), none of them used for calibration:

Source Split Revision Windows Used for
pipecat-ai/smart-turn-data-v3.2-test test dfc179241fee65b0efe81ca37786f41ce26f38ec 300 turn_end
diarizers-community/voxconverse test 3acfa1b45ca4b7419aee999d67d94c617f9c9d47 513 voice_activity, same_speaker, speaker_change, speaker_count
diarizers-community/ami (ihm) test 8cdaae2eaf968f3b000b6eb1204ab9b8db006ed0 107 voice_activity, same_speaker, speaker_change, speaker_count
ashraq/esc50 (non-human sound classes) train e3e2a63ffff66b9a9735524551e3818e96af03ee 150 voice_activity (no speech), speaker_count (zero speakers)
google/fleurs (pt_br) validation 168de341b3db6859a9bac1c50a2ef5e3b47647e0 100 voice_activity on the full window (speech), speaker_count

Labeled windows per decision: turn_end 300, voice_activity 740 (last second) and 832 (full window), same_speaker 252, speaker_change 418, speaker_count 870.

Calibration data

384 public eight-second windows, disjoint from the evaluation windows. Each variant used 256 of them for the AWQ search; the direct implementation kept the other 128 to measure hidden-state drift (reported in awq_config.json).

Source Split Revision Windows
diarizers-community/voxconverse dev 3acfa1b45ca4b7419aee999d67d94c617f9c9d47 144
diarizers-community/ami (ihm) train 8cdaae2eaf968f3b000b6eb1204ab9b8db006ed0 72
pipecat-ai/smart-turn-data-v3.2-train train f8c95d284595defb6b88a715c356cbc5c31b7ad1 96
google/fleurs (es_419) train 168de341b3db6859a9bac1c50a2ef5e3b47647e0 36
google/fleurs (en_us) train 168de341b3db6859a9bac1c50a2ef5e3b47647e0 36

No audio is distributed in this repository.

Measured latency

Encoder only (log-mel, forward and copy of the hidden states to the CPU), eight-second windows. "Hop" stops at layer 12 and "full" runs to layer 18. With a single window the package always runs all 18 layers, so the two batch-1 columns measure the same path. Each table was measured on one machine in one run, and its first row is the unquantized bf16 baseline of that machine. Numbers from one table must not be compared with another. Torch 2.8.0+cu128, Transformers 4.57.6, SDPA.

NVIDIA L4 (23 GB), host CPU AMD EPYC 7542, 4 CPU threads:

Hardware Encoder weights Hop (layer 12), batch 1, p50 / p95 ms Hop, batch 16, p50 / p95 ms Hop, batch 16, windows/s Full (layer 18), batch 1, p50 / p95 ms Full, batch 16, p50 / p95 ms Full, batch 16, windows/s
NVIDIA L4, 4 CPU threads unquantized bf16 (baseline) 11.4 / 12.3 33.8 / 34.7 472 11.5 / 12.5 39.9 / 40.9 401
NVIDIA L4, 4 CPU threads unquantized fp32 13.6 / 14.1 100.0 / 100.7 160 13.7 / 15.0 127.0 / 130.8 126
NVIDIA L4, 4 CPU threads awq_w8_g128 dequantized to bf16 at load 11.0 / 11.5 33.8 / 35.1 472 10.8 / 11.6 39.3 / 41.0 405
NVIDIA L4, 4 CPU threads awq_w8_g128_sym dequantized to bf16 at load 10.8 / 11.8 34.1 / 35.1 469 10.7 / 11.3 39.9 / 41.1 401
NVIDIA L4, 4 CPU threads rtn_w8_g128 dequantized to bf16 at load 11.4 / 12.4 34.0 / 35.3 469 11.6 / 12.8 39.8 / 41.1 401
NVIDIA L4, 4 CPU threads llmc_awq_w8a16 dequantized to bf16 at load 10.9 / 11.8 33.9 / 35.1 470 10.9 / 11.3 39.9 / 41.4 401
NVIDIA L4, 4 CPU threads awq_w6_g128 dequantized to bf16 at load 11.5 / 12.6 34.9 / 36.3 458 11.4 / 12.8 39.9 / 40.8 400
NVIDIA L4, 4 CPU threads awq_w6_g32 dequantized to bf16 at load 10.6 / 11.4 33.9 / 34.9 471 10.7 / 11.1 39.8 / 41.2 401
NVIDIA L4, 4 CPU threads awq_w5_g128 dequantized to bf16 at load 11.1 / 12.6 34.1 / 35.2 469 11.2 / 12.6 39.9 / 41.1 401
NVIDIA L4, 4 CPU threads awq_w8_g128 kept as integers, rebuilt to bf16 on every call 18.9 / 20.0 37.6 / 38.3 425 17.6 / 19.2 44.5 / 45.8 358

NVIDIA L4, integer kernel. The only integer GPU kernel found that runs these matrices is the Marlin AWQ kernel of GPTQModel 5.7.0. It accepts symmetric quantization only, so it was measured on awq_w4_g128_sym, with fp16 activations. For the symmetric 8-bit variant the kernel raised Invalid thread config and produced no measurement, and no bf16 measurement of the kernel was obtained. Same machine, separate environment (GPTQModel 5.7.0, Torch 2.8.0+cu128). With the kernel, the encoder weights take 111 MB of GPU memory instead of 378 MB:

Hardware Encoder weights Hop (layer 12), batch 1, p50 / p95 ms Hop, batch 16, p50 / p95 ms Hop, batch 16, windows/s Full (layer 18), batch 1, p50 / p95 ms Full, batch 16, p50 / p95 ms Full, batch 16, windows/s
NVIDIA L4, 4 CPU threads unquantized bf16 (baseline) 11.5 / 13.2 34.4 / 35.6 464 11.4 / 14.3 40.0 / 41.2 401
NVIDIA L4, 4 CPU threads unquantized fp16 11.5 / 12.4 33.8 / 35.6 471 12.5 / 13.9 39.8 / 40.7 403
NVIDIA L4, 4 CPU threads awq_w4_g128_sym dequantized to fp16 at load 12.2 / 13.5 33.3 / 34.9 480 11.7 / 12.2 39.7 / 40.8 404
NVIDIA L4, 4 CPU threads awq_w4_g128_sym, Marlin 4-bit kernel, fp16 activations 13.3 / 15.9 32.4 / 33.3 494 13.0 / 13.9 38.0 / 39.1 421

NVIDIA GeForce RTX 4090 (24 GB), host CPU AMD EPYC 7443, 6 CPU threads:

Hardware Encoder weights Hop (layer 12), batch 1, p50 / p95 ms Hop, batch 16, p50 / p95 ms Hop, batch 16, windows/s Full (layer 18), batch 1, p50 / p95 ms Full, batch 16, p50 / p95 ms Full, batch 16, windows/s
NVIDIA GeForce RTX 4090, 6 CPU threads unquantized bf16 (baseline) 8.5 / 9.0 12.6 / 12.9 1264 8.8 / 9.0 14.6 / 15.0 1088
NVIDIA GeForce RTX 4090, 6 CPU threads unquantized fp32 9.0 / 9.8 29.5 / 29.9 543 9.0 / 9.4 36.3 / 36.6 442
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w8_g128 dequantized to bf16 at load 8.6 / 9.2 12.6 / 12.9 1265 8.9 / 9.1 14.6 / 14.9 1090
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w8_g128_sym dequantized to bf16 at load 8.7 / 9.4 12.5 / 12.7 1275 8.8 / 9.2 14.6 / 15.2 1087
NVIDIA GeForce RTX 4090, 6 CPU threads rtn_w8_g128 dequantized to bf16 at load 9.0 / 9.5 12.6 / 13.0 1262 8.7 / 8.9 14.6 / 14.9 1089
NVIDIA GeForce RTX 4090, 6 CPU threads llmc_awq_w8a16 dequantized to bf16 at load 8.7 / 9.0 12.7 / 12.9 1257 9.2 / 9.8 14.7 / 15.0 1083
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w6_g128 dequantized to bf16 at load 8.5 / 9.0 12.6 / 12.9 1267 8.6 / 8.8 14.6 / 15.0 1087
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w6_g32 dequantized to bf16 at load 8.7 / 10.0 12.6 / 13.0 1264 8.7 / 9.6 14.6 / 14.9 1090
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w5_g128 dequantized to bf16 at load 8.6 / 8.9 12.7 / 13.0 1253 8.7 / 9.1 14.6 / 14.9 1091
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w5_g32 dequantized to bf16 at load 8.7 / 9.2 12.6 / 12.9 1269 8.8 / 9.0 14.6 / 14.9 1088
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g128 dequantized to bf16 at load 8.4 / 9.5 12.5 / 12.9 1271 8.8 / 9.1 14.6 / 14.9 1091
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g128_sym dequantized to bf16 at load 8.6 / 9.5 12.7 / 13.0 1256 8.8 / 9.1 14.7 / 15.0 1086
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g32 dequantized to bf16 at load 8.7 / 9.9 12.6 / 12.9 1264 8.6 / 9.1 14.7 / 15.0 1087
NVIDIA GeForce RTX 4090, 6 CPU threads rtn_w4_g128 dequantized to bf16 at load 8.6 / 9.6 12.6 / 12.9 1263 8.9 / 9.6 14.7 / 15.0 1087
NVIDIA GeForce RTX 4090, 6 CPU threads llmc_awq_w4a16 dequantized to bf16 at load 8.6 / 8.8 12.6 / 12.9 1266 8.8 / 9.1 14.7 / 15.0 1086
NVIDIA GeForce RTX 4090, 6 CPU threads llmc_awq_w4a16_asym dequantized to bf16 at load 8.5 / 8.8 12.6 / 12.9 1265 8.7 / 9.0 14.7 / 15.0 1087
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g128_convout8 dequantized to bf16 at load 8.6 / 9.7 12.6 / 12.9 1267 8.6 / 9.2 14.7 / 15.1 1083
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g128_l1-4w8 dequantized to bf16 at load 8.7 / 9.4 12.6 / 12.9 1267 8.5 / 9.1 14.6 / 14.9 1089
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g128_l13-18w8 dequantized to bf16 at load 8.8 / 9.5 12.6 / 12.9 1262 8.8 / 9.4 14.7 / 15.0 1085
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w4_g32_l13-18w8 dequantized to bf16 at load 8.5 / 8.9 12.5 / 12.9 1269 8.9 / 9.4 14.6 / 14.9 1091
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w8_g128_l13-18w4 dequantized to bf16 at load 8.8 / 9.0 12.7 / 12.9 1258 9.0 / 9.2 14.7 / 15.0 1084
NVIDIA GeForce RTX 4090, 6 CPU threads awq_w8_g128 kept as integers, rebuilt to bf16 on every call 13.7 / 14.1 14.0 / 14.3 1138 13.8 / 14.1 16.8 / 17.1 951

How to use

Tested with Python 3.12, torch 2.8.0+cu128, transformers 4.57.6, safetensors 0.8.0, numpy 2.5.5, huggingface_hub 0.36.2 and marimba-audio 0.1.2 at commit f58980ab80a54943929074aff23159caa026c7cf.

pip install "marimba-audio[torch] @ git+https://github.com/Charcot-AI/marimba-api@f58980ab80a54943929074aff23159caa026c7cf"
import sys

import numpy as np
from huggingface_hub import snapshot_download
from marimba import Marimba

VARIANT = "awq_w8_g128"
root = snapshot_download("charcot-ai/marimba-quant-awq", allow_patterns=["awq_core.py", f"{VARIANT}/*"])
sys.path.insert(0, root)
import awq_core

model = Marimba.from_pretrained(backend="torch", device="cuda", dtype="bfloat16")
engine = model._engine
tower = engine.thinker.audio_tower
awq_core.apply_state(tower, awq_core.load_state(f"{root}/{VARIANT}", "cuda"))

# Two or more eight-second windows, 16 kHz mono, float32 in [-1, 1).
windows = [np.zeros(128000, dtype=np.float32) for _ in range(2)]
rows = engine.encode_batch(windows, ["voice_activity", "speaker_change", "turn_end"])
batch = rows[0]["features"].batch
states = {layer: batch.layer(layer) for layer in batch.captures}
# states[9], states[12], states[18]: float32 arrays of shape [2, 104, 896]

apply_state changes the encoder weights of the loaded model in place, so later calls on model run on the quantized encoder with the original heads.

Method

  • Direct implementation (awq_core.py, folders awq_* and rtn_*). Per encoder layer, following the AWQ reference algorithm: a grid search of per-channel scales on three pairs (self_attn_layer_norm to q_proj/k_proj/v_proj, v_proj to out_proj, final_layer_norm to fc1), a clipping search, then min-max quantization per group of input features. Each layer is calibrated on the output of the already quantized layers. fc1 to fc2 is not used as a pair because GELU sits between them. rtn_* folders skip both searches and are the round-to-nearest comparison.
  • llm-compressor (folders llmc_*). AWQModifier with oneshot, the same three pairs declared by hand, and a thin wrapper that feeds batches of log-mel blocks to the encoder; the default mappings and the unwrapped encoder are not accepted by the tool. Weights are re-packed in the same file format.

Limitations

  • No integer inference: latency and GPU memory are those of the unquantized bf16 encoder. The integer-kernel table above is the only exception measured.
  • At the pinned commit, Marimba.from_pretrained still downloads and loads the full Qwen3-ASR-0.6B checkpoint before these weights replace the encoder weights. Loading the encoder from this file alone needs a loader that the package does not have yet.
  • The 5- and 6-bit files are unpacked with NumPy on the CPU and took 5.3 to 7.7 s to load on the two machines above, against 0.06 to 0.13 s for the 4- and 8-bit files.
  • model._engine is an internal attribute of the package and may change.
  • Metrics come from 1,170 windows of the public sets listed above. Other domains, languages and microphones were not measured, and the heads were not re-fitted on quantized hidden states.
  • Calibration used 256 windows; larger or different calibration sets were not explored.
  • The limits of the base model apply: eight-second windows, no speaker identities, not a general-purpose audio understanding system.

Attribution

  • Qwen/Qwen3-ASR-0.6B, by the Qwen team: Apache-2.0. The encoder weights are derived from the thinker.audio_tower at revision 5eb144179a02acc5e5ba31e748d22b0cf3e303b0 (model card).
  • AWQ: Lin et al., "AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration" (arXiv:2306.00978). The direct implementation in awq_core.py follows the reference algorithm.
  • llm-compressor 0.10.0.5 with compressed-tensors 0.14.0.1 (Torch 2.10.0) for the llmc_* folders.
  • GPTQModel 5.7.0 for the Marlin kernel in the integer-kernel latency table.
  • Marimba heads and package: charcot-ai/marimba, Apache-2.0.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for charcot-ai/marimba-quant-awq

Finetuned
(4)
this model

Paper for charcot-ai/marimba-quant-awq