← All news·2026-06-18·6 min read

A Battle for Smaller Long-Context Memories in AI

An AI model’s KV cache can balloon to over 300GB at 1M tokens — larger than its weight size! TurboQuant, OSCAR & EpiCache help reduce this to enable long context.

researchlong-contextinferenceefficiency

Researchers from three groups have recently released techniques for compressing the KV cache — an increasingly important but hidden part of AI infrastructure that’s becoming critical for enabling long context AI. In a June 18th, 2026 article on MarkTechPost, we compare TurboQuant (Google + NYU), OSCAR (Together AI), and EpiCache (Apple) and see how they can help bring down the cost of long context AI: At full precision, the KV cache takes up ~0.31 MB/token for Llama-3.1-70B, which is ~40GB for 128,000 tokens and over 300GB for 1M tokens, which is more than the model’s 140GB of weights!

The KV (key-value) cache is used to store all of the attention vectors of previous tokens across all layers so that they don’t need to be recalculated when processing new tokens. As a result, the size of your KV cache scales linearly with the length of your document / conversation and the batch size. For longer documents / conversations, generating tokens becomes more expensive because of the need to repeatedly load and unload this large KV cache from memory. By reducing the size of the KV cache, we can speed up and scale long context while also enabling it on devices with less memory.

Three different attacks on the same bottleneck

TurboQuant (upcoming at ICLR 2026) is a general-purpose technique that does not require any calibration data and can be applied to any existing model without modification. It randomizes the KV cache to make the data look like clean Gaussian noise and then aggressively quantizes the data. This achieves close to full precision performance with 4x compression, is essentially lossless when quantized to 3.5 bits per channel, and only has minor quality loss when quantized to 2.5 bits. Theoretically, it should achieve within 2.7x of the optimal information-theoretically performance.

OSCAR is a technique that you can use today. It is attention-aware, meaning that it randomizes the KV cache in a way that aligns with the attention mechanisms of the model, and comes with actual implementations such as integrations with the SGLang serving framework, a mixed-precision KV cache that stores recent tokens in full precision while compressing older history, and precomputed configurations for models such as Qwen3 and GLM-4.7. With ~2.28 effective bits, it achieves within 1.42 points of full precision on Qwen3-8B and is virtually identical on larger models, while providing up to 8x memory savings and up to ~3x speedup during decoding at 100,000 token context.

EpiCache (from Apple) is designed for long dialogues. Rather than squashing all of the data, it partitions the dialogue history into “episodes” and compresses the KV cache separately for each episode. When answering a question, it selects only the relevant episodes to load from history. It shows up to 40% accuracy improvement compared to naive methods of dropping old tokens, achieves almost full accuracy when compressed by 4–6x, reduces peak memory usage by up to 3.5x, and lowers latency by ~2.4x.

Why this matters to you

None of these parameters matter to you, and that’s the beauty of them — they’re hidden under the hood to power your favorite features. They are a major reason why you can use models with 1M token contexts, copy+paste entire books and codebases, and pay less every day. If you want to run an open model on your own machine, cache compression will determine whether or not you can fit long documents on a consumer GPU. These techniques are complementary rather than competitive — TurboQuant excels at generality, OSCAR at immediate

What I'd actually do

If you run local models, this is the most practical takeaway: when your tool offers KV-cache quantization (often labelled 2-bit, 4-bit or "INT2/INT4 cache"), it's usually safe to turn on at 4-bit — you'll fit far longer context on the same GPU with little quality loss. For everyone else, just read it as a signal: long context and big-document workflows are getting cheaper, so it's worth designing your habits around them rather than rationing tokens.

Source: www.marktechpost.com

Free course

Stop reading about AI — start building with it

The free Claude Code course: your first site, tool or game — no coding. No upsells, no cross-sells — nothing to buy here.

Start free →
EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Founder & CEO, Dad4Kids