frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

EM-LLM: Human-Inspired Episodic Memory for Infinite Context LLMs

https://github.com/em-llm/EM-LLM-model
113•jbotz•1y ago

Comments

MacsHeadroom•1y ago
So, infinite context length by making it compute bound instead of memory bound. Curious how much longer this takes to run and when it makes sense to use vs RAG.
zfountas•12mo ago
Hi MacsHeadroom, first author here. Thanks for the great questions about compute/memory trade-offs.

The quick take: To give you an example of processing speed, with a 7B model on an NVIDIA V100, EM-LLM processes (or generates) about 326 tokens/sec with a 51.2K context window (which is quite competitive for these old GPUs).

More broadly, EM-LLM is designed to make ultra-long contexts (memory-prohibitive for standard O(n^2) attention) computationally tractable. The Appendix C of our paper https://openreview.net/pdf?id=BI2int5SAC details how: significantly better attention scaling, efficient O(nm) memory formation, and large KV cache management via CPU/disk offloading. While there's a slight per-chunk overhead compared to the simplest retrieval methods initially, the crucial part is our ability to handle sequences at scales infeasible for full-context models. For instance, we're successfully using 8B models with 10M token contexts on a single GPU without prohibitive delays.

Regarding RAG in particular, EM-LLM often shows significant gains on tasks needing deep understanding of a single, long, coherent context. A key reason is that EM-LLM allows each layer to retrieve and integrate relevant information from different "episodes" of the context independently, offering more nuance than a typical single RAG step, for similar overall resource use.

mountainriver•1y ago
TTT, cannon layers, and titans seem like a stronger approach IMO.

Information needs to be compressed into latent space or it becomes computationally intractable

searchguy•1y ago
do you have references to

> TTT, cannon layers, and titans

najarvg•1y ago
This was the nearest reference I could find. Links to an unofficial pytorch implementation on Github are also linked in the threads somewhere - https://www.reddit.com/r/LocalLLaMA/comments/1i0q8nw/titans_...
vessenes•1y ago
is titans replicated? I feel like lucidrains couldn't replicate.
logicchains•1y ago
I think something like Titans explains Gemini's excellent long context performance. That would explain why the Titan team hasn't released the training code or hyperpameters used even though they said in the paper that they would, and why soon after that it came out that DeepMind would be holding off publishing new results for 6 months to avoid giving away competitive advantages.
p_v_doom•1y ago
Interesting. Before there even was attention I was thinking that the episodic memory model offers something that could be very useful for neural nets, so its cool to see people testing that
killerstorm•1y ago
Note that this works within a single sequence of tokens. It might be consistent with "episodic memory" metaphor if we consider a particular transformer run as its experience.

But this might be very different from what people expect from "memory" - i.e. ability to learn vast amounts of information and retrieve it as necessary.

