RSS DEV 社区

KVQuant:使用 4 位 KV 缓存量化在 8GB 内存上运行 70B 大语言模型

Follow
“我用 KVQuant 将 GPT-2 压缩到能在 Arduino 上运行!以下是我的做法。 问题:LLM 在推理时需要巨大的内存来存储键值缓存(key-value caches)。 解决方案:采用 4 位键值缓存量化,在准确率损失小于 1% 的前提下,将内存占用降低 4 倍。 结果: GPT-2:512MB → 128MB(降低 4 倍) LLaMA-7B:8GB → 2GB LLaMA-70B:280GB → 70GB 代码:github.com/AmSach/kvquant"
favicon
dev.to
KVQuant: Run 70B LLMs on 8GB RAM with 4-bit KV Cache Quantization
Create attached notes ...