Marimba audio encoder, GPTQ weight quantization

GPTQ-quantized copies of the frozen audio encoder that Marimba reads, in 8-bit and 4-bit weights. Each folder holds one variant. The files are smaller to download than the bf16 encoder; at inference the integers are converted back to floating point, so speed and GPU memory are those of the bf16 encoder.

  • 8-bit files are 189 to 196 MB against 373 MB for the same encoder stored in bf16. The GPTQ ones score within 0.001 AUROC of the fp32 reference on every binary question.
  • 4-bit files are 99 to 131 MB (one mixed variant is 188 MB). Their scores move more and depend on which calibration windows were drawn: compare the w4g32, w4g32_s1, w4g32_s2 and w4g32_s3 rows, which differ only in that draw.

What a file contains

<variant>/encoder.safetensors is the audio encoder of Qwen/Qwen3-ASR-0.6B (thinker.audio_tower): three convolutions, the conv_out projection and 18 transformer layers. The 109 nn.Linear weights (conv_out and q_proj, k_proj, v_proj, out_proj, fc1, fc2 of each layer) are stored as integers with a float16 scale per output row or per group of input columns. Convolutions, layer norms and biases stay in bf16. 4-bit integers are packed two per byte.

The files do not contain the Marimba heads and readouts (they come from charcot-ai/marimba), the Qwen3-ASR text decoder, or the encoder's output projection to the decoder (ln_post, proj1, proj2). They serve the questions answered from encoder layers 9, 12 and 18: voice activity, speaker change, speaker count, same speaker and turn end. Language and term questions need the text decoder and are outside what was evaluated here.

<variant>/quantize.json records the quantization arguments, the calibration sources and the per-layer weight change. gptq_format.py reads the files.

Usage

Tested with marimba-audio at commit f58980a, torch==2.8.0, transformers==4.57.6, safetensors==0.8.0 and huggingface_hub==0.36.2.

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

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

repo = "charcot-ai/marimba-quant-gptq"
spec = importlib.util.spec_from_file_location("gptq_format", hf_hub_download(repo, "gptq_format.py"))
gptq_format = importlib.util.module_from_spec(spec)
spec.loader.exec_module(gptq_format)

model = Marimba.from_pretrained(backend="torch", device="cuda", dtype="bfloat16")
engine = model._engine
state, header = gptq_format.load_artifact(hf_hub_download(repo, "w8ch/encoder.safetensors"), device="cuda")
engine.thinker.audio_tower.load_state_dict(state, strict=False)

