The Real Bottleneck in AI Is Not Computation, It Is Memory That Knows What to Forget
Hatched by Kevin Di
Jun 12, 2026
10 min read
4 views
74%
The hidden question behind every speed breakthrough
What if the fastest way to make an AI system feel instant is not to make it think harder, but to make it remember better and remember less?
That sounds contradictory only until you look closely at where inference time actually goes. We tend to talk about model speed as if it were a single dial: more FLOPs, more GPUs, more optimization, more throughput. But the real system is not a calculator. It is a conversation engine, and conversation is dominated by state management. Every token generated is not just computation, it is a negotiation between present context, stored memory, and the cost of carrying that memory forward.
This is why the most interesting advances in inference are not just about making generation faster. They are about changing the shape of memory. One set of techniques attacks the problem from the model side: speculative decoding, attention variants, KV compression. Another attacks it from the product side: caching across turns, reusing prefixes, avoiding redundant recomputation in long conversations. Together, they point to a deeper truth: the bottleneck in AI is shifting from raw model intelligence to memory architecture.
The future of fast AI will belong to systems that decide, with precision, what should be recomputed, what should be reused, and what should be forgotten.
Why speed is really a memory problem
When people hear “inference optimization,” they often imagine smaller models or more efficient GPUs. But the biggest gains often come from making the system do less redundant work. A model answering a follow up question should not have to re-derive everything it already knows about the conversation. Yet that is exactly what naive inference forces it to do.
Think of a long chat like a lawyer building a case file. The expensive part is not only drafting new arguments. It is constantly rereading the entire dossier, reconstructing the same facts, and carrying all previous exhibits into every meeting. If the system can preserve the right notes, it can move much faster without losing coherence.
That is what KV cache optimizations are really about. The cache is the model’s working memory. If it gets too large, latency rises and hardware becomes a memory bandwidth problem rather than a compute problem. If it is compressed, shared, or reused intelligently, the model can generate tokens at dramatically higher throughput. In some cases, throughput can reach hundreds of tokens per second per user, not because the model got magically smarter, but because the system stopped paying for the same information repeatedly.
This reframes speed as an information logistics problem. The key question becomes: how much of the past do we truly need to keep alive, and in what form?
The four ways systems reclaim wasted work
The most effective inference systems are not built on one trick. They stack multiple forms of memory discipline, each attacking a different source of waste.
1. Predict before you compute
Speculative decoding is a beautiful example of using cheap prediction to reduce expensive verification. Instead of having the large model generate every token sequentially, a smaller or faster draft model proposes candidate tokens, and the larger model checks them in batches. If the guesses are good, the heavy model spends less time on the slow path.
This is not unlike a senior editor who does not rewrite every sentence from scratch, but quickly approves a junior writer’s draft when it is already close. The real gain comes not from producing more text, but from reducing the number of times the expensive expert has to start from zero.
Yet this approach has limits. It works best when the underlying distribution is predictable enough that the draft model can reliably guess the next steps. In models with more complex routing or conditional behavior, such as sparse expert systems, implementing it becomes harder. The lesson is important: prediction helps when the future is compressible.
2. Shrink the memory footprint
Attention mechanisms are often discussed as if they were all equivalent, but they differ dramatically in how much memory they consume. Traditional multi head attention stores separate keys and values for each head. Alternatives like MQA or GQA share more of that memory across heads, reducing the cache footprint substantially. More aggressive approaches use latent compression to reduce it further.
The principle is simple: if every head stores its own version of similar information, the system is paying for duplication rather than capability. Much of the performance gain comes from realizing that not every detail needs to be represented at full resolution for every token.
A useful analogy is image compression. A raw photo and a well compressed photo can convey the same scene, but one occupies far less space. The model does not need pixel perfect recall of every intermediate attention state. It needs enough structure to answer the next token correctly.
3. Spend attention where it matters
Long context is seductive. It feels like intelligence. But most of a long conversation is not equally important. Local attention mechanisms exploit this by focusing on nearby tokens and using full global attention only periodically. This is a kind of economic policy for memory: spend heavily where the information is likely to matter, and spend sparingly where it is mostly ballast.
This is a subtle but powerful shift. It admits that attention is not a moral good. More attention is not always better. Sometimes the smartest thing a model can do is ignore most of the past and keep only the parts that still affect the present.
Imagine a meeting transcript. If every sentence in the past hour mattered equally to the next decision, nobody would ever finish a meeting. In reality, a few commitments, decisions, and unresolved questions dominate. Local attention is a computational version of that fact.
4. Remember across sessions, not just within them
The most overlooked optimization is often the most product relevant: stateful caching across turns. In many conversational systems, users return to the same thread repeatedly. If the system must rebuild every prefix, every previous response, and every conversational state from scratch, it is wasting enormous effort.
A better design stores conversation state in host memory, keyed by prefix or structural similarity, and retrieves the longest valid match when the next message arrives. This turns the chat history into a reusable asset instead of a liability. Over many turns, the savings compound.
This is not a minor implementation detail. It changes the economics of long interactions. If a user has 180 messages in a conversation, recomputing the entire past each time is like asking a customer support agent to reread the entire ticket history before every reply, even when the relevant details have not changed. A stateful system can answer faster, cheaper, and often more coherently.
The deeper pattern: intelligence is becoming selective memory
At first glance, these techniques look like separate engineering hacks. In fact, they are all answers to one deeper problem: how do we preserve useful state without paying full price for it?
That question matters because modern AI systems are not constrained only by arithmetic. They are constrained by the movement, storage, and recomputation of context. The more the system resembles a dialogue or an interactive workflow, the more memory becomes the real currency.
This leads to a mental model that is more useful than thinking about speed alone.
The three layers of AI memory
- Working memory: the immediate context the model uses right now. This is the KV cache and attention state.
- Compressed memory: representations that preserve enough signal while reducing footprint. This includes shared keys and values, latent compression, and windowed attention.
- Persistent memory: reusable state across turns or sessions. This includes cached prefixes, conversation state, and structural retrieval.
The best systems do not maximize all three blindly. They allocate them differently depending on the task. A code assistant needs more persistent memory of a project’s structure. A short form chatbot may benefit more from aggressive compression. A reasoning model may prefer more precise working memory for the current chain of thought, even if it sacrifices some long range history.
The real design choice is not whether a model should remember. It is which layer of memory deserves precision, which layer deserves compression, and which layer can be discarded entirely.
This is a more mature view of AI scaling than simply “bigger context windows.” Bigger is useful, but only if the system can afford the memory cost and exploit the added context efficiently. Otherwise, longer context becomes a tax, not a feature.
Why the best optimization is often an act of forgetting
There is a temptation in AI to treat every gain in capacity as an excuse to keep everything. More tokens, more history, more state, more recall. But efficient systems are not archives. They are decision engines.
A good conversation does not require total recall. It requires selective relevance. A good model should not carry every past token with equal seriousness. It should distinguish between durable facts, temporary working notes, and irrelevant residue. That is exactly what human cognition does when it works well.
Consider how you remember a complex project. You do not keep every Slack message in active memory. You keep the goal, the constraints, the key decisions, and perhaps a few unresolved issues. Everything else is available in storage, but not in working memory. AI systems are converging on a similar architecture, though with different mechanisms.
This is where the connection between throughput engineering and product design becomes profound. The cheapest token is often the one you never need to revisit. The fastest inference path is the one that avoids reconstructing unnecessary state. And the most useful product is the one that knows how to preserve continuity without dragging the whole past into every moment.
In that sense, forgetting is not a bug in intelligent systems. It is a feature of efficient intelligence.
What this means for builders
If you are designing or evaluating AI systems, the relevant question is no longer simply, “How fast is the model?” A better question is:
What portion of the user’s history must be recomputed, what portion can be cached, and what portion can be safely approximated?
That question changes how you think about architecture.
- If the workload is repetitive and conversational, invest in persistent caching and prefix reuse.
- If the workload is latency sensitive, use speculative techniques to shift work into the cheap path.
- If the workload is memory bound, optimize attention structure and KV footprint before chasing bigger models.
- If the workload is long horizon but sparse in relevance, compress aggressively and spend global attention sparingly.
The important insight is that performance is not just a model property. It is a property of the entire memory pipeline. Two identical models can feel radically different depending on whether the system around them preserves and reuses state well.
This also changes how we should interpret “efficiency.” Efficiency is not merely cost reduction. It is the ability to retain the right continuity at the lowest possible operational price. In human terms, it is the difference between a person who can keep track of a complicated conversation without redoing everything, and one who always starts from scratch.
Key Takeaways
- Treat inference as memory management, not just computation. The fastest systems reduce redundant reconstruction of context.
- Use speculative work to avoid expensive certainty. Let cheap predictors handle the likely path, then verify selectively.
- Compress the past without flattening meaning. Shared attention structures and KV reductions work because much of the cache is duplicate or low value.
- Store continuity across turns when the product is conversational. Persistent cache can dramatically lower latency in long interactions.
- Design for selective forgetting. The best AI systems keep what matters, compress what is useful, and drop what is noise.
Conclusion: the future belongs to systems that know what not to carry
For years, AI progress has often been described as a race toward more scale, more context, and more speed. But the real transformation may be more elegant than that. The best systems are becoming not just faster calculators, but better custodians of state.
That is a profound shift. It means intelligence is no longer only about producing the next token. It is about deciding which parts of the past deserve to be alive in the present. The winning architecture is not the one that remembers everything. It is the one that remembers just enough, in the right format, at the right time.
So the next time you see a headline about inference throughput or cache reduction, do not read it as an isolated engineering improvement. Read it as evidence of a larger principle: the real breakthrough in AI is not infinite memory, but disciplined memory. Systems that learn this will not just be faster. They will feel more coherent, more responsive, and more alive.
Sources
Hatch New Ideas with Glasp AI 🐣
Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)
Start Hatching 🐣