f0f117cdd33a855fc74f58ab1c519d4fb749f5ac
All checks were successful
Smoke Test / smoke (pull_request) Successful in 37s
The test `test_levels_ordered_by_quality` asserted strictly descending `bits_per_channel`, but `q4_0` (4.0 bits) is a non-TurboQuant fallback placed last regardless of bit width. The design invariant is: - TurboQuant levels (turbo4→turbo2): ordered by compression_ratio ascending (more aggressive = more compression) - Fallback levels (q4_0): placed after all TurboQuant levels as safe defaults, not part of the quality progression Changes: - `test_levels_ordered_by_quality`: Now validates compression_ratio ordering for TurboQuant levels only, not across fallbacks - `test_fallback_quant_is_last`: New test ensuring non-TurboQuant fallbacks always appear after TurboQuant levels Closes #138 Closes #139 (duplicate)
TurboQuant
KV cache compression for local inference on M4 Max MacBook Pro.
What
TurboQuant (Google, ICLR 2026) is a three-stage KV cache compression method:
- PolarQuant — WHT rotation + polar coordinates + Lloyd-Max codebook (~4.2x compression)
- QJL — 1-bit quantized Johnson-Lindenstrauss residual correction
- TurboQuant — PolarQuant + QJL = ~3.5 bits/channel, zero accuracy loss
Why
Unlock 64K-128K context on qwen3.5:27b within 32GB unified memory. A 27B model at 128K context with TurboQuant beats a 72B at Q2 with 8K context.
Status
See issues for current progress.
Roles
- Strago: Build spec author
- Cid: Implementation, benchmarks, deployment
- Locke: Research support, upstream watch
- John: Quality review
- Frankie: Coordination
Source Repos
- TheTom/llama-cpp-turboquant — llama.cpp fork with Metal
- TheTom/turboquant_plus — Reference impl, 511+ tests
- amirzandieh/QJL — Author QJL code (CUDA)
- rachittshah/mlx-turboquant — MLX fallback
Docs
- Project Status — Full project status and build specification
Languages
Python
90.5%
C++
6.2%
Metal
2.4%
CMake
0.9%