Skip to content

Paper §3.3.3: mixed-precision quantization — the compression endgame - #628

Merged
joelteply merged 1 commit into
mainfrom
docs/paper-mixed-quant
Mar 30, 2026
Merged

joelteply merged 1 commit into
mainfrom
docs/paper-mixed-quant

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Hot heads Q8, cold heads Q2, dead heads removed. Smaller + smarter GGUF. Implementation exists, needs validation.

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.
Copilot AI review requested due to automatic review settings March 30, 2026 13:49
@joelteply
joelteply merged commit 311aae5 into main Mar 30, 2026
@joelteply
joelteply deleted the docs/paper-mixed-quant branch March 30, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +162 to +166
```
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)

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
```

**Implementation** (already built, pending validation):
- `compactor.rs` — assigns `HeadPrecision` per head based on utilization analysis

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- `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

Copilot uses AI. Check for mistakes.
Comment on lines +181 to +186
| 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 |

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
| 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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants