RedKnot: 헤드 인지적 키-값 재사용 및 세그먼트 페이지화된 어텐션을 활용한 효율적인 장문 컨텍스트 LLM 서비스
RedKnot: Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttention
대규모 언어 모델(LLM) 서비스의 입력 길이가 계속 증가함에 따라, 키-값(KV) 캐시가 AI 인프라에서 주요 병목 현상으로 부상하고 있습니다. 이는 GPU 메모리 용량, 서비스 처리량, 캐시 재사용 및 분산 확장성에 제한을 가합니다. 위치 독립적인 KV 캐시, 프리픽스 KV 캐시 압축, 핫/콜드 KV 캐시 분리, 그리고 분산 KV 캐시 관리 등 여러 중요한 문제는 KV 캐시가 어떻게 표현되고 관리되는지에 따라 결정됩니다. 그러나 기존 서비스 시스템은 대부분 단일화된 KV 캐시 추상화를 사용하며, 여기서 KV 캐시는 토큰 수준의 메모리 블록으로 취급되며 어텐션 헤드 및 서비스 시나리오에 걸쳐 유사한 정책으로 관리됩니다. 우리는 KV 캐시의 유용성이 각 KV 헤드별로 매우 구조적으로 다르다는 것을 관찰했습니다. 즉, 서로 다른 헤드는 서로 다른 기능적 역할, 어텐션 거리 및 런타임 중요도를 갖습니다. 따라서 모든 헤드, 토큰 범위 또는 서비스 시나리오에 대해 전체 KV 캐시가 항상 필요한 것은 아닙니다. 본 논문에서는 LLM 서비스를 위한 헤드 인지적인 KV 캐시 관리 시스템인 RedKnot을 소개합니다. RedKnot은 기존의 단일화된 KV 캐시 추상화를 벗어나, 서비스 시나리오에 따라 중요도와 효과적인 어텐션 범위가 크게 달라지는 각 KV 헤드를 기준으로 KV 캐시를 분해합니다. 이러한 헤드 수준의 분해는 KV 캐시를 단일 텐서 추상화에서 구조화된 메모리 객체로 변환하며, 이를 통해 RedKnot은 모델 재학습 또는 미세 조정 없이 위치 독립적인 KV 재사용, 프리픽스 KV 압축, 핫/콜드 KV 분리 및 분산 KV 배치 기능을 균일하게 지원하면서 출력 정확도를 유지하고 리소스 효율성을 향상시킵니다. RedKnot은 KV 캐시를 단일화되고 수동적인 런타임 요소에서 벗어나, 확장 가능한 LLM 서비스에 적합한 동적이고 모델 인지적인 런타임 기반으로 변화시켜 AI 인프라의 새로운 토대를 마련합니다.
As the input length of large language model (LLM) serving continues to grow, the KV cache has become a dominant bottleneck in AI infrastructure. It limits GPU memory capacity, serving concurrency, cache reuse, and distributed scalability. Several important problems, including position-independent KV cache, prefix KV cache compression, hot/cold KV cache separation, and distributed KV cache management, all depend on how the KV cache is represented and managed. However, existing serving systems largely rely on a monolithic KV cache abstraction, where the KV cache is treated as a homogeneous sequence of token-level memory blocks and managed with similar policies across attention heads and serving scenarios. We observe that KV cache utility is highly structured across KV heads: different heads exhibit different functional roles, attention distances, and runtime importance. Therefore, a full KV cache is not always necessary for every head, token range, or serving scenario. We present RedKnot, a head-aware KV cache management system for LLM serving. RedKnot breaks the conventional monolithic KV cache abstraction by decomposing the KV cache along KV heads, whose importance and effective attention ranges vary significantly across serving scenarios. This head-level decomposition turns the KV cache from a monolithic tensor abstraction into a structured memory object, enabling RedKnot to uniformly support position-independent KV reuse, prefix KV compression, hot/cold KV separation, and distributed KV placement while preserving output fidelity and improving resource efficiency, without requiring model retraining or fine-tuning. RedKnot establishes a new foundation for AI infrastructure by transforming the KV cache from a monolithic, passive runtime artifact into a dynamic, model-aware runtime substrate for scalable LLM serving.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.