ChatPaper.aiChatPaper

FlashMemory-DeepSeek-V4: Lightning Index voor ultralange context via vooruitkijkende spaarse aandacht

FlashMemory-DeepSeek-V4: Lightning Index Ultra-Long Context via Lookahead Sparse Attention

June 8, 2026
Auteurs: Yan Wang, Qifan Zhang, Jiachen Yu, Tian Liang, Dongyang Ma, Xiang Hu, Zibo Lin, Chunyang Li, Zhichao Wang, Jia Li, Yujiu Yang, Haitao Mi, Dong Yu
cs.AI

Samenvatting

Conventionele LLM's houden tijdens het decoderen de volledige KV-cache geladen, wat een ernstig GPU-geheugenknelpunt veroorzaakt bij het verwerken van extreem lange contexten. In dit rapport stellen we Lookahead Sparse Attention (LSA) voor, een nieuw inferentieparadigma aangedreven door een neurale geheugenindexeerder gebouwd op de DeepSeek-V4-architectuur. In plaats van passief aandacht te besteden aan alle historische tokens, voorspelt LSA proactief toekomstige contextbehoeften en bewaart alleen de query-kritische KV-chunks in het GPU-geheugen. Cruciaal is dat we deze architectuur implementeren via een backbone-vrije ontkoppelde trainingsstrategie. Door de indexeerder te formuleren als een standaard dual-encoderarchitectuur, trainen we deze onafhankelijk met standaard retrieval-trainingskaders, zonder ooit het massieve backbonemodel in het GPU-geheugen te laden. We tonen aan dat dit "minder is meer"-paradigma de serveerefficiëntie aanzienlijk maximaliseert, terwijl het fungeert als een effectieve aandachtsdenoiser in taken die afhankelijk zijn van langetermijn-globaal geheugen. In primaire lange-context-evaluatiesuites (bijv. LongBench-v2, LongMemEval en RULER) comprimeert FM-DS-V4 de gemiddelde fysieke KV-cache-voetafdruk tot slechts 13,5% van de volledige-context-baseline, terwijl het consistent de downstream-nauwkeurigheid behoudt of licht verhoogt (gemiddeld +0,6% absolute marge). Cruciaal is dat FlashMemory bij extreme 500K-schalen de fysieke KV-cache-overhead met meer dan 90% onderdrukt zonder de kernredeneervermogens van de backbone te destabiliseren.
English
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.