위치 불변(Position-Independent) KV 캐시와 추론 토큰 기반 글로벌 캐시 재사용 기술

Created 10/12/2026Edited 10/22/2026

  • Artificial Intelligence
  • LLM
  • KV Cache

4 views

View
Contents (23)

1. 개요 및 배경

대형 언어 모델(LLM)을 활용한 서비스, 특히 검색 증강 생성(RAG), 다중 문서 요약, 복합 에이전트 시스템에서는 긴 문맥(Long Context) 처리가 필수적입니다. 그러나 긴 문맥을 처리할 때 발생하는 Prefill 단계의 계산 비용과 그로 인한 첫 토큰 생성 시간(TTFT, Time-To-First-Token) 지연은 서비스 확장성의 주요 병목으로 작용합니다.

이를 해결하기 위해 이전 추론에서 계산된 Key-Value 벡터를 저장하여 재사용하는 KV 캐시(Context/Prompt Caching) 기법이 활발히 도입되고 있습니다. 하지만 기존 시스템(vLLM, SGLang 등)의 캐싱 메커니즘은 엄격한 접두사 일치(Prefix Matching)에 의존하고 있어 다음과 같은 치명적 한계를 가집니다:

  1. 순서 의존성 및 캐시 무효화: RAG 환경에서 동일한 문서들이 검색되더라도, 검색 점수에 따라 문서의 배치 순서가 바뀌거나 앞단에 사용자 질의/시스템 프롬프트가 달라지면 전체 KV 캐시가 무효화되어 Prefill을 처음부터 다시 수행해야 합니다.
  2. 세션 및 사용자 간 격리: 프롬프트의 전치 부분(Prefix)이 조금만 달라져도 캐시를 공유할 수 없으므로, 공유 지식 베이스의 문서들이 수많은 사용자에게 반복 참조되더라도 글로벌 수준에서 KV 캐시를 재사용하기 어렵습니다.
vLLM의 자동 접두사 캐싱(Automatic Prefix Caching) 동작 구조

vLLM의 자동 접두사 캐싱(Automatic Prefix Caching) 동작 구조

Source: vLLM Documentation

위 그림은 vLLM 등 현대 LLM 서빙 프레임워크의 자동 접두사 캐싱(Automatic Prefix Caching) 구조를 보여줍니다. 시퀀스 앞부분(Prefix)의 토큰 해시가 트리 형태로 완전히 일치할 때만 KV 캐시 블록을 재사용할 수 있어, 문서 순서가 바뀌거나 동적 질의가 선행되는 환경에서는 캐시 히트율이 급격히 저하됩니다.

본 문서는 이러한 한계를 극복하기 위해 제안된 위치 불변(Position-Invariant/Position-Independent) 문서 단위 캐싱과 추론 토큰(Reasoning Token)을 활용한 교차 문서 정보 종합 기법, 그리고 이를 통해 달성할 수 있는 글로벌 KV 캐시 재사용 아키텍처를 분석하고 관련 최신 연구를 정리합니다.


2. 제안 개념 및 메커니즘 분석

2.1 문서 내(Intra-document) vs 문서 간(Inter-document) 어텐션 비대칭성

트랜스포머 모델의 셀프 어텐션(Self-Attention) 분석 결과에 따르면, 텍스트 토큰 간의 상호작용은 문맥 구조에 따라 뚜렷한 비대칭성을 보입니다:

  • 문서 내부(Intra-document): 동일한 단락이나 문서 내부의 토큰들은 의미론적, 문법적으로 긴밀하게 연결되어 있어 밀집(Dense) 어텐션이 강하게 형성됩니다.
  • 문서 간(Inter-document): 서로 독립적으로 작성된 문서 청크(Chunk) 사이의 어텐션은 매우 희소(Sparse)하거나 상대적으로 기여도가 낮습니다. 모델은 각 문서의 독립된 의미 단위를 먼저 파악한 후, 최종 답변 도출 시점에만 필요한 교차 정보를 연결합니다.

따라서 모든 문서를 하나의 긴 시퀀스로 묶어 O(N^2) 어텐션을 한 번에 수행하는 대신, 문서 단위로 독립 인코딩하여 캐싱하고 런타임에 조립하는 접근이 수학적·구조적으로 타당성을 가집니다.

2.2 위치 불변(Position-Independent) 청크 인코딩 및 조립 (Compile & Link)

문서를 독립적으로 캐싱하고 임의의 순서로 조립하기 위해 컴파일-링크(Compile & Link) 모델이 적용됩니다:

  1. 컴파일 단계(Compile Step): 각 문서 청크를 상대 위치 0번(Position ID = 0)부터 시작하여 LLM에 사전 입력하고, 생성된 KV 벡터를 글로벌 KV 스토어에 독립 저장합니다.
  2. 조립 및 위치 보정(Link Step - Positional Re-encoding):
    • 사용자의 요청 시 검색된 문서 청크들의 KV 캐시를 임의의 순서로 불러옵니다.
    • RoPE(Rotary Position Embedding) 등 현대 LLM의 상대적 위치 임베딩 특성을 활용하여, 조립된 전체 시퀀스 내의 실제 오프셋에 맞게 Key 벡터의 위치 인코딩을 회전 변환(Rotation/Shift)하여 정렬합니다.
    • 이를 통해 원본 텍스트를 재연산(Prefill)하지 않고도 메모리 상에서 KV 캐시 블록을 즉시 결합할 수 있습니다.

2.3 교차 문서 어텐션 복원과 추론 토큰(Reasoning Token)의 역할