# Two or more 8 s windows, 16 kHz mono float32 in [-1, 1). Replace the silence with your audio.
windows = [np.zeros(128_000, 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}
print({layer: value.shape for layer, value in states.items()})  # layers 9, 12, 18: (2, 104, 896)

After load_state_dict, model(audio, questions) answers the layer 9, 12 and 18 questions with the quantized encoder. Marimba.from_pretrained still downloads the full Qwen3-ASR-0.6B checkpoint (1.88 GB); loading the encoder from these files alone needs a loader that the package does not have yet.

Evaluation

1,170 public 8-second windows, 16 kHz mono: Smart Turn v3.2 test (dfc17924) for turn end; VoxConverse test (3acfa1b4) and AMI ihm test (8cdaae2e) for the speaker questions and voice activity; ESC-50 without human-sound classes (e3e2a63f) and FLEURS pt_br validation (168de341) for voice activity. Voice activity is scored on the last second of the window.

Each variant replaces only the encoder. The heads and readouts are the fp32 ones of the package. The fp32 reference runs one window at a time on CPU. Every other row ran on one NVIDIA A40 through the batched path of the package, in bf16 unless the scheme says float32. The same files scored again on an NVIDIA L4 differ from this table by at most 0.0012 AUROC and 0.0023 speaker count accuracy. Values in parentheses are differences from the fp32 reference. Flips count windows whose decision changed against the reference (turn end as a probability at or above 0.5; speaker count as the chosen class).

Variant Scheme Size (MB) turn_end AUROC voice_activity AUROC same_speaker AUROC speaker_change AUROC speaker_count accuracy turn_end flips speaker_count flips
fp32 reference float32, CPU, one window at a time - 0.9310 0.9969 0.9926 0.9557 0.7862 0 0
torch_bf16_cuda bfloat16 - 0.9304 (-0.0006) 0.9969 (-0.0001) 0.9929 (+0.0003) 0.9557 (+0.0000) 0.7874 (+0.0011) 5 1
torch_fp32_cuda float32 - 0.9309 (-0.0000) 0.9969 (+0.0000) 0.9926 (+0.0000) 0.9558 (+0.0000) 0.7862 (+0.0000) 1 0
w8ch/ W8, per channel, symmetric, GPTQ 189.4 0.9313 (+0.0004) 0.9970 (+0.0001) 0.9927 (+0.0001) 0.9555 (-0.0002) 0.7874 (+0.0011) 16 3
w8ch_convfp/ W8, per channel, symmetric, GPTQ, conv_out unquantized 196.2 0.9308 (-0.0002) 0.9969 (+0.0000) 0.9929 (+0.0003) 0.9558 (+0.0001) 0.7885 (+0.0023) 15 6
w8ch_rtn/ W8, per channel, symmetric, RTN 189.4 0.9302 (-0.0008) 0.9970 (+0.0000) 0.9931 (+0.0005) 0.9559 (+0.0002) 0.7851 (-0.0011) 21 15
w8ch_s1/ W8, per channel, symmetric, GPTQ, calibration draw 1 189.4 0.9310 (+0.0000) 0.9969 (+0.0000) 0.9927 (+0.0001) 0.9555 (-0.0002) 0.7885 (+0.0023) 12 3
w8g128/ W8, group 128, symmetric, GPTQ 191.9 0.9304 (-0.0006) 0.9969 (-0.0001) 0.9929 (+0.0003) 0.9557 (-0.0000) 0.7874 (+0.0011) 7 2
w4ch/ W4, per channel, symmetric, GPTQ 99.2 0.9029 (-0.0281) 0.9969 (-0.0000) 0.9926 (+0.0000) 0.9523 (-0.0035) 0.7517 (-0.0345) 109 77
w4g128_asym/ W4, group 128, asymmetric, GPTQ 103.2 0.9260 (-0.0049) 0.9967 (-0.0002) 0.9919 (-0.0008) 0.9570 (+0.0013) 0.7839 (-0.0023) 80 46
w4g128/ W4, group 128, symmetric, GPTQ 101.7 0.9275 (-0.0035) 0.9966 (-0.0004) 0.9927 (+0.0001) 0.9539 (-0.0019) 0.7678 (-0.0184) 78 59
w4g128_d10/ W4, group 128, symmetric, GPTQ, dampening 0.1 101.7 0.9268 (-0.0041) 0.9965 (-0.0004) 0.9931 (+0.0005) 0.9535 (-0.0022) 0.7747 (-0.0115) 83 54
w4g128_l13_18fp/ W4, group 128, symmetric, GPTQ, layers 13-18 unquantized 187.5 0.9288 (-0.0022) 0.9966 (-0.0004) 0.9927 (+0.0001) 0.9539 (-0.0019) 0.7678 (-0.0184) 40 59
w4g128_l13_18w8/ W4, group 128, symmetric, GPTQ, layers 13-18 at W8 130.6 0.9285 (-0.0024) 0.9966 (-0.0004) 0.9927 (+0.0001) 0.9539 (-0.0019) 0.7678 (-0.0184) 39 59
w4g128_rtn/ W4, group 128, symmetric, RTN 101.7 0.9152 (-0.0157) 0.9963 (-0.0006) 0.9888 (-0.0038) 0.9534 (-0.0023) 0.7598 (-0.0264) 181 81
w4g16/ W4, group 16, symmetric, GPTQ 121.5 0.9328 (+0.0019) 0.9968 (-0.0001) 0.9921 (-0.0005) 0.9536 (-0.0022) 0.7655 (-0.0207) 92 45
w4g32_asym/ W4, group 32, asymmetric, GPTQ 115.8 0.9276 (-0.0033) 0.9970 (+0.0000) 0.9917 (-0.0009) 0.9565 (+0.0008) 0.7839 (-0.0023) 77 31
w4g32/ W4, group 32, symmetric, GPTQ 110.2 0.9322 (+0.0012) 0.9968 (-0.0001) 0.9919 (-0.0007) 0.9535 (-0.0022) 0.7828 (-0.0034) 77 38
w4g32_convfp/ W4, group 32, symmetric, GPTQ, conv_out unquantized 120.1 0.9285 (-0.0025) 0.9969 (+0.0000) 0.9907 (-0.0020) 0.9538 (-0.0019) 0.7747 (-0.0115) 73 39
w4g32_d05/ W4, group 32, symmetric, GPTQ, dampening 0.05 110.2 0.9225 (-0.0085) 0.9968 (-0.0002) 0.9919 (-0.0008) 0.9533 (-0.0024) 0.7736 (-0.0126) 74 39
w4g32_d10/ W4, group 32, symmetric, GPTQ, dampening 0.1 110.2 0.9243 (-0.0067) 0.9964 (-0.0006) 0.9926 (+0.0000) 0.9516 (-0.0041) 0.7805 (-0.0057) 107 36
w4g32_mse/ W4, group 32, symmetric, GPTQ, mse observer 110.2 0.9285 (-0.0025) 0.9969 (-0.0000) 0.9890 (-0.0036) 0.9546 (-0.0011) 0.7885 (+0.0023) 100 36
w4g32_n320/ W4, group 32, symmetric, GPTQ, 320 calibration windows 110.2 0.9299 (-0.0011) 0.9970 (+0.0001) 0.9921 (-0.0005) 0.9552 (-0.0006) 0.7690 (-0.0172) 70 41
w4g32_s1/ W4, group 32, symmetric, GPTQ, calibration draw 1 110.2 0.9266 (-0.0044) 0.9968 (-0.0002) 0.9912 (-0.0015) 0.9528 (-0.0029) 0.7736 (-0.0126) 78 39
w4g32_s2/ W4, group 32, symmetric, GPTQ, calibration draw 2 110.2 0.9291 (-0.0019) 0.9969 (+0.0000) 0.9923 (-0.0003) 0.9543 (-0.0014) 0.7586 (-0.0276) 77 53
w4g32_s3/ W4, group 32, symmetric, GPTQ, calibration draw 3 110.2 0.9342 (+0.0032) 0.9969 (-0.0000) 0.9917 (-0.0009) 0.9547 (-0.0010) 0.7954 (+0.0092) 77 36
w4g64/ W4, group 64, symmetric, GPTQ 104.6 0.9314 (+0.0004) 0.9968 (-0.0001) 0.9925 (-0.0001) 0.9553 (-0.0005) 0.7678 (-0.0184) 67 50

torch_bf16_cuda and torch_fp32_cuda are the unquantized encoder on the same GPU. RTN rows round to the nearest integer without the GPTQ error correction.

Latency

Encoder time per call (log-mel, encoder layers and the copy of the hidden states to CPU), p50 / p95 in milliseconds, and windows per second. "Layer 12 hop" stops after layer 12, as the voice activity and speaker questions allow; "layer 18 full" runs all layers, as turn end needs. With one window the package always runs all 18 layers.

One NVIDIA L4 (23 GB), AMD EPYC 7F52 host, 4 CPU threads, torch==2.8.0+cu128, weights served as bf16:

Variant Batch Layer 12 hop p50 / p95 (ms) Layer 12 windows/s Layer 18 full p50 / p95 (ms) Layer 18 windows/s
torch_bf16_cuda 1 9.9 / 10.3 100 10.1 / 12.1 97
torch_bf16_cuda 16 34.4 / 35.3 465 40.0 / 41.0 400
torch_fp32_cuda 1 13.1 / 14.0 76 13.2 / 14.1 75
torch_fp32_cuda 16 101.4 / 103.4 158 130.9 / 134.1 122
w8ch 1 9.8 / 12.7 98 9.8 / 11.6 99
w8ch 16 34.5 / 35.7 463 40.0 / 40.8 400
w8ch_rtn 1 9.8 / 10.3 101 9.9 / 12.0 98
w8ch_rtn 16 34.4 / 35.4 464 39.9 / 41.1 401
w8g128 1 9.7 / 10.3 103 9.9 / 11.7 99
w8g128 16 34.4 / 35.3 464 40.0 / 40.9 400
w4g128_asym 1 10.1 / 11.9 97 10.4 / 11.0 96
w4g128_asym 16 34.8 / 36.1 458 40.2 / 41.3 398
w4g128 1 10.5 / 12.5 93 10.2 / 10.8 93
w4g128 16 34.8 / 36.1 458 40.0 / 40.7 400
w4g32_asym 1 10.4 / 11.2 95 10.8 / 14.4 88
w4g32_asym 16 35.1 / 36.3 456 40.6 / 41.9 393
w4g32 1 10.4 / 13.4 93 10.3 / 11.3 95
w4g32 16 34.9 / 36.0 458 40.0 / 40.6 400
w4g32_mse 1 10.5 / 12.1 94 10.3 / 10.9 96
w4g32_mse 16 35.0 / 36.0 457 40.0 / 40.8 400
w4g32_s3 1 10.5 / 12.5 92 10.3 / 11.1 96
w4g32_s3 16 35.0 / 36.4 457 40.1 / 41.1 398

The quantized variants run the same dense bf16 matrix products as torch_bf16_cuda, so their latency matches it to within measurement noise.

One NVIDIA A40 (48 GB), Intel Xeon Gold 6342 host, 8 CPU threads, torch==2.8.0+cu128, weights served as bf16:

Variant Batch Layer 12 hop p50 / p95 (ms) Layer 12 windows/s Layer 18 full p50 / p95 (ms) Layer 18 windows/s
torch_bf16_cuda 1 9.7 / 11.0 101 9.8 / 10.5 102
torch_bf16_cuda 16 21.5 / 21.9 742 25.4 / 25.6 630
torch_fp32_cuda 1 12.8 / 15.6 76 12.7 / 13.8 78
torch_fp32_cuda 16 57.3 / 58.1 279 71.7 / 72.3 223
w8ch 1 9.9 / 10.6 100 10.2 / 11.3 98
w8ch 16 21.4 / 21.6 748 25.4 / 25.8 630
w8g128 1 9.9 / 10.8 101 10.1 / 10.9 99
w8g128 16 21.3 / 21.5 752 25.2 / 25.5 634
w4g32 1 9.8 / 11.0 100 9.7 / 10.2 103
w4g32 16 21.2 / 21.4 755 25.1 / 25.2 638

Download and load. On the L4 machine, files of 102 to 192 MB downloaded from the Hugging Face Hub into an empty cache in 2.9 to 4.8 s, and reading a file and converting it to floating-point weights took 0.07 to 0.13 s. Download throughput varied between 31 and 192 MB/s across calls on the test machines, so read download time as proportional to file size. The encoder holds 360 MB of GPU memory in bf16 with any of these files.

Calibration data

GPTQ used 256 public 8-second windows (the w4g32_n320 variant used 320), none of them in the evaluation set: Smart Turn v3.2 train (f8c95d28), VoxConverse dev (3acfa1b4), AMI ihm train (8cdaae2e), and FLEURS en_us and es_419 train (168de341). The pool has 320 windows: 96 Smart Turn, 96 VoxConverse, 64 AMI and 32 from each FLEURS language. No audio is distributed here.

Limitations

  • Quantization here reduces download size only. No integer GPU kernel was used for the reported numbers, and GPU memory in use is that of the bf16 encoder.
  • The 4-bit results are not stable across calibration draws, and speaker count is the question that moves most.
  • Evaluated on the five questions and the datasets above. Language, term and personal-information questions were not evaluated.
  • The usage snippet reaches into model._engine, which is not a public interface of the package and can change between versions.
  • The limitations of charcot-ai/marimba apply. Not for diagnosis, identity verification, surveillance or safety-critical automation.

License and credits

Apache-2.0. Dataset licenses are separate.

Source License Use
Qwen/Qwen3-ASR-0.6B Apache-2.0 Audio encoder weights that were quantized ยท 5eb144179a02acc5e5ba31e748d22b0cf3e303b0
charcot-ai/marimba Apache-2.0 Heads and readouts used for evaluation
llm-compressor 0.10.0.5, compressed-tensors 0.14.0.1 Apache-2.0 GPTQModifier with oneshot, sequential pipeline, one transformer layer at a time
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-gptq

Finetuned
(4)
this model