Quantization: split-plane quantizer landed; per-model matrix + device benchmarks next #9

Open
opened 2026-11-18 18:49:56 +00:00 by dsh · 0 comments
Member

Follow-up to the quantization gate + first sweep (commit 5d35116f4).

Done

  • llama-quantize accepts TARDITS/tesseract split planes (...weight.real/.imag) and refuses to quantize attn_gamma (the scan kernel reads it as raw F32; 4-bit decay also flips logits).
  • Sweep on WereRAT step-31500 (402 MB F32): F16 203 MB, Q8_0 109 MB, Q5_1 87 MB, Q4_0 73 MB; argmax unchanged on 4 parity prompts for all variants; F16 greedy identical for 40 tokens, Q4 ~3 tokens.
  • Decay precision test: gamma F16/Q8 argmax stable, gamma 4-bit changes an argmax, so F32 gamma stays.
  • Notes: AGENTS.d/quantization.md.

Remaining

  • repeat the matrix on the final Tessa SFT checkpoint and the quaternion/hyper models
  • choose the default quant per model class (Q8_0 default for 49M, Q4_0 low-end, F16 high-end) and publish it in the HF manifest for the app
  • device benchmarks on arm64 phone (load, prefill, tok/s, RAM) for Q4_0/Q8_0/F16
  • optional: Q4_K_M/Q5_K + imatrix calibration, F16 embedding variant, quality metric beyond argmax/greedy (small CE/ppl harness)

The mobile model selector (see the Tesseract-mobile issue) needs the size/quality + default fields from this matrix, so this blocks the model matrix part of the app, not the engine work.

Follow-up to the quantization gate + first sweep (commit `5d35116f4`). **Done** - `llama-quantize` accepts TARDITS/tesseract split planes (`...weight.real/.imag`) and refuses to quantize `attn_gamma` (the scan kernel reads it as raw F32; 4-bit decay also flips logits). - Sweep on WereRAT step-31500 (402 MB F32): F16 203 MB, Q8_0 109 MB, Q5_1 87 MB, Q4_0 73 MB; argmax unchanged on 4 parity prompts for all variants; F16 greedy identical for 40 tokens, Q4 ~3 tokens. - Decay precision test: gamma F16/Q8 argmax stable, gamma 4-bit changes an argmax, so F32 gamma stays. - Notes: `AGENTS.d/quantization.md`. **Remaining** - [ ] repeat the matrix on the final Tessa SFT checkpoint and the quaternion/hyper models - [ ] choose the default quant per model class (Q8_0 default for 49M, Q4_0 low-end, F16 high-end) and publish it in the HF manifest for the app - [ ] device benchmarks on arm64 phone (load, prefill, tok/s, RAM) for Q4_0/Q8_0/F16 - [ ] optional: Q4_K_M/Q5_K + imatrix calibration, F16 embedding variant, quality metric beyond argmax/greedy (small CE/ppl harness) The mobile model selector (see the Tesseract-mobile issue) needs the size/quality + default fields from this matrix, so this blocks the model matrix part of the app, not the engine work.
Sign in to join this conversation.
No description provided.