독립 인코딩된 청크를 단순히 이어 붙이기만 할 경우, 두 가지 구조적 문제가 발생할 수 있습니다:

  • 어텐션 싱크(Attention Sink) 왜곡: 각 청크가 Position 0으로 인코딩되면서 각 청크의 첫머리 토큰(Initial Tokens)에 과도한 어텐션 점수가 집중되어, 다른 문서의 핵심 정보를 참조하지 못하는 현상이 발생합니다.
  • 교차 문서 추론(Cross-Document Reasoning) 단절: 서로 다른 두 문서에 걸친 복합 사실(Multi-hop Fact)을 검증하고 종합하는 상호작용이 사전 인코딩 단계에서 완전히 배제됩니다.
StreamingLLM의 어텐션 싱크(Attention Sink) 현상과 초기 토큰 보존 구조 다이어그램

StreamingLLM의 어텐션 싱크(Attention Sink) 현상과 초기 토큰 보존 구조 다이어그램

Source: MIT HAN Lab

위 그림은 StreamingLLM(Xiao et al.)에서 입증된 시퀀스 시작부의 초기 토큰(Attention Sink)에 높은 어텐션 점수가 집중되는 현상과 캐시 유지 구조를 나타냅니다. 각 청크를 독립적으로 0번 위치부터 인코딩할 때도 동일한 싱크 왜곡이 발생하므로 이를 해결하기 위한 정적/동적 보정이 요구됩니다.

이를 해결하기 위해 추론 토큰(Reasoning Token / Thought Token / Latent Scratchpad)을 전략적으로 활용합니다:

  1. 디코딩 단계의 동적 교차 어텐션 종합 (Test-time Relational Synthesis):
    • 기존의 접두사 Prefill 방식은 모든 문서 간 관계를 O(N^2)의 고비용으로 한 번에 계산하려 했습니다.
    • 반면 제안 방식은 Prefill 단계에서는 문서 청크들을 독립적으로 유지하되, 질의 입력 직후 추론 토큰(Thinking Tokens)을 생성하도록 유도합니다.
    • 디코딩 단계에서 생성되는 각 추론 토큰 t_{\text{think}}는 인과적 어텐션(Causal Attention)을 통해 이미 결합된 전체 문서 청크의 KV 캐시를 가로지르며(Cross-attending) 필요한 단서를 동적으로 탐색합니다.
    • 복잡한 다중 홉(Multi-hop) 질문의 경우, 첫 번째 추론 토큰들이 Chunk A의 단서를 읽고 중간 개념을 형성한 뒤, 후속 추론 토큰들이 Chunk B의 관련 사실을 검색·검증하는 반복적 단서 종합(Iterative Evidence Synthesis)을 수행합니다. 이는 O(N^2)의 무거운 Prefill 연산 없이도 O(T_{\text{reasoning}} \cdot N)의 선형적 디코딩 비용으로 심층 상호작용을 완벽히 복원합니다.
  2. 특수 연결 토큰(Link Token) 및 선택적 재계산 병행:
    • 문서 경계면에 학습된 연결 토큰(Link Token)을 배치하여 청크 간 글로벌 어텐션 경로를 열어주거나, 청크 시작부의 소수 토큰(k개)을 런타임에 재계산(Recompute)하여 어텐션 싱크 왜곡을 사전에 무력화합니다.
    • 이를 통해 추론 토큰이 어텐션 싱크에 갇히지 않고 전역 문맥을 자유롭게 참조할 수 있습니다.

2.4 세션/사용자를 초월한 글로벌 지식 캐시(Cross-Session/User KV Cache)

기존 접두사 기반 캐싱은 사용자가 100명이고 각자의 질의가 다르면 동일한 지식 문서를 보더라도 캐시를 공유하지 못했습니다. 반면 위치 불변 조립 방식을 취하면 다음과 같은 핵심적인 이점이 있습니다:

  • 엔터프라이즈 사내 문서, 위키피디아, 제품 매뉴얼 등 고정 지식 베이스(Immutable Chunks)를 단 1회 오프라인으로 컴파일하여 공유 스토리지에 적재합니다.
  • 모든 사용자, 모든 세션에서 검색된 문서 조합이 어떠하든 순서와 무관하게 즉시 조립하여 사용하므로, 지식 청크의 캐시 히트율을 이론상 100%로 끌어올릴 수 있습니다.

2.5 동적 컨텍스트 윈도우 관리: 선택적 제거, 국소 압축 및 요구 기반 재로딩(On-demand Loading)

기존 접두사 일치(Prefix Caching) 환경에서는 대화가 길어지거나 컨텍스트 윈도우 한계에 도달했을 때 앞쪽 컨텍스트를 일부 잘라내면(Sliding Window/Truncation), 뒤따르는 모든 토큰의 절대 위치가 변경되어 후속 전체 KV 캐시가 무효화되는 치명적인 문제가 발생합니다. 이로 인해 전체 문맥을 요약하여 처음부터 다시 Prefill하는 비효율적인 완전 재시작(Full Restart)이 불가피했습니다.

