ChengRang

LEANN

Vector DB & Data Open Source

Open-source vector index from UC Berkeley's Sky Computing Lab and best paper at MLSys 2026, storing only a pruned graph and recomputing embeddings at query time so a 60 million chunk Wikipedia index falls from 201GB to 6GB, MIT licensed

UC Berkeleyvector indexRAGon-deviceMIT
Visit LEANN

Disclaimer: Review content represents our editorial team's views and experience, not commercial recommendation or investment advice. Product info and pricing may change; refer to official sources.

Overview

LEANN is an open-source vector index from UC Berkeley's Sky Computing Lab, published as arXiv 2506.08276 and awarded best paper at MLSys 2026. The code is MIT licensed and the GitHub repository has passed thirteen thousand stars. The problem it targets is concrete: RAG over millions of documents usually means computing every embedding up front and storing them, which pushes indices into the hundreds of gigabytes and off most personal devices.

The approach removes the stored embeddings. The index keeps only a pruned nearest-neighbour graph, and during a query it walks that graph and recomputes embeddings for the nodes it actually visits. Graph construction applies high-degree preserving pruning, keeping hub nodes and dropping redundant edges so traversal paths do not degrade, which is how it saves 97 percent of storage without losing recall.

The published comparison covers five corpora. The 2.1 million document DPR set drops from 3.8GB to 324MB, the 60 million chunk Wikipedia index from 201GB to 6GB, 400,000 chats from 1.8GB to 64MB, 780,000 emails from 2.4GB to 79MB, and 38,000 browser records from 130MB to 6.4MB. Savings land between 91 and 97 percent, which is what makes a full index viable on a laptop.

Key Features

Use Cases

Pros

Pricing

MIT licensed and free, with self-hosting carrying only hardware and compute cost. There is no hosted tier to price; the library installs from pip and ships evaluation scripts, and the tradeoff is that recomputation spends GPU or CPU time at query time, so machines with heavy query volume need headroom. Managed services built on it bill according to their own platforms.

Summary

LEANN makes one plain trade: swap stored vectors for query-time computation. That works when compute is cheaper than storage and query volume is not high enough to make recomputation the bottleneck, both of which hold for personal devices and internal knowledge bases. The MLSys best paper award and published scripts make it more reproducible than most index projects. For full-corpus RAG on a laptop without buying more disk, it is the most direct option available now.

Version History

Category
Vector DB & Data
Pricing
Open Source
Tags
UC Berkeley · vector index · RAG
Website

Related Tools