FlashMemory-DeepSeek-V4: Lookahead Sparse Attention을 활용한 초장문 맥락 처리를 위한 초고속 인덱싱
FlashMemory-DeepSeek-V4: Lightning Index Ultra-Long Context via Lookahead Sparse Attention
기존의 LLM은 디코딩 과정에서 전체 KV 캐시를 메모리에 유지하여, 초장문 맥락 처리 시 심각한 GPU 메모리 병목 현상을 야기합니다. 본 연구에서는 DeepSeek-V4 아키텍처에 기반한 신경망 메모리 인덱서를 활용한 새로운 추론 패러다임인 Lookahead Sparse Attention (LSA)을 제안합니다. LSA는 과거 모든 토큰에 대해 수동적으로 어텐션을 수행하는 대신, 미래의 맥락 요구 사항을 예측하고 GPU 메모리에 중요한 KV 블록만 유지합니다. 핵심적인 부분은 이 아키텍처를 백본 모델 없이 분리된 학습 전략을 통해 구현했다는 것입니다. 인덱서를 표준적인 듀얼 인코더 구조로 정의함으로써, 방대한 백본 모델을 GPU 메모리에 로드하지 않고도 표준 검색 학습 프레임워크를 사용하여 독립적으로 학습할 수 있습니다. 저희는 이 '적은 것이 더 많은 것'이라는 패러다임이 서비스 효율성을 크게 향상시키며, 장기적인 전역 메모리를 필요로 하는 작업에서 효과적인 어텐션 노이즈 제거 기능을 제공한다는 것을 입증했습니다. LongBench-v2, LongMemEval 및 RULER과 같은 주요 초장문 맥락 평가 스위트에서 FM-DS-V4는 평균 물리적 KV 캐시 사용량을 전체 맥락 기준의 13.5% 수준으로 줄이면서, 다운스트림 정확도를 일정하게 유지하거나 약간 향상시키는 (+0.6% 절대 마진) 결과를 보였습니다. 특히, 극단적인 500K 규모에서도 FlashMemory는 물리적 KV 캐시 오버헤드를 90% 이상 감소시키면서 백본 모델의 핵심 추론 능력을 안정적으로 유지합니다.
Conventional LLMs keep the full KV cache loaded during decoding, causing a severe GPU memory bottleneck for ultra-long context serving. In this report, we propose Lookahead Sparse Attention (LSA), a novel inference paradigm powered by a Neural Memory Indexer built upon the DeepSeek-V4 architecture. Rather than passively attending to all historical tokens, LSA proactively predicts future context demands and preserves only the query-critical KV chunks in the GPU memory. Crucially, we instantiate this architecture via a backbone-free decoupled training strategy. By formulating the indexer as a standard dual-encoder architecture, we train it independently using standard retrieval training frameworks without ever loading the massive backbone model into GPU memory. We demonstrate that this "less is more" paradigm significantly maximizes serving efficiency while acting as an effective attention denoiser in tasks that rely on long-term global memory. Across primary long-context evaluation suites (e.g., LongBench-v2, LongMemEval, and RULER), FM-DS-V4 compresses the average physical KV cache footprint down to merely 13.5% of the full-context baseline, while consistently preserving or slightly elevating downstream accuracy (+0.6% absolute margin on average). Crucially, at extreme 500K scales, FlashMemory suppresses the physical KV cache overhead by over 90% without destabilizing the backbone's core reasoning capacities.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.