mirror of
https://github.com/TheTom/turboquant_plus.git
synced 2026-10-22 02:53:13 -05:00
Synthetic (d=128, 1000 vectors): turbo3 cos=0.983, decay cos=0.940 (>0.80 threshold) Decay within 5% of direct 2-bit — double-quant adds minimal error Inner product error 1.76x worse (acceptable for old tokens) Real Qwen3-1.7B KV tensors: 3-bit cos=0.985, decay cos=0.949 (>0.75 threshold) Layer 0 (early): 0.971 — most decay-tolerant Layer 2 (mid): 0.927 — worst case, still viable Memory savings: 30-34% at 32K-256K context 256K: 1120 MB → 742 MB (378 MB saved) Approach: dequant turbo3 → find nearest 2-bit centroid → recompute norm correction → repack. Codex confirmed zero-signs approach is broken (biased remap), proper requant is required. Next: Metal implementation in llama_kv_cache maintenance path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-Authored-By: tturney@psyguard.ai