Repository navigation
Paper §3.3.3: mixed-precision quantization — the compression endgame - #628
Conversation
The killer feature: hot heads get Q8, cold heads get Q2, dead heads removed. Smaller than uniform Q4 with HIGHER quality. Implementation exists in Rust (compactor.rs, gguf_writer.rs, mixed_quant binary). Needs end-to-end validation. This is the compression endgame.
There was a problem hiding this comment.
Pull request overview
Updates the Experiential Plasticity paper to describe a new “utilization-aware mixed-precision quantization” step that leverages per-head utilization data from the plasticity pipeline to allocate GGUF quantization precision where it matters most.
Changes:
- Replaces §3.3.3 with a new section describing utilization-tiered mixed-precision quantization and expected benefits.
- Adds an estimated size/quality comparison table and outlines the planned validation experiment.
- Renumbers the prior “Internal Validation: Eat Our Own Dog Food” section to §3.3.4.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
| High-utilization heads → Q8 or BF16 (preserve quality where it matters) | ||
| Medium-utilization heads → Q4_K_M (standard quality) | ||
| Low-utilization heads → Q2_K (minimum viable, save space) | ||
| Pruned/dead heads → removed (zero bits) |
There was a problem hiding this comment.
The precision tiers in this section don’t match the current implementation. In the plasticity planner, HeadPrecision::Q2 is not written as GGUF Q2_K (it’s mapped up to Q3_K_S because Q2_K is documented in-code as producing NaNs for compacted models), and HeadPrecision::BF16/Q8/Q4 map to quant types like Q6_K/Q5_K_M/Q4_K_S rather than “BF16/Q8/Q4_K_M”. Please update this diagram (or explicitly label it as a conceptual target vs the concrete GGUF quant types actually emitted).
| ``` | ||
|
|
||
| **Implementation** (already built, pending validation): | ||
| - `compactor.rs` — assigns `HeadPrecision` per head based on utilization analysis |
There was a problem hiding this comment.
The implementation bullets appear to misattribute responsibilities: compactor.rs doesn’t contain utilization/HeadPrecision assignment logic (it compacts/slices tensors based on a provided topology), while precision assignment and quant-type mapping live in the plasticity scoring/planner modules. Consider updating these bullets to point to the modules that actually derive HeadPrecision from utilization and produce the per-tensor quant map.
| - `compactor.rs` — assigns `HeadPrecision` per head based on utilization analysis | |
| - plasticity scoring module — assigns `HeadPrecision` per head based on utilization analysis | |
| - quantization planner module — maps per-head `HeadPrecision` to a per-tensor quantization configuration | |
| - `compactor.rs` — compacts and slices tensors according to the planned sparse topology |
| | Method | Size | Expected HumanEval | Bits/param | | ||
| |--------|------|-------------------|------------| | ||
| | Uniform Q4_K_M | 2.6GB | 53.0% (measured) | 4.0 | | ||
| | Mixed precision | ~2.2GB (est.) | ~55-57% (predicted) | 3.4 avg | | ||
| | Uniform Q2_K | ~1.5GB (est.) | ~40-45% (predicted) | 2.0 | | ||
|
|
There was a problem hiding this comment.
The “Bits/param” figures in this table look inconsistent with the repo’s own GGUF quant-type size estimates (e.g., Q4_K_M is ~4.8 bpw and Q2_K is ~2.6 bpw in GgufQuantType::bits_per_weight()). If this table is intended to be quantitative, please align the numbers with the quant types you expect to emit (and/or rename the column to reflect that these are rough/nominal values).
| | Method | Size | Expected HumanEval | Bits/param | | |
| |--------|------|-------------------|------------| | |
| | Uniform Q4_K_M | 2.6GB | 53.0% (measured) | 4.0 | | |
| | Mixed precision | ~2.2GB (est.) | ~55-57% (predicted) | 3.4 avg | | |
| | Uniform Q2_K | ~1.5GB (est.) | ~40-45% (predicted) | 2.0 | | |
| | Method | Size | Expected HumanEval | Bits/param (GGUF bpw) | | |
| |--------|------|-------------------|------------------------| | |
| | Uniform Q4_K_M | 2.6GB | 53.0% (measured) | 4.8 | | |
| | Mixed precision | ~2.2GB (est.) | ~55-57% (predicted) | 3.4 avg | | |
| | Uniform Q2_K | ~1.5GB (est.) | ~40-45% (predicted) | 2.6 | | |
| Bits/param values for Uniform Q4_K_M and Uniform Q2_K follow `GgufQuantType::bits_per_weight()` (≈4.8 bpw and ≈2.6 bpw respectively). |
Hot heads Q8, cold heads Q2, dead heads removed. Smaller + smarter GGUF. Implementation exists, needs validation.