跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 机器学习

arXiv:2406.03482 (cs)
[提交于 2024年7月18日 (v1),最后修订于 2024年7月18日 (此版本, v2)]

标题:QJL: 1-Bit Quantized JL Transform for KV Cache Quantization with Zero Overhead

作者:Amir Zandieh, Majid Daliri, Insu Han
查看论文《QJL: 1-Bit Quantized JL Transform for KV Cache Quantization with Zero Overhead》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Serving LLMs requires substantial memory due to the storage requirements of Key-Value (KV) embeddings in the KV cache, which grows with sequence length. An effective approach to compress KV cache is quantization. However, traditional quantization methods face significant memory overhead due to the need to store quantization constants (at least a zero point and a scale) in full precision per data block. Depending on the block size, this overhead can add 1 or 2 bits per quantized number. We introduce QJL, a new quantization approach that consists of a Johnson-Lindenstrauss (JL) transform followed by sign-bit quantization. In contrast to existing methods, QJL eliminates memory overheads by removing the need for storing quantization constants. We propose an asymmetric estimator for the inner product of two vectors and demonstrate that applying QJL to one vector and a standard JL transform without quantization to the other provides an unbiased estimator with minimal distortion. We have developed an efficient implementation of the QJL sketch and its corresponding inner product estimator, incorporating a lightweight CUDA kernel for optimized computation. When applied across various LLMs and NLP tasks to quantize the KV cache to only 3 bits, QJL demonstrates a more than fivefold reduction in KV cache memory usage without compromising accuracy, all while achieving faster runtime. Codes are available at \url{https://github.com/amirzandieh/QJL}.
评论: 13 pages
主题: 机器学习 (cs.LG); 人工智能 (cs.AI); 计算与语言 (cs.CL); 性能 (cs.PF)
引用方式: arXiv:2406.03482 [cs.LG]
  (或者 arXiv:2406.03482v2 [cs.LG] 对于此版本)
  https://doi.org/10.48550/arXiv.2406.03482

提交历史

来自:Amir Zandieh
[v2] 2024年7月18日 星期四 16:31:29 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PF
< 上一篇   |   下一篇 >
最新 | 近期 | 2024-07
切换浏览方式为:
cs
cs.LG
cs.AI
cs.CL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站