반면, 위치 불변(Position-Independent) 청크 아키텍처가 구축되면 컨텍스트 관리가 다음과 같이 획기적으로 전환됩니다:

  1. 비파괴적 앞단 컨텍스트 제거(Non-destructive Head Eviction):
    • 컨텍스트 길이가 임계치에 도달하더라도 전체를 다시 계산할 필요 없이, 가장 오래되거나 우선순위가 낮은 앞쪽 청크 단위의 KV 블록만 메모리에서 즉시 해제(Eviction)할 수 있습니다.
    • 남은 청크들은 각자 독립적인 위치 불변 블록이므로, Key 벡터의 RoPE 오프셋만 간단히 재조정(Shift)하면 전체 Prefill 재연산 없이도 즉시 연속적인 추론을 유지할 수 있습니다.
  2. 국소 청크 압축 및 요약 캐시 치환(Localized Chunk Compression):
    • 전체 시퀀스를 한꺼번에 압축하는 대신, 제거 대상이 되는 앞쪽 청크들만 선별하여 경량 요약 토큰이나 고압축 KV 블록(Quantized/Pruned KV)으로 변환합니다.
    • 압축된 요약 청크 또한 하나의 독립된 위치 불변 청크로 다루어지므로, 기존 청크 자리에 '압축된 요약 블록'만 교체 삽입하는 방식으로 문맥 정보를 손실 없이 보존합니다.
  3. 가상 메모리 형태의 선택적 요구 기반 로딩(On-demand Selective Loading / KV Paging):
    • 세션이 초장기화(Long-running Agent / Multi-turn)될 때 모든 과거 턴의 KV 캐시를 GPU HBM에 상주시킬 필요가 없습니다.
    • 앞쪽 과거 컨텍스트들은 호스트 메모리(CPU DRAM/NVMe SSD)로 내려두었다가, 향후 디코딩 과정의 추론 토큰(Reasoning Token)이나 리트리버가 특정 과거 턴의 정보를 필요로 할 때 해당 청크의 KV 캐시만 선택적으로 GPU에 즉시 로드(Page-In)하여 어텐션을 수행할 수 있습니다.
    • 이는 운영체제(OS)의 요구 페이징(Demand Paging) 및 가상 메모리 기법을 대형 언어 모델의 KV 캐시 관리에 직접 구현하는 효과를 제공합니다.
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .

3. 관련 선행 연구 및 실험 결과 분석

위치 불변 캐싱(PIC) 및 교차 문서 어텐션 복원과 관련하여 학계 및 산업계에서 발표된 대표적인 선행 연구들과 그 정량적 실험 결과는 다음과 같습니다:

3.1 Prompt Cache: Modular Attention Reuse (MLSys 2024)

  • 핵심 아이디어: 시스템 프롬프트, 퓨샷(Few-shot) 예제, 문서 템플릿 등 반복 사용되는 텍스트를 독립적인 '프롬프트 모듈'로 사전 계산하여 캐싱합니다.
  • 실험 결과 및 성능: 공통 접두사 구간에 대해 TTFT를 8~10배 단축시켰으나, 접두사 일치(Prefix-matching) 규칙에 종속되어 있어 문서 순서가 바뀌거나 동적 사용자 질의가 앞에 오면 캐시를 전혀 활용하지 못합니다.
  • 정확도 영향: 접두사가 일치하지 않는 환경에서 단순 재사용 시, 위치 임베딩 왜곡으로 인해 QA 벤치마크(HotpotQA 20.5%, NaturalQuestions 18.6% 등)에서 치명적인 성능 하락을 보였습니다.

3.2 CacheBlend: Fast LLM Serving for RAG with Cached Knowledge Fusion (ACM EuroSys 2025 Best Paper)

CacheBlend 논문 원본의 시스템 구조도 (Figure 11: Loading Controller, KV Cache Store, Cache Fusor 파이프라인)

CacheBlend 논문 원본의 시스템 구조도 (Figure 11: Loading Controller, KV Cache Store, Cache Fusor 파이프라인)

Source: velog

위 그림은 CacheBlend 원본 논문의 핵심 시스템 아키텍처 다이어그램(Figure 11)입니다. 텍스트 청크를 해시하여 관리하는 KV Cache Store, 오프라인 프로파일링 기반으로 I/O 지연을 은닉하는 Loading Controller, 그리고 15% 토큰을 선별 갱신하는 Cache Fusor의 파이프라인 구성을 정확히 보여줍니다.

  • 핵심 아이디어: RAG 환경에서 임의 순서로 결합된 사전 인코딩 청크들의 KV 캐시를 조립한 뒤, 1번째 레이어에서 전체 KV를 재계산하여 어텐션 맵 오차가 큰 상위 약 15% 토큰(HKVD, High KV Discrepancy)을 동적으로 선별하고, 후속 레이어에서는 이 15% 토큰만 선택적으로 재연산(Selective Recomputation)하여 교차 어텐션을 근사 복원합니다.
  • 정량적 실험 결과:
    • 지연 시간 및 처리량: 전체 KV를 처음부터 재계산(Full Recomputation)하는 대비 TTFT를 2.2배 ~ 3.3배 단축시켰으며, 동일 TTFT 기준 서빙 처리량(Throughput)을 최대 2.8배 ~ 5배 향상시켰습니다.
    • 정확도 보존: 단순 단문 요약(MultiNews, SAMSum 등)이나 가벼운 검색 과제에서는 Full Recompute에 근접한 ROUGE/F1 점수를 달성했습니다.
    • 복합 QA에서의 한계: 상위 15%만 선별 재연산하므로, 복잡한 다중 홉(Multi-hop) 질문에서는 성능 저하가 뚜렷하게 나타났습니다(Llama-3.2-1B 기준 HotpotQA 28.7%, MuSiQue 3.7%에 그쳐 원본 모델의 49.3%, 13.8% 대비 대폭 하락했습니다).

3.3 EPIC & LegoLink: Efficient Position-Independent Caching (ICML 2025 / arXiv 2024, Hu et al.)

