KIV: 1M token context window on a RTX 4070 (12GB VRAM), no retraining, drop-in HuggingFace cache replacement - Works with any model that uses DynamicCache [P]

Reddit - Machine Learning 1 min read

About this article

Been working on this for a bit and figured it was ready to share. KIV (K-Indexed V Materialization) is a middleware layer that replaces the standard KV cache in HuggingFace transformers with a tiered retrieval system. The short version: it keeps recent tokens exact in VRAM, moves old K/V to system RAM, and uses K vectors as a search index to pull back only the ~256 most relevant V entries per decode step. Results on a 4070 12GB with Gemma 4 E2B (4-bit): 1M tokens, 12MB KIV VRAM overhead, ~6.5...

You've been blocked by network security.To continue, log in to your Reddit account or use your developer tokenIf you think you've been blocked by mistake, file a ticket below and we'll look into it.Log in File a ticket

Originally published on April 12, 2026. Curated by AI News.

Related Articles

Llms

Frameworks For Supporting LLM/Agentic Benchmarking [P]

I think the way we are approaching benchmarking is a bit problematic. From reading about how frontier labs benchmark their models, they e...

Reddit - Machine Learning · 1 min ·
Llms

Framesworks For Supporting Benchmarking [P]

I think the way we are approaching benchmarking is a bit problematic. From reading about how frontier labs benchmark their models, they e...

Reddit - Machine Learning · 1 min ·
Machine Learning

AI/ML Algorithm Simulation & Visualization Tool [Project]

Hello everyone! I built an AI/ML algorithm simulation and visualization app. You can run each algorithm step-by-step, edit parameters, an...

Reddit - Machine Learning · 1 min ·
Machine Learning

So Confused about Polarizing ICML Reviews [D]

Hi, rebuttals recently finished, and I wanted to share my paper's scores to ask for thoughts on this, and whether this situation is borde...

Reddit - Machine Learning · 1 min ·
More in Machine Learning: This Week Guide Trending

No comments

No comments yet. Be the first to comment!

Stay updated with AI News

Get the latest news, tools, and insights delivered to your inbox.

Daily or weekly digest • Unsubscribe anytime