One Million Tokens in 20GB: Calibration-Free 2-Bit SRFT KV-Cache Compression for Looped MoE Inference on Apple Silicon
Mohamed Amine Bergach
Key points
From the paper's conclusion- We show that three structural properties of modern hybrid NoPE architectures -- bounded sliding windows, a 1,024-token banded relative bias whose tail is identically zero, and unit-RMS value normalization -- combine with an orthonormal Subsampled Randomized Fourier Transform (SRFT) to enable calibration-free, scale-free 2.000-bit Value and 2.125-bit Key Lloyd-Max compression (2.0625 effective bits
Abstract
Long-context inference on unified-memory edge machines is governed by KV-cache capacity and memory bandwidth. On a 32 GB Apple M6 Mac mini (26.8 GB Metal working set, 150 GB/s DRAM), the 26.4B looped Mixture-of-Experts model Inkling-2-Mini (48 logical visits, 1M native context) exhausts memory by 64K tokens in stock oMLX (and by 512K even after fixing its 40 sliding-window visits to bounded ring buffers). We show that three structural properties of modern hybrid NoPE architectures -- bounded sliding windows, a 1,024-token banded relative bias whose tail is identically zero, and unit-RMS value normalization -- combine with an orthonormal Subsampled Randomized Fourier Transform (SRFT) to enable calibration-free, scale-free 2.000-bit Value and 2.125-bit Key Lloyd-Max compression (2.0625 effective bits/coordinate, $7.76\times$ smaller than bf16) on the 8 global visits' far prefix $[0, N-1024)$, merged with the exact bf16 local window and learned sink via online log-sum-exp. A custom GQA-packed Metal decode kernel with a 256-entry half4 LUT and Block-8 lazy exp2 rescaling reaches 73.4 GB/s and runs Inkling-2-Mini at 17.09 tok/s at 256K ($3.36\times$ faster than bf16), 13.81 tok/s at 512K, and 9.52 tok/s at 1,048,576 tokens in 19.49 GiB peak memory (4.37 GiB KV). Across $4\times 4096$ WikiText-2 windows, 3.06-bit SRFT is lossless ($\Delta$PPL $= -0.007$), 2.56-bit K3/V2 adds $+0.024$, and 2.06-bit adds $+0.130$ while achieving 100% (3/3) exact 7-digit passkey retrieval at 8K, 16K, and 32K.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Double KV Cache Optimization on Apple Silicon: Block-FP4, Radial Quantization, and Fused Metal KernelsarXiv · 2026
- Minima-KV: Retention-Preserving KV Cache Compression with Mixed-Format Paged AttentionarXiv · 2026
- LowRAM: Low-Rank Keys and Amortised Values for Composable KV Cache Compression at Test-TimearXiv · 2026
- ZipFusion: Fusing Lossless KV Decompression with Attention for Efficient LLM DecodingarXiv · 2026
- MiSTiQ: MicroScaling Trellis Quantization for Extreme KV Cache CompressionarXiv · 2026
- Verify Before You Fetch: Reliable KV Cache Compression for LLM InferencearXiv · 2026