InferScale: 개인화된 LLM 서빙을 위한 GPU-네이티브 KV 주입
InferScale: GPU-Native KV Injection for Personalized LLM Serving
한국어 초록
대규모 언어 모델(LLM)은 사용자의 여러 요청에 걸쳐 공유되는 축적된 메모리 프로필이나 긴 대화 기록과 같은 지속적인 개인화 컨텍스트와 함께 배포되는 경우가 점점 늘고 있습니다. 상용 메모리 시스템(예: Mem0, MemGPT, Zep)은 이러한 메모리에서 관련 하위 집합을 검색하여 프롬프트에 주입하므로, 서빙 엔진이 동일한 콘텐츠를 반복적으로 사전 채우기(prefill)하도록 강제합니다. 검색 예산(retrieval budget)이 증가함에 따라 기저의 메모리가 요청 전반에 걸쳐 재사용됨에도 불구하고 첫 토큰 생성 시간(TTFT)이 증가합니다. 본 논문에서는 반복적인 프롬프트 사전 채우기를 재사용 가능한 KV 상태로 대체하는 GPU-네이티브 LLM 메모리 시스템인 InferScale을 제시합니다. InferScale은 각 메모리 팩트(fact)의 KV 표현을 미리 계산하여 의미론적 임베딩과 함께 GPU에 저장하고, 서빙 시점에 관련 팩트를 검색한 후 해당 KV를 vLLM의 페이징된 캐시에 직접 주입합니다. 회전 위치 임베딩(RoPE) 환경에서 동적으로 조합된 메모리를 지원하기 위해, 회전 전의 키를 저장하고 주입 중에 서빙 시점 위치를 적용하는 청크형 RoPE(Chunked RoPE)를 도입합니다. 그러나 메모리 팩트를 독립적으로 인코딩하면 공동 사전 채우기 중에 활용할 수 있는 팩트 간 컨텍스트가 누락됩니다. 저자들은 대상 팩트의 KV만을 캐싱하면서 각 메모리 팩트를 이전 대화 컨텍스트의 작은 윈도우와 함께 인코딩하는 컨텍스트 윈도우 인코딩(Context-Window Encoding)을 통해 이를 완화합니다. InferScale은 vLLM의 KV-connector 인터페이스를 통해 구현되므로 엔진 수정이나 모델 미세조정이 모두 필요하지 않습니다. LoCoMo 벤치마크에서 세 가지 오픈 가중치 모델을 대상으로 평가한 결과, InferScale은 검색 예산이 증가하더라도 TTFT를 거의 일정하게 유지합니다. k=50에서 TTFT를 72-79%(3.6-4.8배) 줄이고, 서빙 시점 재계산 없이도 Mem0의 63.3% 대비 60.3%의 정확도를 달성하며, 동시 부하 환경에서 3.7-4.5배의 처리량을 제공합니다. 따라서 재사용 가능한 KV 상태는 애플리케이션 품질을 보존하면서도 메모리 조건부 서빙 지연 시간을 검색된 컨텍스트 크기로부터 분리합니다.
원문 초록
Large language models are increasingly deployed with persistent personalized context, such as accumulated memory profiles or long conversation histories, that is shared across a user's many requests. Production memory systems (e.g., Mem0, MemGPT, and Zep) retrieve a relevant subset of this memory and inject it into the prompt, forcing the serving engine to repeatedly prefill the same content. As the retrieval budget grows, time-to-first-token (TTFT) increases even though the underlying memory is reused across requests. We present InferScale, a GPU-native LLM memory system that replaces repeated prompt prefilling with reusable KV state. InferScale precomputes each memory fact's KV representation, stores it alongside a semantic embedding on the GPU, retrieves relevant facts at serving time, and injects their KV directly into vLLM's paged cache. To support dynamically assembled memories under rotary position embeddings, we introduce Chunked RoPE, which stores keys before rotation and applies their serving-time positions during injection. However, encoding memory facts independently omits the cross-fact context available during joint prefilling. We mitigate this with Context-Window Encoding, which encodes each memory fact together with a small window of preceding conversation context while caching only the target fact's KV. InferScale is implemented through vLLM's KV-connector interface, requiring neither engine modifications nor model fine-tuning. Across three open-weight models on LoCoMo, InferScale keeps TTFT nearly constant as the retrieval budget increases: at k=50 it reduces TTFT by 72-79% (3.6-4.8x), achieves 60.3% accuracy versus 63.3% for Mem0 without serving-time recomputation, and delivers 3.7-4.5x the throughput under concurrent load. Reusable KV state thus decouples memory-conditioned serving latency from retrieved-context size while preserving application quality.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2607.27090v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.