This is more like a refinement of transformer attention: instead of running attention over all tokens (which is very expensive as it's quadratic), it selects a subset of token spans and runs fine-grained attention only on those. So it essentially breaks transformer attention into two parts - coarse-grained (k-NN over token spans) and fine-grained (normal).

It might be a great thing for long-context situations. But it doesn't make sense when you want millions of different facts to be considered - making them into long context is rather inefficient.

yorwba•1y ago
It would be inefficient if you had to do it from scratch for every query, but if you can do it once as a preprocessing step and reuse the prepared context for many queries, it might start to become more efficient than a shorter context that includes only some documents but has to be reprocessed because it's different every time.
killerstorm•1y ago
Yes, I think it might be a good solution where you have a context up to 10M of tokens and you do a lot of requests with that context. It might be relevant for agentic stuff which tends to produce long chat logs - especially with some gadgets on top, e.g. some 'episodes' might be completely removed as obsolete.

But I don't think it's a good solution for bigger amounts of data - as in that case it's more beneficial if that can be formed into independent memories.

The last six months in LLMs in five minutes

https://simonwillison.net/2026/May/19/5-minute-llms/
383•yakkomajuri•7h ago•241 comments

Turn your Android phone into a ham radio transceiver

https://www.kv4p.com/
81•krupan•2d ago•27 comments

My domain got abused on GitHub Pages

https://meertens.dev/blog/github-enables-domain-abuse/
25•rmeertens•1h ago•4 comments

Click (2016)

https://clickclickclick.click/
293•andrewzeno•9h ago•70 comments

Peter Neumann has died

https://www.tuhs.org/pipermail/tuhs/2026-May/033748.html
82•pabs3•5h ago•4 comments

Polypad

https://polypad.amplify.com/
39•ivank•2d ago•4 comments

Mini Shai-Hulud Strikes Again: 314 npm Packages Compromised

https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/
50•theanonymousone•3h ago•10 comments

Anthropic acquires Stainless

https://www.anthropic.com/news/anthropic-acquires-stainless
444•tomeraberbach•15h ago•297 comments

Cursor Introduces Composer 2.5

https://cursor.com/blog/composer-2-5
137•asar•15h ago•89 comments

The lasting influence of Netscape Time

https://thehistoryoftheweb.com/the-lasting-influence-of-netscape-time/
15•zdw•2d ago•5 comments

PyTorch Landscape

https://pytorch.landscape2.io
32•salamo•4h ago•5 comments

Pope Leo XIV’s first encyclical Magnifica humanitas to be published May 25

https://www.vaticannews.va/en/pope/news/2026-05/pope-leo-xiv-first-encyclical-magnifica-humanitas...
214•cucho•9h ago•120 comments

Regex Chess: A 2-ply minimax chess engine in 84,688 regular expressions

https://nicholas.carlini.com/writing/2025/regex-chess.html
114•surprisetalk•4d ago•23 comments

1024000^2 Blocks, 2B2T Minecraft Server World Download Project, and Discoveries

https://github.com/2b2tplace/1m_release
139•exploraz•18h ago•83 comments

Hyperpolyglot Lisp: Common Lisp, Racket, Clojure, Emacs Lisp

https://hyperpolyglot.org/lisp
157•veqq•13h ago•35 comments

Make ZIP files smaller with ZIP Shrinker

https://evanhahn.com/make-zip-files-smaller-with-zip-shrinker/
18•zdw•2d ago•6 comments

Show HN: Hsrs – Type-Safe Haskell Bindings Generator for Rust

https://github.com/harmont-dev/hsrs
25•suis_siva•4h ago•2 comments

We let AIs run radio stations

https://andonlabs.com/blog/andon-fm
248•lukaspetersson•14h ago•200 comments

Show HN: Number Gacha, a gacha game distilled to its essence

https://isabisabel.com/gacha/
146•babel16•5d ago•59 comments

When can the C++ compiler devirtualize a call?

https://quuxplusone.github.io/blog/2021/02/15/devirtualization/
57•lionkor•1d ago•31 comments

Anyone on the Internet Can Ring Your Doorbell

https://www.abgeo.dev/blog/anyone-can-ring-your-doorbell
97•jrdres•2d ago•61 comments

Peter Salus has died

https://www.tuhs.org/pipermail/tuhs/2026-May/033750.html
125•speckx•5h ago•10 comments

Codex-maxxing

https://jxnl.co/writing/2026/05/10/codex-maxxing/
73•dnw•4h ago•52 comments

LLMCap – A proxy that hard-stops LLM API calls when you hit a dollar cap

https://www.llmcap.io/
12•cfaruk•4h ago•9 comments

Consider the Sister

https://www.thesmallbow.com/p/consider-the-sister-2b94
3•NaOH•1d ago•0 comments

AI eats the world (Spring 26) [pdf]

https://static1.squarespace.com/static/50363cf324ac8e905e7df861/t/6a0af5d0484fbf5fe9a7743e/177910...
217•topherjaynes•20h ago•117 comments

Elon Musk has lost his lawsuit against Sam Altman and OpenAI

https://techcrunch.com/2026/05/18/elon-musk-has-lost-his-lawsuit-against-sam-altman-and-openai/
939•nycdatasci•15h ago•465 comments

Two computers, one monitor, zero fiddling (2025)

https://alexplescan.com/posts/2025/08/16/kvm/
210•ankitg12•3d ago•127 comments

Alignment pretraining: AI discourse creates self-fulfilling (mis)alignment

https://arxiv.org/abs/2601.10160
53•anigbrowl•11h ago•21 comments

Why is it called Kent House?

https://diamondgeezer.blogspot.com/2026/05/kent-house.html
26•susam•2d ago•6 comments