AIAny
AI Train2026
Icon for item

Memorilla: Latent Semantic Memory for LLMs

Compresses an entire document collection into 16 query-dependent memory tokens for a frozen LLM. It retrieves useful clues across long histories while keeping the model’s input length fixed.

Introduction

More context is not always better: feeding an LLM an entire history can be slow, and ordinary retrieval may miss useful clues that do not resemble the current question. The key idea here is to let a learned memory module read the whole collection and distill what matters for each query into a small, fixed-size representation.

What Sets It Apart
  • Collection-wide recall: Rather than selecting a few passages in advance, the memory module uses embeddings of the full document collection, which can surface indirectly related facts.
  • A fixed input budget: In the reported experiments, the LLM receives 16 memory tokens regardless of collection size. On FactKG, the method reports 84.33% accuracy versus 80.43% with full-context inference, using 108× fewer document tokens.
  • Reusable document representations: Each document is encoded once; new documents can be added without re-encoding the existing collection. The project also explores memory for agents that accumulate interaction histories, reporting a TextWorld success-rate increase from 18.6% to 24.2%.
Who It’s For

Great fit if you are researching persistent memory for frozen LLMs, personalization across long chat histories, or compact context for agents. Look elsewhere if you need exact recall of every name or detail: a fixed token budget can discard fine-grained facts. The published recipes also assume substantial GPU resources and trained, task-oriented memory modules, so this is not a drop-in memory layer for every model or dataset.

Where It Fits

Compared with conventional RAG, which retrieves a limited set of passages, this approach learns to summarize query-relevant information from the whole collection into latent tokens. Compared with full-context prompting, it trades some detail fidelity for a bounded input size and faster serving as collections grow.

Information

  • Websitegithub.com
  • OrganizationsStanford University, University of Toronto, Vector Institute, University of Pennsylvania, Massachusetts Institute of Technology
  • AuthorsAdibvafa Fallahpour, Parsa Idehpour, Vignesh Kothapalli, Nikita Mounier, Shirley Wu, Shayan Pardis, Jure Leskovec
  • Published date2026/06/23

More Items

GitHub
AI Infra2025

Provides isolated execution environments for AI applications, where agents can run code, manage files, and operate browsers or desktops. Deploy locally with Docker or scale on Kubernetes, with configurable network and credential controls.

Hugging Face

Collects multi-step tool-use sessions from Codex Desktop, including 437 trajectories and 314 subagent delegation examples. The work is concentrated on Windows-based C#/C++ development and video-codec reverse engineering.

Hugging Face
AI Video2026

Remakes existing footage from text instructions, changing characters, props, or scenes while preserving the original motion, camera, cuts, and sound. Use it in the Viggle app or run it on your own GPUs.