SCALM:面向基于大语言模型的自动化聊天服务的语义缓存
SCALM: Towards Semantic Caching for Automated Chat Services with Large Language Models
AI总结:
本文提出新型缓存架构SCALM,通过语义分析识别缓存条目与模式,解决现有LLM聊天服务缓存未利用语义关联的问题,相比GPTCache等方案,缓存命中率平均相对提升63%,token节省相对改善77%。
摘要:
大语言模型(LLMs)日益普及,正在改变各个领域的众多应用。然而,其查询缓存系统在现实世界中的有效性尚未得到深入调查。在本研究中,我们首次对真实世界的人机(人类与LLM)交互数据进行了分析,识别出基于LLM的聊天服务在现有缓存解决方案中面临的关键挑战。我们的发现表明,当前的缓存方法未能利用语义关联,导致缓存性能低下并产生额外的token成本。为了解决这些问题,我们提出了SCALM,这是一种强调语义分析并识别重要缓存条目和模式的新型缓存架构。我们还详细介绍了相应的缓存存储和驱逐策略的实现。我们的评估表明,SCALM提高了缓存命中率并降低了LLMChat服务的运营成本。与GPTCache中的其他最先进解决方案相比,SCALM在缓存命中率上平均相对提升了63%,在token节省方面相对改善了77%。
英文摘要:
Large Language Models (LLMs) have become increasingly popular, transforming a wide range of applications across various domains. However, the real-world effectiveness of their query cache systems has not been thoroughly investigated. In this work, we for the first time conducted an analysis on real-world human-to-LLM interaction data, identifying key challenges in existing caching solutions for LLM-based chat services. Our findings reveal that current caching methods fail to leverage semantic connections, leading to inefficient cache performance and extra token costs. To address these issues, we propose SCALM, a new cache architecture that emphasizes semantic analysis and identifies significant cache entries and patterns. We also detail the implementations of the corresponding cache storage and eviction strategies. Our evaluations show that SCALM increases cache hit ratios and reduces operational costs for LLMChat services. Compared with other state-of-the-art solutions in GPTCache, SCALM shows, on average, a relative increase of 63% in cache hit ratio and a relative improvement of 77% in tokens savings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。