hn.today

Memorilla: Latent Semantic Memory for LLMs

github.com6 points1 comments
Screenshot of Memorilla: Latent Semantic Memory for LLMs

Memorilla is a memory system for frozen large language models: it condenses a collection of documents - such as chat histories, books, or game experiences - into 16 query-dependent memory tokens, then gives those tokens to the model alongside a question. The fixed memory budget is intended to make long-term information usable without filling the model’s context window. In a personalization example, it retrieves a family-health detail from one of 107 past conversations to shape an answer to an unrelated breakfast question. The repository provides code, pretrained checkpoints, training and evaluation recipes, and instructions for using custom question-and-answer datasets.

Reported results indicate that this compression can preserve useful information while reducing prompt size and inference costs. On FactKG, Memorilla reaches 84.33% accuracy, compared with 80.43% when the model receives every document, while using 108 times fewer tokens. It compresses NarrativeQA books and scripts by more than 4,000 times; with up to 512 documents, response time stays at 0.74 seconds, whereas full-context prompting rises to 19.9 seconds. The system also improves average success on TextWorld games from 18.6% to 24.2% when agents learn from their histories using reward-based training. Running the supplied training recipes requires substantial hardware: the three main stages take about 19 hours on four H100 GPUs, and installation targets Linux, CUDA, and Python 3.11.

Read on github.com1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

Now Anthropic is blocking Russian users

Now Anthropic is blocking Russian users

Anthropic is accused of charging Russian Claude users before identity checks, then cutting off access after verification and retaining biometric data. Critics say account bans can affect linked GitHub projects and Russian citizens living abroad, and accuse the company of failing to answer public questions. (twitter.com)

The End of AI Frontiers

The End of AI Frontiers

Microsoft Research’s AI Frontiers group brought together about 50 researchers to develop agent systems and foundational AI advances. After the team joined Microsoft AI in September, its research-first approach clashed with leadership’s emphasis on scaling. (hunch.net)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.