LMCache — vLLM KV Cache 快取複用加速
- URL: https://www.threads.com/@xiaoxiunique/post/DZjCnJDASmR
- Date Saved: 2025-06-14
- Source: Threads (@xiaoxiunique)
- Tags: local-llm, ai-engineering
Summary
LMCache 解決 vLLM 部署大模型做 RAG 時,同一份文檔和 system prompt 每次請求都重新計算 KV Cache 的問題。把算過的 KV Cache 快取複用,重複部分直接跳過。
特點:
- PyTorch 基金會成員項目,NVIDIA Dynamo / Redis 已集成
- 快取持久化複用,首字延遲直降
- GPU → CPU → 磁盤 → Redis 多級卸載
- 跨請求、跨會話、甚至跨推理引擎共享
- pip install lmcache,原生適配 vLLM
GitHub: https://github.com/LMCache/LMCache (8.9K stars)