Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

🦍 Introducing Memorilla: memory as a modality for LLMs Memorilla turns everything a frozen LLM needs to remember into just 16 memory embeddings ⚡ It uses up to 4,212× fewer tokens and is 27× faster than full context inference while more accurate 🎯 Pushes the Pareto frontier over RAG...

51,306 Aufrufe • vor 2 Tagen •via X (Twitter)

51 Kommentare

Profilbild von Adib
Adibvor 2 Tagen

A frozen encoder embeds each document once into a persistent store. Conditioned on the question, 16 memory slots read the store and produce embeddings fed directly into the LLM, like image embeddings. The LLM stays frozen. Only the memory module is trained.

Profilbild von Adib
Adibvor 2 Tagen

We tested it on personalization, long-document and knowledge QA against full context, RAG, agentic memory and compression methods. Memorilla sits on the Pareto frontier of all 8 benchmarks and leads on 5.

Profilbild von Adib
Adibvor 2 Tagen

Memorilla also works as an agent's memory. In TextWorld, every turn becomes a new memory, and RL on the game reward trains only the memory module. Compared to in-context learning alone, the same frozen agent solves 24.2% of games instead of 18.6%.

Profilbild von Adib
Adibvor 2 Tagen

"What are some suitable foods for me to boost my energy during the day?" RAG suggests oats and brown rice. Memorilla remembers the user's iron-deficiency anemia from an old chat, even though that chat has little semantic connection to the question. On PersonaMem-v2 it gets 44.6% vs 30.9% for the next best method.

Profilbild von Adib
Adibvor 2 Tagen

It's also better at connecting facts. On FactKG, RAG-50 drops from 79% to 52% as a claim combines more facts. Memorilla stays between 80% and 89%.

Profilbild von Adib
Adibvor 2 Tagen

Memorilla and RAG get different questions right. Their union covers 94.3% of FactKG, vs 84.3% for Memorilla and 78.4% for RAG-50 alone.

Profilbild von Adib
Adibvor 2 Tagen

Latency stays flat as memory grows. With 512 documents on one H100, Memorilla answers in 0.74 s and full context takes 19.9 s.

Profilbild von Adib
Adibvor 2 Tagen

It of course has limitations Memorilla can lose fine-grained information, so RAG still wins "who" and "which" questions on NarrativeQA. The memory module is also tied to the LLM it was trained with, and moving to another LLM or a new domain takes some fine-tuning.

Profilbild von Adib
Adibvor 2 Tagen

Humans have both episodic and semantic memory. If RAG is episodic, Memorilla is semantic. Just like us, LLMs need both. Memorilla isn't perfect, but we see it as a 0→1 change in how LLMs use memory, and we look forward to seeing where the community takes these ideas.

Profilbild von Adib
Adibvor 2 Tagen

Big thank you the entire amazing team! @Radii2323 @kvignesh1420 @ShayanPardis @nikitamounier @ShirleyYXWu @jure @Stanford Website: Paper: Code: HuggingFace:

Profilbild von Ben Geist
Ben Geistvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis nice to see this out !

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you for the great support ben!

Profilbild von faraz
farazvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Very sick, ultra cool, congrats!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Thank you!

Profilbild von Faisal AlZaben • فيصل الزبن
Faisal AlZaben • فيصل الزبنvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Adib you legend

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 🔥

Profilbild von Amir Zeinali
Amir Zeinalivor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis sick!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 🔥

Profilbild von J Vijayavallabh @ NEURIPS 2026
J Vijayavallabh @ NEURIPS 2026vor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Cool! In what ways would you adapt Memorilla for biomedical reasoning? [like a bio-specific encoder]

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Haha that is BioReason territory now

Profilbild von Arya Tschand
Arya Tschandvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis awesome work, congrats!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you!

Profilbild von Laurence Liang
Laurence Liangvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Hype!!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 😀

Profilbild von Fathin Dosunmu
Fathin Dosunmuvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis holf f***

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis indeed

Profilbild von Dhravya Shah
Dhravya Shahvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis This is really cool

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Thank you 😀

Profilbild von John Rood
John Roodvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 16 slots is a clean compression. what happens when two memories contradict and the newer one is the true one? that update path is what breaks agent memory in production, and it's rarely measured.

Profilbild von chelsea 🐟
chelsea 🐟vor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis this is so cool!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 😀

Profilbild von Soumil Bhandari
Soumil Bhandarivor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 16 embeddings for everything is wild compression. What happens with exact recall, like a specific number or ID from 50 turns ago? Feels like soft memory is great for gist but loses precise facts. Do you pair it with retrieval for those?

Profilbild von Zion
Zionvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis This is pretty cool

Profilbild von Zachary Yu
Zachary Yuvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis very cool work!

Profilbild von hamza mostafa
hamza mostafavor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis yoo this is amazing, congrats!!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you Hamza!

Profilbild von Mersad
Mersadvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis this is amazing !!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you mersad!

Profilbild von John K
John Kvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Compressing down to 16 soft tokens usually shifts the compute burden to an encoder step. Does updating the memory require reprocessing the whole context from scratch?

Profilbild von sensho
senshovor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis v cool work Adib!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you!

Profilbild von chi
chivor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis super cool work!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis thank you!

Profilbild von NotaDEV * fireply.ai
NotaDEV * fireply.aivor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 27x faster is the number i'd care about most. latency kills more products than accuracy does

Profilbild von Talu Güloglu
Talu Gülogluvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis Saw the website a few days ago, looks great. Nice to see you working also on non-bio stuff!

Profilbild von Adib
Adibvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis side quest!

Profilbild von max
maxvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis RETRO but much more deployment friendly Great work!

Profilbild von AI Lorekeeper
AI Lorekeepervor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 16 memory embeddings replacing a huge context window is a clean reduction - curious if lookup stability holds across different base checkpoints

Profilbild von MonstarX
MonstarXvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis 16 embeddings replacing full context is wild if it holds on long messy inputs. curious how it degrades when the memory has to carry conflicting facts.

Profilbild von avery
averyvor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis

Profilbild von medha
medhavor 2 Tagen

@jure @Stanford @kvignesh1420 @Radii2323 @ShirleyYXWu @nikitamounier @ShayanPardis is this speedup using precomputed document embeddings or the actual online speed up ❓

Ähnliche Videos

New short course: LLMs as Operating Systems: Agent Memory, created with Letta, and taught by its founders Charles Packer and Sarah Wooders. An LLM's input context window has limited space. Using a longer input context also costs more and results in slower processing. So, managing what's stored in this context window is important. In the innovative paper MemGPT: Towards LLMs as Operating Systems, its authors (which include the instructors) proposed using an LLM agent to manage this context window. Their system uses a large persistent memory that stores everything that could be included in the input context, and an agent decides what is actually included. Take the example of building a chatbot that needs to remember what's been said earlier in a conversation (perhaps over many days of interaction with a user). As the conversation's length grows, the memory management agent will move information from the input context to a persistent searchable database; summarize information to keep relevant facts in the input context; and restore relevant conversation elements from further back in time. This allows a chatbot to keep what's currently most relevant in its input context memory to generate the next response. When I read the original MemGPT paper, I thought it was an innovative technique for handling memory for LLMs. The open-source Letta framework, which we'll use in this course, makes MemGPT easy to implement. It adds memory to your LLM agents and gives them transparent long-term memory. In detail, you’ll learn: - How to build an agent that can edit its own limited input context memory, using tools and multi-step reasoning - What is a memory hierarchy (an idea from computer operating systems, which use a cache to speed up memory access), and how these ideas apply to managing the LLM input context (where the input context window is a "cache" storing the most relevant information; and an agent decides what to move in and out of this to/from a larger persistent storage system) - How to implement multi-agent collaboration by letting different agents share blocks of memory This course will give you a sophisticated understanding of memory management for LLMs, which is important for chatbots having long conversations, and for complex agentic workflows. Please sign up here!

Andrew Ng

201,127 Aufrufe • vor 2 Jahren

Qwen3.8-Flash-Next is still going strong at 364.7K tokens of context on an M5 Max. And this isn’t just a static long-context test. The model was reasoning about how to speed up its own workflow while using tools, and the tool calls kept working without misses. Setup: • Qwen3.8-Flash-Next • M5 Max • 128GB unified memory • MLX-Serve PR #363 • OpenCode 2 • 364.7K context The interesting part isn’t simply getting hundreds of thousands of tokens into memory. It’s what happens once the context gets this large. Long-context inference usually comes with a painful tradeoff. As the KV cache grows, memory pressure increases and generation can slow down. But this setup is still pushing through 364K tokens while maintaining a usable agent workflow. The model can reason, call tools, inspect results, continue working, and keep the session moving. And the tool calls reportedly haven’t missed so far. That’s important for agentic coding. A huge context window is only useful if the model can actually operate reliably inside it. A 400K-token context that constantly breaks tool calls isn’t very useful. A 364K session that can keep reasoning and executing tools is a different story. And the test isn’t finished yet. The current run is approaching 400K tokens, with the expectation that it can keep going. This is also another interesting example of why Apple Silicon keeps showing up in local LLM experiments. The M5 Max’s unified memory gives a large model and its growing KV cache access to one shared memory pool. With MLX-Serve continuing to improve, these machines are becoming surprisingly capable long-context inference boxes. The bigger takeaway: Context length is becoming a workload, not just a model specification. Running a model at 256K is one thing. Keeping an agent alive at 300K+ while it reasons and uses tools is much more interesting. And Qwen3.8-Flash-Next is showing that this can be pushed surprisingly far on a single 128GB Mac. 364.7K and counting. Next stop: 400K.

FHILY👑

39,982 Aufrufe • vor 2 Monaten