Stanford's Memorilla Cuts AI Response Times From 19 Seconds to 3
Memorilla compresses 128,000 tokens into 16 memory tokens, cutting response times from 19 seconds to 3 — but answers only one of eight plot questions correctly.
- AuthorSophie Lindqvist
- ChannelAI & Emerging Interfaces
- Filed
- Read3 min

- Memorilla compressed 128,000 tokens into 16 memory tokens, cutting response time from over 19 seconds to about 3 seconds
- The ~200-million-parameter module kept answering time at 0.12 seconds across 512 documents
- It answered only one of eight plot questions on 'The Hound of the Baskervilles' correctly
- Memorilla scored highest on average across benchmarks against MEMS Zero and MemoRAG
- Better Stack deems it not production-ready and recommends RAG for reliable outputs
Stanford's Memorilla compressed 128,000 tokens of Sherlock Holmes text into 16 memory tokens and cut response times from over 19 seconds to roughly 3 seconds — a six-fold speed gain over full-context processing that arrives with a serious catch: the system answered only one of eight plot questions about "The Hound of the Baskervilles" correctly and invented details from a different story.
Memorilla is a compact memory module of approximately 200 million parameters. It gathers information from an entire document collection into a fixed number of query-dependent memory tokens, which it then passes to a frozen language model, Qwen 3. The design targets a persistent problem in AI systems: processing time grows with context length, and long conversations or large corpora become slow and expensive.
Better Stack, which tested the project, reports that Memorilla remains a research checkpoint rather than a production tool. Its accuracy failures are as concrete as its speed gains.
How does the compression work?
Memorilla operates in a two-stage pipeline:
- An embedding model first converts documents into vectors.
- The memory module then scores each vector's relevance to a query and refines the selection, distilling the result into 16 tokens.
- The unmodified Qwen 3 model generates responses from those tokens.
Memory size stays fixed regardless of dataset length. Whether the input spans one chat or hundreds of documents, the language model sees only 16 tokens. During training, only the memory module is updated; the embedding model and Qwen 3 remain unchanged. This separation lets the system improve compression without touching the underlying model.
What do the speed numbers show?
Answering time held steady at around 0.12 seconds for up to 512 documents, and stayed flat even at 128,000 tokens of input. Vector conversion adds overhead: including that step, Memorilla processed 512 documents in about 3.2 seconds, roughly six times faster than the full-context method. The research paper suggested a 27-fold improvement; the measured result falls well short of that figure but remains substantial.
Where does it fail?
Small-scale custom tests exposed the limitations. In a "buried clue" test, Memorilla failed to retrieve a user's sister's name and birthday and fabricated a non-existent allergy. None of the four methods tested found a single buried clue; RAG answered the easy control question correctly, while the full-context method largely ignored the chats and stated it lacked access to personal information.
Detail retention degrades as datasets grow. Given a single chat about a user's sister, Memorilla correctly named her Priya but gave the wrong birthday. When more chats were added, it reverted to an incorrect name, Emily. In the project's own readme example, it inferred a family history of type 2 diabetes from a single chat about diabetes risk — a link that may have been coincidental.
How was it trained and benchmarked?
Training ran in three stages: reconstructing Wikipedia passages, training on question-answering and summarization datasets, then running benchmarks. Memorilla reportedly achieved the highest average score across benchmarks among memory systems including MEMS Zero and MemoRAG, and on one fact-checking benchmark it was said to outperform feeding a model every single document. The tester reproduced the results almost word for word on rented GPUs, which supports the reported figures.
Is it usable today?
Better Stack advises that Memorilla is not yet suitable for production use, given its forgetting and hallucination problems and its inability to handle datasets outside its training scope. The GitHub repository includes tools for retraining the memory module on user-specific data, a capability the tester did not evaluate but which offers a path to customization. For reliable outputs today, Better Stack recommends established retrieval-augmented generation methods. If retraining proves effective on domain data, Memorilla could turn its fixed 16-token footprint into a practical advantage.
Source: geeky-gadgets.com
More from Sophie Lindqvist
Show full bio
Staff writer covering people, launches and day-to-day practice in Product and interaction design, design systems at Interface Wire.
182 articles