EPIC 논문 원본의 서빙 시스템 아키텍처 다이어그램 (Figure 3: KVCompile 컴파일 단계와 KVLink 링크 단계 파이프라인)

EPIC 논문 원본의 서빙 시스템 아키텍처 다이어그램 (Figure 3: KVCompile 컴파일 단계와 KVLink 링크 단계 파이프라인)

Source: ICML 2026

위 그림은 EPIC 논문의 핵심 시스템 아키텍처 다이어그램(Figure 3)입니다. 불변 문서 청크를 사전 처리하여 캐시 ID를 부여하는 KVCompile(컴파일 단계)과, 사용자의 동적 질의 및 캐시 ID를 받아 LegoLink 알고리즘으로 연결·재계산 후 디코딩을 수행하는 KVLink Scheduler(링크 단계)의 전체 엔드투엔드 파이프라인을 보여줍니다.

  • 핵심 메커니즘: 위치 불변 캐싱을 '컴파일(Compile) & 링크(Link)' 2단계 프레임워크로 정형화했습니다. 독립 인코딩 시 발생하는 어텐션 오차의 핵심 원인이 각 청크 시작 부분의 어텐션 싱크(Attention Sink) 현상(각 청크의 첫머리 토큰들이 위치 0으로 인코딩되며 비정상적으로 높은 어텐션을 흡수하여 이전 문서 참조를 방해하는 현상)임을 이론적·실험적으로 규명했습니다.
  • LegoLink 알고리즘: 복잡한 동적 선별 대신, 각 청크의 시작부 k개(k \le 32) 토큰만 정적(Static)으로 재계산하여 싱크 현상을 무력화하고 복잡도를 O(15\% N^2)에서 O(kN) \sim O(N)으로 대폭 축소했습니다.
  • 정량적 실험 결과:
    • TTFT 및 처리량: CacheBlend 대비 TTFT 최대 3배 추가 단축, 비캐싱 대비 최대 8배 단축, 동시 요청 환경에서 처리량 최대 7배 향상을 달성했습니다.
    • 정확도 유지: LongBench 벤치마크(2WikiMQA, HotpotQA, MultiNews 등) 및 Needle-in-a-Haystack 평가에서 완전 재연산 대비 정확도 손실을 7% 이내로 효과적으로 방어했습니다.

3.4 KVLink: Accelerating LLMs via Efficient KV Cache Reuse (NeurIPS 2025/2026, Yang et al.)

KVLink의 위치 재인코딩(RoPE Shift)과 학습형 연결 토큰(Link Token)을 통한 어텐션 연결 구조도

KVLink의 위치 재인코딩(RoPE Shift)과 학습형 연결 토큰(Link Token)을 통한 어텐션 연결 구조도

Source: NeurIPS 2026

위 그림은 NeurIPS에 발표된 KVLink 논문(Figure 1/2)의 핵심 메커니즘을 나타냅니다. 사전 계산된 독립 청크의 KV 캐시를 임의 순서로 결합하고, 위치 재인코딩(Positional Re-encoding)과 학습형 연결 토큰(Link Token)을 통해 어텐션 연속성을 복원하는 원리를 보여줍니다.

  • 등장 배경 및 설계 철학:

    • 기존 CacheBlend 등 동적 선별 재연산 방식은 런타임 오버헤드가 크고 복잡한 다중 홉(Multi-hop) 질문에서 치명적인 성능 저하를 겪었습니다.
    • KVLink는 원본 문서를 다시 모델에 통과시켜 재계산하는 무거운 연산을 배제하고, Key 벡터의 수학적 좌표 변환과 극소수의 학습형 브릿지 토큰(Link Token)만으로 교차 문서 상호작용을 온전히 복원하도록 설계되었습니다.
  • 2가지 핵심 기술 메커니즘:

    1. KV 캐시 위치 재인코딩 (KV Cache Positional Re-encoding):
      • 각 문서 청크는 오프라인에서 위치 인덱스 0번(p \in [0, L_{\text{chunk}}-1])을 기준으로 독립 사전 인코딩되어 글로벌 스토어에 저장됩니다.
      • 런타임 조립 시, 결합된 전체 시퀀스 상의 실제 시작 오프셋(P_{\text{offset}})에 맞춰 Key 벡터의 위치 임베딩을 변환합니다. RoPE(Rotary Position Embedding)의 선형 회전 특성을 이용하여, Key 벡터에 회전 각도 \Delta \theta = P_{\text{offset}} \cdot \Theta를 곱하는 가벼운 GPU 커널 연산(O(1))만으로 위치 좌표계를 전역 시퀀스에 완벽히 동기화합니다.
    2. 학습형 연결 토큰 (Trainable Link Tokens):
      • 단순히 Key 벡터의 위치만 맞추면 두 가지 문제가 남습니다: 청크 시작부의 어텐션 싱크 왜곡과 이전 문서 청크에 대한 교차 어텐션 부재입니다.
      • KVLink는 독립 인코딩된 청크 경계면 사이에 1~5개의 경량 학습형 토큰(Link Token)을 배치합니다. 이 연결 토큰들은 조립된 시퀀스에서 이전 청크 전체를 조망하는 소프트 브릿지(Soft Bridge) 역할을 수행하여, 후속 쿼리 토큰과 추론 토큰들이 이전 문서들의 KV 캐시를 원활하게 교차 참조(Cross-attend)할 수 있는 통로를 제공합니다.
  • 훈련 및 최적화 기법:

    • 연결 토큰(Link Token)의 임베딩은 사전 훈련된 모델의 가중치를 최대한 보존하면서 다중 문서 QA 및 요약 데이터셋(2WikiMQA, HotpotQA, FineWeb 등)을 기반으로 경량 파인튜닝됩니다.
    • 모델의 기본 지식과 추론 역량(IFEval, GSM8K, MMLU 등)을 평가한 결과, 파멸적 망각(Catastrophic Forgetting) 없이 원본 모델 성능을 100% 온전히 유지함을 입증했습니다.
    • 캐시 압축(KV Cache Compression)과의 결합: AnLLMs 등 최신 KV 압축/프루닝 기법과 결합하여 캐시 크기를 50%~75% 대폭 감축한 상태에서도, Link Token이 핵심 문맥을 압축 전달하여 성능 하락을 효과적으로 방어합니다.
  • 정량적 실험 결과 및 성능 검증:

    • TTFT 단축율: 사전 계산된 청크의 KV 캐시를 즉시 로드하고 극소수의 Link Token만 포워드 연산하므로, 전체 문맥을 처음부터 다시 계산하는 기본 서빙 대비 TTFT를 85% ~ 96% 단축했습니다 (문맥 길이 5,000 토큰 기준 96% 단축 달성).
    • 다중 홉 QA 정확도 비교 (Llama-3.2-1B 기준):
      • NaturalQuestions: KVLink 45.0% (원본 모델 44.6%, CacheBlend 25.7%)
      • 2WikiMQA: KVLink 66.0% (원본 모델 61.8%, CacheBlend 31.0%)
      • HotpotQA: KVLink 55.6% (원본 모델 49.3%, CacheBlend 28.7%)
      • MuSiQue: KVLink 19.2% (원본 모델 13.8%, CacheBlend 3.7%)
      • 기존의 부분 재연산 방식(CacheBlend)이 복합 다중 홉 작업에서 절반 이하로 급락했던 한계를 완벽히 극복하고, 오히려 원본 전체 재계산 모델보다도 높은 정확도를 달성했습니다.

