Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
Chris4K 
posted an update 14 days ago
Post
5,015
🧠 Zero-FLOP Memory

Can a small transformer do more by remembering differently?

39.5M parameters + discrete count tables + document cache.

1.017 BPC on enwik8.

No gradient updates needed to build the memory.

Exploring a different way to scale language modeling: not just more parameters, but better memory.

Paper & code follows ... if someones interested

This is very close to something I’ve been experimenting with in my own local agents.

I think the next step could be surprisingly simple:

Let the model periodically process not only documents, but also its own working history — projects, failed attempts, successful fixes, tool usage, decisions and verified results.

Instead of storing raw chat forever, the model compresses that history into structured, validated experience.

Then during future work, if it gets stuck, it can query this memory almost like a private search engine:

problem → retrieve similar past cases → inspect what worked / failed → reuse or adapt the solution.

So the memory becomes more than “facts”.
It becomes accumulated experience.

We are currently doing something similar with a local agent called Arthur:
working memory → evidence → verified solutions → long-term searchable memory.

The important part for me is that memory should contain not only the final answer, but also:

  • what problem occurred
  • what was tried
  • what failed
  • what actually fixed it
  • under which conditions it worked
  • confidence / evidence

Over time the model effectively builds its own private knowledge base from real work, without retraining its weights.

That may be much more useful for agents than simply increasing context length or parameter count.

Your Zero-FLOP Memory idea immediately reminded me of this direction. Very interested to see the paper and code.

·

Thanks, that's a great connection. Honest scope first: my memory is much
lower-level than yours. It counts which byte followed which context, plus
what already appeared earlier in the current document. No facts, no
experience, no "what worked".

But the principle is the same: knowledge that lives outside the weights,
built without training, and looked up when needed. One thing I measured
fits your idea well: the document cache matters most. A passage the model
has seen before costs 0.69 bits per byte instead of 1.8, even 6,000 bytes
later, while a plain transformer forgets it after its 512-byte window.

Code and models are up now: https://github.com/Ckal/ZeroFLops-paper

Just out of curiosity, does sorting/rearranging tokens and data have any effect on the models intelligence/replies? Or if the model is easier to compress at all?

·

@yano2mch Good question. Order matters a lot within a text and hardly at all between
texts.

Within a document: the memory only helps because repeats are nearby. If you
shuffled the words or sentences, the cache and the long contexts would find
almost nothing and the score would get much worse.

Between documents: during training the windows are sampled at random
anyway, so reordering the training files changes little.

On compression: yes. Bits per byte is compression, so putting similar
articles next to each other would make text easier to predict. Some
Hutter Prize compressors reorder Wikipedia articles for exactly that
reason. For a benchmark it isn't allowed, though: the test file has a
fixed order.

In this post