Memorilla compresses a document collection into 16 memory tokens and beats full context on FactKG — 84.33% vs 80.43%
Stanford open-sourced Memorilla, a latent memory module for frozen LLMs, from Adibvafa Fallahpour, Parsa Idehpour, Vignesh Kothapalli, Nikita Mounier, Shirley Wu, Shayan Pardis, and Jure Leskovec, with collaborators at Toronto, Penn, and MIT. The model's weights never change; only the memory module is trained. Documents are encoded once into reusable embeddings, and a learned module retrieves query-specific information and writes it as a fixed set of memory tokens directly into the LLM's input embedding space. The released configuration uses 16 memory tokens, a Qwen3-8B decoder, and a Qwen3-Embedding-4B encoder. It beats baselines including Mem0 and MemoRAG on 5 of 8 benchmarks spanning personalization, long-document QA, and knowledge-intensive QA. On FactKG it reaches 84.33% against 80.43% for full-context inference while using 108× fewer tokens to represent the source documents, and reports more than 4,000× compression on NarrativeQA. In the TextWorld agent environment it lifts success from 18.6% to 24.2%. Code is Apache 2.0 at snap-stanford/memorilla, with stage-wise checkpoints and task-specific variants on Hugging Face under memorilla/Memorilla-Qwen3-8B.
Why it matters
Beating full context is the result that should make you re-read the paper, because it means the long-context baseline is not an upper bound — stuffing 100K tokens of retrieved documents into a window actively hurts, and a learned 16-token summary of the right facts does better. That reframes "agent memory" from a retrieval-plumbing problem into a learned-compression problem. The frozen-decoder design is what makes it deployable: you are training a small adapter against a model you do not own, which is a very different budget from fine-tuning. Caveats are real though — 16 tokens is query-dependent, so the module has to see the query, and the released checkpoints are built on an 8B decoder.
What to do
If your RAG pipeline is pushing large chunk sets into a long window, treat full-context as a baseline to beat rather than the target, and measure accuracy against token count instead of assuming more retrieved text is better. Memorilla is worth benchmarking directly on your own corpus since the code and checkpoints are Apache 2.0 and the decoder stays frozen — the comparison to run is against your current retriever plus Mem0-style memory, on your queries, not theirs. The TextWorld number is the one to watch for agent work: memory that survives a multi-turn episode is exactly where the ToolTurns-style conversation decay comes from.
More from November 16, 2026
- Antigravity's /teamwork wrote 1.8 million lines of Lean across 28,800 subagent calls — and the architecture is generator-plus-independent-verifier
- LangChain raises $300M at $3B on the unglamorous half of agents: running, measuring, and governing them
- Cloudflare open-sources Kitesurf: a browser for agents with no Chrome in it, Apache 2.0
- NVIDIA ships 2.65B driving weights that explain themselves — and skip the reasoning trace when the road is boring
- AI agents wrote 6 million lines of Lean proving Signal's compiled crypto — humans reviewed 1% of it
- MetaPI turns any agent benchmark into a prompt-injection benchmark — and no defense tested held both utility and security
- AT&T runs 500 agentic workflows on 45 billion tokens a day — and nothing goes autonomous below mid-90s accuracy
- AI pentest traffic is up 30× since October 1, ARTEX forks are 60% of it, and the entry point was an unrestricted API token
- The EU's AI sandbox rulebook applies December 1 — and explicitly gives you no approval and no liability relief
Related
- Scroll treats context as a live Python kernel, not a prompt: LOCA_256K jumps 37.4 points August 26, 2026
- Runway gives away Praxis-1: a 27B video-prediction model that learned to act, Apache 2.0, top of RoboLab-120 November 15, 2026
- NVIDIA, AMD, and Intel sit on the same board: the SGLang Consortium forms with maintainers keeping the merge button November 15, 2026