3.5 Comb: Native Position-Independent Caching with Encoder Plug-in (arXiv 2026, Zhao et al.)

  • 핵심 아이디어: 기존 디코더 전용(Decoder-only) LLM에 경량 인코더 플러그인(예: 32개 디코더 레이어 사이에 8개 인코더 레이어 인터리빙)을 도입하여, 모델 아키텍처 수준에서 위치 불변 캐싱(PIC)을 고유 기능(Native Capability)으로 구현했습니다.
  • 디코더 파라미터 완전 고정(Frozen Decoder):
    • 디코더의 모든 파라미터와 가중치를 완전히 동결(Freeze)한 채, 문서 청크를 독립 인코딩하는 인코더와 디코더 내 크로스 어텐션(Cross-Attention) 레이어만 명시적으로 PIC에 맞춰 훈련합니다.
    • 기존 모델 가중치를 수정하지 않으므로 파인튜닝으로 인한 파멸적 망각(Catastrophic Forgetting) 위험을 원천적으로 배제하며, 필요 시 플러그인을 비활성화하여 순수 디코더 모델로 즉시 복귀할 수 있습니다.
  • 정량적 실험 결과 및 이점:
    • KV 메모리 75% 절감: 전체 디코더 레이어(L_D) 대신 소수 인코더 레이어(L_E, 예: 8개)에 대해서만 문서 KV 캐시를 생성·저장하므로, 기존 대비 KV 메모리 사용량을 75% 절감합니다.
    • 지연 시간 및 처리량: 캐시 히트 시 TTFT를 51% ~ 94% 단축하고, 서빙 처리량(Throughput)을 최대 3배 향상시켰습니다.
    • 정확도 보존: LongBench 및 멀티 문서 QA에서 접두사 기반 완전 어텐션(Prefix-based Attention)과 동등하거나 그 이상의 정확도를 달성했습니다.
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.
  • arXivSource 4, You Need an Encoder for Native Position-Independent CachingThe Key-Value (KV) cache of Large Language Models (LLMs) is prefix-based, making it highly inefficient for processing contexts retrieved in arbitrary order. Position-Independent Caching (PIC) has been proposed to enable KV reuse without positional constraints; however, existing approaches often incur substantial accuracy degradation, limiting their practical adoption. To address this issue, we propose native PIC by reintroducing the encoder to prevalent decoder-only LLMs and explicitly training it to support PIC. We further develop Comb , a PIC-aware caching system that integrates seamlessly with existing inference frameworks. Experimental results show that Comb reduces Time-to-First-Token (TTFT) by 51-94% and increases throughput by 3 $\times$ with comparable accuracy. Furthermore, the quality improvement when using DeepSeek-V2-Lite-Chat demonstrates the applicability of Comb to other types of decoder-only LLMs. Our code is available at

4. 기존 연구의 벤치마크 실험 결과 비교

최신 선행 연구들(KVLink, EPIC, CacheBlend, Comb)에서 보고된 주요 QA 및 긴 문맥 벤치마크 상의 정량적 실험 결과를 정리하면 다음과 같습니다:

4.1 정량적 성능 벤치마크 비교

