大型语言模型需要内容分发网络吗?
Do Large Language Models Need a Content Delivery Network?
AI总结:
本文提出知识分发网络(KDN),以KV缓存为媒介动态优化LLM推理中的知识存储、传输与组合,兼顾模块化知识注入与高效低延迟服务,并已开源原型。
摘要:
随着大型语言模型(LLMs)的使用迅速扩展,补充各种LLM查询所需的知识范围也在扩大。因此,在LLM推理中实现灵活且高效的新知识注入至关重要。存在三种高层级选项:(i)将知识嵌入LLM的权重中(即微调),(ii)将知识作为LLM文本输入的一部分(即上下文学习),或(iii)在预填充阶段将新知识的KV缓存注入LLM。本文认为,尽管微调和上下文学习很流行,但使用KV缓存作为知识媒介可以同时实现更模块化的知识注入管理和更高效的LLM服务,具有低成本和快速响应的优势。为了实现这些好处,我们设想了一种知识分发网络(KDN),这是LLM服务中的一个新系统组件,可动态优化KV缓存在LLM引擎及其他计算和存储资源之间的存储、传输和组合。我们相信,正如内容分发网络(CDNs),例如Akamai,通过其高效的数据分发促成了互联网生态系统的成功一样,KDN将通过其高效的知识分发对LLM应用的成功至关重要。我们已在https://github.com/LMCache/LMCache开源了一个KDN原型。
英文摘要:
As the use of large language models (LLMs) expands rapidly, so does the range of knowledge needed to supplement various LLM queries. Thus, enabling flexible and efficient injection of new knowledge in LLM inference is critical. Three high-level options exist: (i) embedding the knowledge in LLM's weights (i.e., fine-tuning), (ii) including the knowledge as a part of LLM's text input (i.e., in-context learning), or (iii) injecting the KV caches of the new knowledge to LLM during prefill. This paper argues that, although fine-tuning and in-context learning are popular, using KV caches as the medium of knowledge could simultaneously enable more modular management of knowledge injection and more efficient LLM serving with low cost and fast response. To realize these benefits, we envision a Knowledge Delivery Network (KDN), a new system component in LLM services that dynamically optimizes the storage, transfer, and composition of KV cache across LLM engines and other compute and storage resources. We believe that, just like content delivery networks (CDNs), such as Akamai, enabled the success of the Internet ecosystem through their efficient data delivery, KDNs will be critical to the success of LLM applications through their efficient knowledge delivery. We have open-sourced a KDN prototype at https://github.com/LMCache/LMCache.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。