档案库 · 开发与企业工具 · 技术决策 · 2026
TurboQuant+ 将 LLM KV 缓存压缩 3.8-6.4 倍,并已合并到 vLLM、llama.cpp、MLX 中
一位独立开发者开源的 TurboQuant KV 缓存压缩实现,在数月内被 vLLM、llama.cpp 和 Apple MLX 合并为上游代码。
TurboQuant+ (TheTom/turboquant_plus)
做的是什么生意
Apache-2.0 reference implementation and research home for TurboQuant-style KV-cache compression - PolarQuant codebooks, Hadamard rotation and asymmetric key/value policies - that mainline LLM inference engines merge in.
起因
Tom Turney created TheTom/turboquant_plus on 2026-03-25 as an implementation of TurboQuant, the KV-cache compression scheme from Google Research's ICLR 2026 paper (arXiv 2504.19874): extract each vector's norm, rotate the residual with a Walsh-Hadamard transform plus random sign flips, then Lloyd-Max scalar-quantize to 2-4 bits per value. The README targets 3.8-6.4x cache compression at near q8_0 prefill speed and ~0.9x decode throughput on long context, validated end-to-end from 1.5B to 104B models at 128K context on a MacBook (turbo3, PPL 4.024, 74 GB peak memory).
经过
The project quickly moved from reproduction to original research. Its headline findings - value-cache compression is nearly free, all quality loss comes from key compression, and boundary layers are disproportionately sensitive - produced asymmetric configurations (q8_0 keys plus turbo values) and layer-aware protection that rescued models symmetric compression broke. It also dropped the paper's QJL error-correction stage, arguing QJL 'eliminates reconstruction bias but amplifies variance,' a conclusion five independent groups later confirmed. Distribution went upstream: vLLM merged a TurboQuant attention backend in April 2026 (PR #38479, kv-cache-dtype turboquant_k8v4), llama.cpp merged Hadamard KV-cache rotation citing TurboQuant (PR #21038) plus CPU/CUDA/Vulkan WHT kernels, and Apple merged the asymmetric scheme family into mlx-swift-lm on 2026-07-20 (PR #232, 63 tests). Community ports followed - a llama.cpp production fork with prebuilt binaries, Lablup's Rust/MLX port, an independent PyTorch implementation - and the repo passed 7k stars and 900+ forks within five months.
结果
Still live as of 2026-09-05: the technique now ships inside vLLM, llama.cpp and Apple MLX; a production fork (llama-cpp-turboquant) and several community products build on the stack, and the maintainer is preparing a full PolarQuant codec PR to llama.cpp (issue #27). Funding remains bootstrapped - GitHub Sponsors plus paid inference-optimization engagements - so the bet is winning on adoption, not revenue.
背景
2026 年初,KV 缓存的内存成本是长上下文 LLM 推理的瓶颈,所以 Tom Turney 于 2026-03-25 创建了 TheTom/turboquant_plus,实现 Google Research 的 ICLR 2026 KV 缓存压缩方案 TurboQuant(arXiv 2504.19874):提取每个向量的范数,用 Walsh-Hadamard 变换加随机符号翻转旋转残差,然后量化每个值到 2-4 位。他目标是在长上下文下实现 3.8-6.4 倍缓存压缩,prefill 速度接近 q8_0,解码吞吐约 0.9 倍,并在 MacBook 上端到端验证了 1.5B 到 104B 模型、128K 上下文。
赌注是分发而不是产品:而不是构建一个竞争性的引擎,这个仓库是一个研究基地和参考实现,其成功标准是上游采用。实验发现值缓存压缩几乎免费,键精度对质量影响最大,边界层尤为敏感,产生了非对称的 q8_0 键/turbo 值配置。项目还在五个独立团队证实其放大了注意力噪声后,放弃了论文中的 QJL 纠错阶段。
到 2026 年 9 月,该策略已经落地。vLLM 在 2026 年 4 月合并了 TurboQuant KV 缓存后端(PR #38479,turboquant_k8v4 等),llama.cpp 合并了 Hadamard KV 缓存旋转(PR #21038)以及 CPU、CUDA 和 Vulkan 上的 WHT 内核,Apple 在 2026-07-20 将非对称方案系列合并到 mlx-swift-lm(PR #232)。该仓库达到 7,018 星和 927 个 fork;社区移植和一个生产 llama.cpp 分支围绕它,由 GitHub Sponsors 和商业支持而非风险投资资助。
这件事要成立,得有什么
- 把上游采用当作产品:将小补丁合并到 vLLM、llama.cpp 和 MLX 中,将技术带入已有用户的引擎中,而不是要求任何人采用新的运行时。
- 非对称 K/V 发现——硬压缩值,保护键——是超越论文的一个站得住脚的贡献,而 RTX 3090/4090、M1-M5 和 RX 9070 XT 上的社区测试建立了可信度。
- 在消费级硬件上验证(MacBook 上高达 104B 参数、128K 上下文)证明了压缩在用户真正感受到记忆墙的地方有效。
- 开放的研究卫生——在独立确认后放弃 QJL,发布每模型配置指南——使引擎维护者信任这些补丁。
- 轻量级变现(GitHub Sponsors、商业支持)与 Apache-2.0 上游优先策略相匹配,该策略无需收入即可传播。
可借鉴之处
通过成为上游来获胜:在真实硬件上证明论文,发布修正,并在人们已经在用的引擎中落地增量补丁——采用率,而不是你自己的产品,是关键指标。
后续进展
截至 2026-09-05 项目活跃:7,018 星、927 个 fork、342 个提交和 65 个观察者。vLLM 通过 --kv-cache-dtype 发布 turboquant_k8v4 等;llama.cpp 在 CPU、CUDA 和 Vulkan 上提供 Hadamard 旋转和 WHT 内核;Apple 的 mlx-swift-lm 携带非对称系列,包含 63 个测试。围绕它有一个带预编译二进制的生产分支、Lablup 的 Rust MLX 移植、一个独立的 PyTorch 实现和社区产品。仍未完成的是向 llama.cpp 提交完整的 PolarQuant 编解码器 PR(#27);资金来自 GitHub Sponsors 加付费委托,所以赌注在采用上成功,而非收入。
资料来源
- TheTom/turboquant_plus - README (7.0k stars, 927 forks, upstream status)
- [Attention Backend] TurboQuant: 2-bit KV cache compression with 4x capacity
- llama : rotate activations for better quantization
- add TurboQuant KV cache compression
发现哪里写错了?告诉我们。
轮到你了
你刚读完一家。说说你在做什么,看看谁在赌同一件事。
免费账号 · 3 次免费提问 · 不用绑卡