평가 항목 / 벤치마크원본 모델 (Full Recompute)Prompt Cache (접두사 불일치 시)CacheBlend (상위 15% 동적 재연산)LegoLink / EPIC (첫 k개 정적 재연산)KVLink (위치 재인코딩 + Link Token)Comb (인코더 플러그인 Native PIC)
NaturalQuestions (QA)44.6%18.6%25.7%-45.0% (원본 회복)동등 이상 유지
HotpotQA (Multi-hop)49.3%20.5%28.7%F1 손실 < 7% 이내55.6% (원본 대비 +6.3%p)원본 수준 동등 이상
2WikiMQA (Multi-hop)61.8%19.5%31.0%F1 손실 < 5% 이내66.0% (원본 대비 +4.2%p)원본 수준 동등 이상
MuSiQue (Complex QA)13.8%1.4%3.7%-19.2% (복합 추론 보존)원본 수준 동등 이상
TTFT 단축율기준치 (0%)조건부 80~90% (접두사 일치 시)55% ~ 70% 단축 (2.2~3.3x)최대 88% 단축 (3~8x)85% ~ 96% 단축 (5k 토큰 96%)51% ~ 94% 단축
서빙 처리량 향상기준치 (1x)조건부 2~3x2.8x ~ 5x 향상최대 7x 향상대규모 동시 요청 지원 가능최대 3x 향상
KV 캐시 메모리 절감기준치 (0%)0%0%0%압축 결합 시 50~75%기본 75% 절감 (L_E \ll L_D)
Prefill 계산 복잡도O(N^2)O(N^2) (불일치 시 전체 재계산)O(0.15 \times N^2)O(kN) \sim O(N)O(L \cdot N) \sim O(N) (L: Link Token)O(L_E l_{\text{doc}}^2 + L_{\text{cross}} l_{\text{query}} l_{\text{doc}})
기존 모델 가중치 수정해당 없음없음 (Tuning-free)없음 (Tuning-free)없음 (Tuning-free)경량 연결 토큰 학습 필요 (망각 위험 방지)디코더 완전 동결 (플러그인 훈련)
  • arXivSource 4, You Need an Encoder for Native Position-Independent CachingThe Key-Value (KV) cache of Large Language Models (LLMs) is prefix-based, making it highly inefficient for processing contexts retrieved in arbitrary order. Position-Independent Caching (PIC) has been proposed to enable KV reuse without positional constraints; however, existing approaches often incur substantial accuracy degradation, limiting their practical adoption. To address this issue, we propose native PIC by reintroducing the encoder to prevalent decoder-only LLMs and explicitly training it to support PIC. We further develop Comb , a PIC-aware caching system that integrates seamlessly with existing inference frameworks. Experimental results show that Comb reduces Time-to-First-Token (TTFT) by 51-94% and increases throughput by 3 $\times$ with comparable accuracy. Furthermore, the quality improvement when using DeepSeek-V2-Lite-Chat demonstrates the applicability of Comb to other types of decoder-only LLMs. Our code is available at
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.

5. 기존 선행 연구의 핵심 한계점 및 해결해야 할 과제

선행 연구들은 TTFT 단축과 캐시 재사용성 측면에서 상당한 진전을 이루었으나, 실제 엔터프라이즈 프로덕션 환경 및 고난도 추론 작업에 적용할 때 다음과 같은 구조적 한계와 미해결 과제를 안고 있습니다:

5.1 복합 다중 홉(Multi-hop) 추론 품질 저하 및 단일 패스(Single-pass)의 한계

  • 문제점: CacheBlend, LegoLink 등 기존 방식은 문서들을 독립 인코딩한 후 Prefill 단계에서 소수 토큰만 재연산하거나 정적으로 보정합니다. 그러나 2개 이상의 서로 다른 문서에 흩어진 단서를 조합해야 하는 다중 홉 추론(Multi-hop Reasoning / MuSiQue / HotpotQA)에서는 문서 간 교차 어텐션이 충분히 활성화되지 않아 환각(Hallucination)이나 정답 누락이 빈번합니다.
  • 해결 방안 (추론 토큰의 결정적 역할): 단일 패스 Prefill에만 의존하지 않고, 질의 입력 직후 추론 토큰(Reasoning / Thinking Tokens, 예: CoT / Latent Scratchpad)을 연속 생성하도록 유도합니다. 디코딩 단계에서 생성되는 각 추론 토큰이 조립된 전체 문서 청크의 KV 캐시를 가로지르며(Cross-attending) 필요한 교차 단서를 동적으로 탐색·검증·종합함으로써, 사전 인코딩 단계에서 손실된 심층 상호작용을 사후 복원합니다.

5.2 동적 선별 알고리즘의 런타임 오버헤드와 확장성 병목

  • 문제점: CacheBlend 방식은 어텐션 차이가 큰 상위 15% 토큰을 동적으로 찾기 위해 매 요청마다 1번째 레이어 전체에 대한 사전 포워드 패스(Full KV 재계산)를 실행하고 어텐션 맵 오차를 계산합니다. 이 동적 선별 오버헤드가 전체 TTFT의 16.3% ~ 63.5%를 잠식하며, 문맥 길이가 32k~128k 이상으로 길어지면 O(0.15 N^2) 연산량 자체로 인해 GPU 메모리 부족(OOM) 및 지연이 다시 급증합니다.
  • 해결 방안: 런타임 동적 선별을 배제하고, LegoLink 형태의 정적 경계 재계산(O(kN))이나 KVLink의 위치 재인코딩(RoPE Shift, O(1)) 방식을 채택하여 결합 오버헤드를 극소화해야 합니다.

