atlas

Research map / Architectures and efficiency / Attention and transformers

LoCoCo: Dropping In Convolutions for Long Context Compression

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LoCoCo, a drop-in convolutional KV-cache compressor that fuses incoming tokens into a fixed-size KV cache via learned 1D-convolution mixing weights, for long-context inference and fine-tuning.

Problem

LLM KV caches grow linearly with context length, exhausting GPU memory during long-context inference and fine-tuning; prior eviction heuristics drop tokens and lose context information.

Approach

Replace KV eviction with a learnable, data-driven weighted fusion of cached KV entries and incoming tokens, where the mixing weights are produced by a shallow 1D convolution (kernel size 21) over the KV cache and new segment, keeping the cache at a fixed size while leaving pretrained weights unchanged.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
replace token eviction with convolutional token mergingLlama-2 with LoCoCo · SCROLLS, including QuALITY, Qasper, GovReport, QMSum, NarrativeQA, and SummScreenscore: QuALITY: 0.3461 -> 0.3528; Qasper: 0.2659 -> 0.2813; GovReport: 0.2924 -> 0.3113; QMSum: 0.1913 -> 0.2089; NarrativeQA: Helped
extend context to 32K using LoCoCoLlama2-13B · LongBenchscore: 36.9% -> 37.4% (H₂O); 34.7% -> 37.4% (LongLoRA)Helped
use LoCoCo instead of H₂OLlama2-7B · Inference prefill, 16k tokensthroughput (Token/s): 32 -> 33Helped
use LoCoCo instead of LongLoRALlama2-7B · Training, extending context to 16kmemory usage: 49GB -> 50GBHurt
use LoCoCo instead of H₂OLlama-2-7B · Proof-Pile-2, evaluation context 8192perplexity: 3.5714 -> 3.5414Helped
add StreamingLLM attention-sink tokens (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.5451 -> 3.5439No clear effect
add H₂O heavy-hitter eviction (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.5451 -> 3.5414Helped
use kernel size 3 instead of 21 (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.53 -> 3.68Hurt
use kernel size 7 instead of 21 (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.53 -> 3.57Hurt
use kernel size 17 instead of 21 (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.53 -> 3.53No clear effect
use kernel size 31 instead of 21 (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.53 -> 3.54No clear effect
use kernel size 41 instead of 21 (ablation)LoCoCo · Proof-Pile-2, evaluation context 8192perplexity: 3.53 -> 3.53No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: RedPajama Proof-Pile-2 RACE TriviaQA HellaSwag WinoGrande ARC SCROLLS LongBench

Benchmarks: RACE TriviaQA HellaSwag WinoGrande ARC SCROLLS Proof-Pile-2 LongBench

Metrics: accuracy perplexity throughput peak GPU memory

Baselines: H2O StreamingLLM LongLoRA full sequence fine-tuning

Builds on: Transformer-XL H2O StreamingLLM LongLoRA positional interpolation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy