RulinShao/retrieval-scaling

Official repository for "Scaling Retrieval-Based Langauge Models with a Trillion-Token Datastore".

45
/ 100
Emerging

Implements an efficient pipeline for building and serving retrieval-augmented language models at massive scale, supporting both dense retrievers (Contriever, SentenceTransformers) and sparse methods (BM25) with optional semantic chunking and memory-efficient passage loading via hashing. Provides distributed datastore construction and retrieval with optimized indexing (IVF-Flat, IVF-PQ) for sub-30ms API latency, plus integrated evaluation across perplexity and downstream tasks via adapted lm-evaluation-harness with published 1.4T-token and 140B-token datastores on Hugging Face.

224 stars.

No Package No Dependents
Maintenance 6 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 13 / 25

How are scores calculated?

Stars

224

Forks

18

Language

Python

License

MIT

Last pushed

Dec 16, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/rag/RulinShao/retrieval-scaling"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.