5.3 모델 파인튜닝 의존성 vs 서빙 범용성의 딜레마

  • 문제점: KVLink는 가장 높은 정확도 보존율을 보이지만, Link Token의 임베딩과 모델 가중치를 동기화하기 위해 대규모 데이터셋(2WikiMQA, FineWeb, Tülu 3 등)으로 수천 스텝 이상의 사전 파인튜닝(Fine-tuning)을 필수적으로 요구합니다. 이는 폐쇄형 상용 모델(Black-box LLM)이나 파인튜닝 비용이 극도로 높은 초거대 모델에는 즉각 도입하기 어렵다는 치명적인 제약이 있습니다.
  • 해결 방안:
    1. 디코더 동결 기반 플러그인(Comb 방식): 디코더 가중치를 완전히 고정(Freeze)하고 소수의 인코더 레이어만 PIC 전용으로 학습시켜 모델 파괴를 원천적으로 방지합니다.
    2. 가중치 수정이 필요 없는 Tuning-free 어텐션 싱크 마스킹/보정 기법을 고도화해야 합니다.
    3. 사전 학습된 범용 Reasoning 모델(예: DeepSeek-R1, OpenAI o-series 계열)의 자연스러운 Thinking 프로세스를 활용하여, 별도 가중치 학습 없이도 프롬프트/디코딩 레벨에서 교차 지식을 연결하는 범용 서빙 파이프라인을 구축해야 합니다.

5.4 KV 스토리지 용량 및 호스트-GPU 간 I/O 전송 병목

  • 문제점: 기업 내 수만~수백만 건의 문서 청크를 사전 컴파일할 경우, FP16 기준 KV 캐시의 용량은 수십 테라바이트(TB)에 달합니다. 이를 GPU HBM에 모두 상주시키는 것은 불가능하며, CPU DRAM이나 NVMe SSD로부터 검색된 청크의 KV를 GPU로 실시간 전송해야 합니다. 이 과정에서 PCIe 대역폭 병목으로 인한 I/O 지연이 발생하여 Prefill 계산 절감 효과를 상당 부분 상쇄할 수 있습니다.
  • 해결 방안:
    1. 인코더 기반 구조적 축소: Comb 모델처럼 소수의 인코더 레이어(L_E=8 \ll L_D=32)만 KV를 저장하도록 설계하여 원천적으로 스토리지 크기를 75% 절감할 수 있습니다.
    2. KV Cache 양자화 및 희소 압축: FP8/INT4 수준의 KV 양자화와 토큰 프루닝(AnLLMs, KIVI 등)을 적용하여 전송 데이터량을 추가로 대폭 절감해야 합니다.
    3. 지능형 계층형 프리페칭(Prefetching): 사용자 세션 및 리트리버(Retriever)의 검색 큐와 연동하여, 청크가 선택되는 즉시 비동기로 GPU HBM에 사전 로드(Prefetch)하는 파이프라인 오버랩 설계가 필수적으로 요구됩니다.

5.5 청크 분할 단위(Granularity) 및 문맥 경계 단절

  • 문제점: 문서를 고정 토큰(예: 512 토큰) 단위로 기계적으로 분할할 경우, 하나의 문장이나 의미 단위가 잘려 나가며 해당 경계면에서의 토큰 간 어텐션이 완전히 소실됩니다. 또한 문서 시작부의 Attention Sink 외에도 청크 끝부분의 잔여 정보가 다음 청크로 자연스럽게 전달되지 못합니다.
  • 해결 방안: 문단이나 섹션 단위의 시맨틱 청킹(Semantic Chunking)을 적용하고, 청크 경계에 소수의 중첩 토큰(Overlapping Window)을 허용하며 조립 시 중복을 제거하는 정교한 청크 인터페이스 프로토콜을 정립해야 합니다.
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .
  • arXivSource 4, You Need an Encoder for Native Position-Independent CachingThe Key-Value (KV) cache of Large Language Models (LLMs) is prefix-based, making it highly inefficient for processing contexts retrieved in arbitrary order. Position-Independent Caching (PIC) has been proposed to enable KV reuse without positional constraints; however, existing approaches often incur substantial accuracy degradation, limiting their practical adoption. To address this issue, we propose native PIC by reintroducing the encoder to prevalent decoder-only LLMs and explicitly training it to support PIC. We further develop Comb , a PIC-aware caching system that integrates seamlessly with existing inference frameworks. Experimental results show that Comb reduces Time-to-First-Token (TTFT) by 51-94% and increases throughput by 3 $\times$ with comparable accuracy. Furthermore, the quality improvement when using DeepSeek-V2-Lite-Chat demonstrates the applicability of Comb to other types of decoder-only LLMs. Our code is available at
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.

6. 제안 모델의 시스템 아키텍처 및 구현 고려사항

