Files
turboquant_plus/benchmarks
deb2d8409d experiment: temporal decay prototype — 3→2 requant VIABLE
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
2026-03-26 17:29:58 -05:00
..