PyramidKV简介
PyramidKV是一种基于金字塔信息漏斗的动态KV缓存压缩技术。它通过对不同层的KV缓存进行动态压缩,有效提高了大语言模型的推理效率。
最新进展 🚀
- 2024-06-25: 支持大型LLM的多GPU推理,可在LlaMa-3-70B-Instruct上使用PyramidKV
- 2024-06-10: 支持在Flash Attention v2和Sdpa Attention上使用PyramidKV、SnapKV、H2O和StreamingLLM
安装使用
- 克隆项目:
git clone https://github.com/Zefan-Cai/PyramidKV.git
cd PyramidKV
- 安装依赖:
pip install -r requirements.txt .
- 使用LongBench进行推理:
详细使用说明请参考 scripts/scripts_longBench/eval.sh
。
性能评估
PyramidKV在各项评测中都取得了不错的效果:
可视化分析
PyramidKV提供了注意力模式的可视化工具:
使用 visualization.ipynb
可以重现上述可视化结果。
更多资源
引用
如果您的研究工作中使用了PyramidKV,请考虑引用以下论文:
@article{zhang2024pyramidkv,
title={PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling},
author={Zhang, Yichi and Gao, Bofei and Liu, Tianyu and Lu, Keming and Xiong, Wayne and Dong, Yue and Chang, Baobao and Hu, Junjie and Xiao, Wen and others},
journal={arXiv preprint arXiv:2406.02069},
year={2024}
}
PyramidKV作为一种新兴的动态KV缓存压缩技术,为大语言模型的高效推理提供了新的思路。欢迎感兴趣的读者深入研究并为项目贡献自己的力量!
文章链接:www.dongaigc.com/a/pyramidkv-learning-resources-dynamic-kv-cache-compression
https://www.dongaigc.com/a/pyramidkv-learning-resources-dynamic-kv-cache-compression