제안 구조를 실제 프로덕션 서빙 엔진(예: vLLM, SGLang 등)에 구현할 때 고려해야 할 핵심 엔지니어링 과제는 다음과 같습니다:

  1. RoPE Shift 커널 최적화:
    • 오프라인에서 Position 0 기반으로 저장된 Key 벡터들을 메모리 로드 시점에 조립된 전역 오프셋 P_{offset}만큼 위상 회전시키는 초고속 커스텀 GPU 커널(Triton / CUDA)을 필수적으로 구현해야 합니다.
  2. 어텐션 싱크(Attention Sink) 정적 격리:
    • 사전 인코딩 시 청크 시작부에 가상의 Sink Token을 배치하거나, 런타임 조립 시 첫 16~32개 토큰에 대해서만 경량 정적 재계산(LegoLink 방식)을 결합하여 싱크 왜곡을 사전에 제거해야 합니다.
  3. Reasoning Token의 Compute Budget 및 종료 제어:
    • 디코딩 단계에서 추론 토큰(Thinking Tokens)이 충분한 교차 탐색을 수행하도록 유도하되, 불필요한 토큰 낭비로 인한 Time-To-Output(전체 생성 시간) 증가를 방지하기 위해 태스크 복잡도에 따른 동적 사고 예산(Thinking Budget)을 설정해야 합니다.
  4. 계층형 글로벌 KV 풀 및 PagedAttention 확장:
    • Host Memory(CXL/DRAM), 고속 NVMe-SSD, GPU HBM으로 이어지는 다계층 스토리지 관리자를 구축하고, PagedAttention 블록 단위로 독립 청크의 수명 주기(LRU/LFU 캐싱)를 전역적으로 관리해야 합니다.
  5. 동적 컨텍스트 축출 및 요구 페이징(Demand Paging) 엔진:
    • 긴 대화나 장기 에이전트 환경에서 컨텍스트 윈도우 초과 시, 앞쪽 청크를 비파괴적으로 해제(Eviction)하거나 국소 요약 블록으로 치환하는 제어 모듈을 마련해야 합니다.
    • 추론 토큰이 과거의 특정 맥락을 요구할 때 오프로드된 해당 청크의 KV 캐시만 신속히 HBM으로 호출하는 온디맨드 스왑(Swap-in) 메커니즘을 지원해야 합니다.
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .

7. 결론

제안하신 '위치 불변(Position-Invariant) 청크 단위 캐싱 및 임의 조립'과 '추론 토큰(Reasoning Token)을 통한 문서 간 교차 정보 종합' 접근법은, 최신 연구들(CacheBlend, EPIC, KVLink, Comb)이 확인한 성능적 이점을 극대화하면서도 이들이 공통적으로 겪고 있는 '교차 문서 복합 추론 단절'과 '런타임 재연산 오버헤드' 문제를 동시에 돌파할 수 있는 차세대 컨텍스트 서빙 패러다임입니다.

Prefill 단계에서는 가벼운 위치 재인코딩(O(1)) 및 정적 보정/인코더 플러그인을 통해 TTFT를 90% 이상 단축하고 KV 메모리를 획기적으로 절감하며, 단절된 복합 추론은 디코딩 단계의 추론 토큰(Thinking Tokens)을 통해 온전히 복원함으로써, 전사적 글로벌 캐시 재사용률 100%와 고난도 추론 정확도를 모두 달성할 수 있습니다.

  • arXivSource 4, You Need an Encoder for Native Position-Independent CachingThe Key-Value (KV) cache of Large Language Models (LLMs) is prefix-based, making it highly inefficient for processing contexts retrieved in arbitrary order. Position-Independent Caching (PIC) has been proposed to enable KV reuse without positional constraints; however, existing approaches often incur substantial accuracy degradation, limiting their practical adoption. To address this issue, we propose native PIC by reintroducing the encoder to prevalent decoder-only LLMs and explicitly training it to support PIC. We further develop Comb , a PIC-aware caching system that integrates seamlessly with existing inference frameworks. Experimental results show that Comb reduces Time-to-First-Token (TTFT) by 51-94% and increases throughput by 3 $\times$ with comparable accuracy. Furthermore, the quality improvement when using DeepSeek-V2-Lite-Chat demonstrates the applicability of Comb to other types of decoder-only LLMs. Our code is available at
  • arXivSource 1, Epic : Efficient Position-Independent Context Caching for Serving Large Language ModelsLarge Language Models (LLMs) are critical for a wide range of applications, but serving them efficiently becomes increasingly challenging as inputs become more complex. Context caching improves serving performance by exploiting inter-request dependency and reusing key-value (KV) cache across requests, thus improving time-to-first-token (TTFT). However, existing prefix-based context caching requires exact token-prefix matches, limiting cache reuse in few-shot learning, multi-document QA, or retrieval-augmented generation, where prefixes may vary while some content, such as files, remains unchanged. To address this issue, in this paper, we present Epic , an LLM serving system that introduces position-independent context caching (PIC), enabling modular KV cache reuse regardless of prefix and token chunk position. Epic incorporates a LegoLink algorithm, which leverages static attention sparsity, eliminating the influence of the attention sink phenomenon in each chunk, to minimize recomputation for accuracy recovery when using PIC. Our experiments demonstrate that Epic delivers up to $8\times$ improvements in TTFT and $7\times$ throughput over existing systems, with negligible or no accuracy loss.
  • arXivSource 2, KVLink : Accelerating Large Language Models via Efficient KV Cache ReuseWe describe KVLink , an approach for efficient key-value (KV) cache reuse in large language models (LLMs). In many LLM applications, different inputs can share overlapping context, such as the same retrieved document appearing in multiple queries. However, the LLMs still need to encode the entire context for each query, leading to redundant computation. In this paper, we propose a new strategy to eliminate such inefficiency, where the KV cache of each document is precomputed independently. During inference, the KV caches of retrieved documents are concatenated, allowing the model to reuse cached representations instead of recomputing them. To mitigate the performance degradation of LLMs when using KV caches computed independently for each document, KVLink introduces three key components: adjusting positional embeddings of the KV cache at inference to match the global position after concatenation, using trainable special tokens to restore self-attention across independently encoded documents, and applying mixed-data fine-tuning to enhance performance while preserving the model’s original capabilities. Experiments across 7 datasets demonstrate that KVLink improves question answering accuracy by an average of 4% over state-of-the-art methods. Furthermore, by leveraging precomputed KV caches, our approach reduces time-to-first-token by up to 90% compared to standard LLM inference, making it a scalable and efficient solution for context reuse. Code is available at .