MemServe: 탄력적 메모리 풀을 활용한 분산형 LLM 서빙을 위한 컨텍스트 캐싱
MemServe: Context Caching for Disaggregated LLM Serving with Elastic Memory Pool
June 25, 2024
저자: Cunchen Hu, Heyang Huang, Junhao Hu, Jiang Xu, Xusheng Chen, Tao Xie, Chenxi Wang, Sa Wang, Yungang Bao, Ninghui Sun, Yizhou Shan
cs.AI
초록
대형 언어 모델(LLM) 서빙은 상태 비저장(stateless) 시스템에서 상태 저장(stateful) 시스템으로 진화하며, 컨텍스트 캐싱(context caching)과 분산 추론(disaggregated inference)과 같은 기술을 활용하고 있습니다. 이러한 최적화는 KV 캐시의 수명과 적용 범위를 확장시키며, 새로운 아키텍처 접근 방식을 필요로 합니다. 우리는 MemServe를 제안합니다. MemServe는 요청 간(inter-request) 및 요청 내(intra-request) 최적화를 통합한 통합 시스템입니다. MemServe는 MemPool을 도입하는데, MemPool은 서빙 인스턴스 간에 분산된 메모리와 KV 캐시를 관리하는 탄력적 메모리 풀입니다. MemPool API를 사용하여 MemServe는 컨텍스트 캐싱과 분산 추론을 최초로 결합하며, 전역 스케줄러(global scheduler)가 전역 프롬프트 트리 기반의 지역성 인지 정책(locality-aware policy)을 통해 캐시 재사용을 향상시킵니다. 테스트 결과, MemServe는 작업 완료 시간과 첫 응답 시간(time-to-first-time)을 크게 개선하는 것으로 나타났습니다.
English
Large language model (LLM) serving has transformed from stateless to stateful
systems, utilizing techniques like context caching and disaggregated inference.
These optimizations extend the lifespan and domain of the KV cache,
necessitating a new architectural approach. We present MemServe, a unified
system that integrates both inter-request and intra-request optimizations.
MemServe introduces MemPool, an elastic memory pool managing distributed memory
and KV caches across serving instances. Using MemPool APIs, MemServe combines
context caching with disaggregated inference for the first time, supported by a
global scheduler that enhances cache reuse through a global prompt tree-based
locality-aware policy. Tests show that MemServe significantly improves job
completion time and time-to-first-time.Summary
AI-Generated Summary