CacheBlend#
CacheBlend 允许 LMCache 重用 任何 重复文本块的 KV 缓存,而不仅仅是共享前缀——通过在块边界有选择地对少量 token 进行重计算来实现。这可以降低 RAG 和多文档场景下的首 token 延迟(TTFT),适用于可复用上下文并非干净前缀的情况。
启用 CacheBlend(MP 模式(多进程))#
使用 blend 引擎启动 LMCache 服务器:
lmcache server --l1-size-gb 20 --eviction-policy LRU --engine-type blend
The blend engine composes a BlendModule into the server and requires
--supported-transfer-mode to be lmcache_driven (the default) or auto. See
配置参考 for the related server flags.
备注
进程内 CacheBlend 文档——包括配置项(如 LMCACHE_ENABLE_BLENDING)及端到端示例——已保留在旧版章节中: 混合。