FIELD NOTE · STATE SPACE MODELS · 8 MIN READ
Where state space models help, and where they don't
Between early 2026 and October 2026 we designed an always-on agent around a state space model, wrote a Mamba network, ran one on a GPU, planned a nine-phase successor, and then dropped the idea in a phone app. Here is that arc as one story, and the rule we took from it.
Founder, Bodham LabsPublished · Updated
THE SHORT ANSWER
- A state space model folds the past into a fixed-size state, so its memory stays constant as a sequence grows, while a transformer keeps every past token and its memory grows with length.
- The price is fading detail, and the model still needs memory for its weights, so the saving only appears on long, continuous streams, not on short texts.
- Our rule: use SSMs on long streams, keep exact facts in an external store, and log the hidden-state norm from step one.
What is the idea, in one picture?
Picture two note-takers in a long meeting. The first writes down every word and, before each new sentence, rereads the whole notebook. Nothing is lost, but the notebook gets thicker every minute, and so does the work of rereading it. That is a transformer. Its attention keeps every past token, so the memory it needs grows with the length of the text.
The second note-taker has one index card. After each sentence they rewrite the card: keep what matters, squeeze the rest, cross out what no longer seems useful. The card never gets bigger. But a figure mentioned an hour ago may be gone by now. That is a state space model (SSM). It compresses the past into a fixed-size hidden state: constant memory, fading detail.
Mamba (Gu and Dao, 2023) is the best-known modern SSM. It lets the input decide what the card keeps and what it drops. RWKV (Peng et al., 2023) is a modern recurrent network that works the same way in practice: one fixed-size state, updated step by step. Jamba (AI21, 2024) mixes Mamba layers with a few attention layers, so a model gets both the card and some of the notebook.
What did seven months of work look like?
The arc runs from an always-on agent design in early 2026 to a phone app in October 2026 that decided not to use SSMs at all. Most of it is design and code. Only one SSM ever ran on real data, and that run failed.
| WHEN | WHAT HAPPENED | WHAT IT SHOWED |
|---|---|---|
| Early 2026 | A component labelled “SSM” that was in fact a GRU, a classic recurrent network, used as an actor-critic. Separately, a cost-tiered agent design, on paper only: cheap local models first, an expensive model only on escalation. | The GRU’s hidden-state norm sat at 1.3850 from step 100 to step 96,900. It was stuck. |
| 10 Mar 2026 | A written evaluation for RAMU, our always-on agent: an SSM (Mamba or RWKV) for the continuous loop, a transformer called only for hard decisions. | The design named its own weakness: details fade, so hard facts go to an external SQLite memory. |
| 10 Mar 2026 | RAMUPolicyNet: a Mamba encoder with an actor-critic head that picks one of a few actions. | Code only. No training results were found. |
| 11 Mar 2026 | A Mamba (S6) model ran on a GPU against live data streams, in paper mode, for research. | Inputs were not normalised. The hidden state reached about ±10¹⁵ over 1,024 steps. |
| 28 Mar 2026 | “Mamba-4”: a nine-phase staged design around a small Mamba-and-attention hybrid. | Status: “PRE-DEVELOPMENT (Phase 0)”. Not built. |
| 12 Oct 2026 | Mementos (codename), our on-device voice-memo app, considered SSMs as a way to save memory, and dropped them. | Memos are short, and on short inputs an SSM saves almost nothing. |
The hybrid design, 10 March
RAMU was meant to run continuously, reading its surroundings and keeping a rolling internal state. Our evaluation argued that a transformer would keep piling up tokens until it hit a limit, while an SSM could keep going on local hardware. So the always-on loop would be an SSM. When it met something unusual or a decision that mattered, it would pause, fetch what it needed from storage, make one isolated call to a large transformer, and resume.
The same document was candid about the cost:
Because SSMs compress the past, they slowly “forget” highly specific details from long ago unless repeatedly reminded. … We must rely heavily on the SQLite chitta (External Memory) to store hard facts.The policy network, same day
RAMUPolicyNet takes 14 input features, projects them to a width of 128 (d_model), runs them through one Mamba block with a hidden state of size 64 (d_state), and feeds the result to an actor-critic head that picks one of a few actions. Its smoke test pushes random numbers through it and prints the output shapes. The function for live, step-by-step use, the part that would make it an always-on loop, is an empty stub. We found no training run and no results. It is code, nothing more.
The GPU run, 11 March
This is the only SSM that met real data. It failed for a dull reason: raw values around 69,000 went in unscaled, and the hidden state grew to about ±10¹⁵ over 1,024 steps. We wrote it up in full in our note on the exploding hidden state, including the earlier “SSM” that turned out to be a GRU.
The staged design, late March
Mamba-4 is a set of nine design documents. The phases include data plumbing, a “Micro-Jamba” model (pure Mamba first, attention layers added later), Hopfield-network recall, an offline champion-versus-challenger tournament, OPLoRA “sleep” consolidation of new learning into the weights, optional BitNet compression, an optional mixture-of-experts overlay, and production safety from day one. The research page lists 24–36 million parameters as planned. The blueprint calls itself a “Planning Document”, and the roadmap's status line reads “PRE-DEVELOPMENT (Phase 0)”.
Two details show how the thinking moved. The blueprint aims to keep all memory inside the model, with no external database: the opposite of the SQLite answer two weeks earlier. And it adds attention layers, at a 7:1 ratio, to patch what it calls Mamba's “>33-minute amnesia”. That figure is a planning assumption, not something we measured. But the fix it reaches for, attention, is an admission that the card alone forgets.
What does a fixed-size state buy?
On a long, never-ending input, three things. These are the reasons in our March evaluation, and they are sound.
- Memory that does not grow with time. The state is the same size after ten steps or ten million. A loop that runs for weeks never hits a context limit and never needs a restart to clear one.
- Steady cost per step. Each new input updates the state; nothing is reread. So the work per step does not climb as the history gets longer.
- A cheap layer underneath an expensive one. A small model can watch the stream all the time and call a large transformer only when it matters. That is the same idea as our cost-tiered agent design: spend on the big model only on escalation.
What does it cost?
- Details fade. The card is a summary. An exact string read early on may not come back word for word much later. Our March notes gave the example of an API key read on day 1 and not recalled on day 100. Anything that must survive exactly needs a separate store.
- The weights still take memory. A fixed-size state saves only the memory a transformer would spend on keeping past tokens. The model itself, its weights, costs the same either way. On a short input there is little history to save, so the saving is close to nothing.
- The state has to be watched. It is a running total. Feed it unscaled numbers and it grows without limit, as ours did to about ±10¹⁵. Let it freeze and it carries nothing, as our GRU's did at 1.3850. Neither failure shows up as an error.
- A thinner toolkit. Our evaluation also noted that forcing strict structured output, such as JSON, was harder than with transformers, and that the SSMs it compared were weaker at multi-step reasoning. That is why the hard decisions went to a transformer.
Why a shipped app said no
Mementos records short voice memos and searches them on the phone. Memory on a phone is tight, so a model family famous for constant memory looked worth a try. The changelog entry for 12 October 2026 records why it was dropped:
A different kind of model (state space models) as a way to save memory. Why: a model's memory is mostly its size, and that kind only saves memory on very long texts; ours are short.
That one line holds the whole lesson. The fixed-size state is a saving on length. Where there is no length, there is no saving.
What we decided
Use state space models on long, continuous streams, where keeping every past token would otherwise grow without limit. Do not use them to save memory on short texts; there the model's size dominates. Keep exact facts in an external store, because the state will not hold them. And log the hidden-state norm from step one, with every input normalised first. A norm that explodes or never moves is a bug, not a result.
What would we test next?
These are open questions. None of them has an answer yet.
- With normalised inputs, does a small Mamba model beat a simple baseline on the same live stream?
- How fast do details actually fade? If we plant a fact early in a stream, how many steps later can the model still use it?
- At what input length does the saved memory outweigh the cost of the weights on our own hardware?
- Does an SSM plus an external store recover exact facts as reliably as a transformer that keeps them in its window?
- Is a Jamba-style hybrid worth the extra complexity at 24–36 million parameters?
The full research question, evidence and next step are on the state space models research page.
What this does not prove
- Nothing about how good SSMs are. We never had a clean training run, so we have no quality result either way.
- The designs are designs. RAMUPolicyNet was never trained, and Mamba-4 was never built.
- The Mementos call was reasoning, not a benchmark. We did not measure an SSM on the phone; the memos are short, so there was nothing for the state to save.
Questions
What is the difference between a state space model and a transformer?
A transformer keeps every past token and looks back at all of them, so its memory grows with the length of the text. A state space model folds the past into a fixed-size state and updates it one step at a time, so its memory stays the same as the sequence grows, but older details fade.
Do state space models have infinite context?
No. They can read an input of any length without the state growing, but the state is a fixed-size summary, so details from long ago fade. The model also still needs memory for its weights. Exact facts that must survive belong in an external store, such as a database.
When should you not use a state space model?
When your inputs are short. A model's memory is mostly its size, and a state space model only saves memory on very long sequences. That is why we dropped the idea for short voice memos in our phone app.
RAW DATA
A summary of the design documents, run notes and app changelog behind this note is available on request.
CITE THIS NOTE
Chandra, P. (2026). Where state space models help, and where they don't. Bodham Labs Notes.
BACKGROUND READING
- Gu, A. and Dao, T. (2023). Mamba: Linear-Time Sequence Modeling with Selective State Spaces. arXiv:2312.00752
- Lieber, O. et al. (AI21 Labs, 2024). Jamba: A Hybrid Transformer-Mamba Language Model. arXiv:2403.19887
- Peng, B. et al. (2023). RWKV: Reinventing RNNs for the Transformer Era. arXiv:2305.13048
Founder of Bodham Labs. BTech in Electrical Engineering, MCA and B.Ed; teaches AI and builds the systems in our work ledger.