Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,30 @@ python scripts/quantization/quantize_fixed_av.py \
--embed-bits 4
```

### Audio-Only Quantization Recipe

Use the joint AV calibration artifacts, but leave vision and language linears
at FP16 when you only want to quantize the audio path. The production convention
keeps PLI at CQ2 and token embeddings at CQ4.

```bash
python scripts/quantization/quantize_fixed_av.py \
--model-dir "$TQH_MODEL_DIR" \
--calib-dir data/hessians/joint_av \
--out-tag audio_cq4_llm_fp16_pli2_emb4 \
--vision-bits 16 \
--audio-bits 4 \
--bridge-bits 4 \
--llm-bits 16 \
--pli-bits 2 \
--embed-bits 4
```

For a bit-width sweep, rerun with `--audio-bits 1`, `2`, `3`, and `4`, keeping
`--bridge-bits 4 --pli-bits 2 --embed-bits 4` fixed. To measure language and
audio interaction, set `--llm-bits 4`; to isolate the audio tower, keep
`--llm-bits 16`.

Run fixed text quantization configs:

```bash
Expand Down
18 changes: 18 additions & 0 deletions scripts/export/export_cactus_cq.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,24 @@ def fit_row_table_scale(table_fp32: torch.Tensor, token_ids: list[int]) -> torch
"pli_bits": 2,
"embed_bits": 4,
},
"prod_v4_l2": {
"llm_bits": 2,
"vision_bits": 4,
"audio_bits": 4,
"vision_bridge_bits": 4,
"audio_bridge_bits": 4,
"pli_bits": 2,
"embed_bits": 4,
},
"prod_v4_l1": {
"llm_bits": 1,
"vision_bits": 4,
"audio_bits": 4,
"vision_bridge_bits": 4,
"audio_bridge_bits": 4,
"pli_bits": 2,
"embed_bits": 4,
},
"prod_v4_l4": {
"llm_bits": 4,
"vision_bits": 4,
Expand Down
Loading