Saved in:
Bibliographic Details
Main Authors: Li, Jiaxing, Xu, Chi, Wang, Feng, von Riedemann, Isaac M, Zhang, Cong, Liu, Jiangchuan
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2406.00025
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909214530600960
author Li, Jiaxing
Xu, Chi
Wang, Feng
von Riedemann, Isaac M
Zhang, Cong
Liu, Jiangchuan
author_facet Li, Jiaxing
Xu, Chi
Wang, Feng
von Riedemann, Isaac M
Zhang, Cong
Liu, Jiangchuan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_00025
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SCALM: Towards Semantic Caching for Automated Chat Services with Large Language Models
Li, Jiaxing
Xu, Chi
Wang, Feng
von Riedemann, Isaac M
Zhang, Cong
Liu, Jiangchuan
Computation and Language
Artificial Intelligence
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.
title SCALM: Towards Semantic Caching for Automated Chat Services with Large Language Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2406.00025