AI agents can share their memory. A shared KV cache saves time and computing power

AI agents can share their memory. A shared KV cache saves time and computing power

Ondřej Barták
Ondřej Barták
Entrepreneur and Programmer
12. 10. 2026
5 minutes reading · 3 views
AI agents can share their memory. A shared KV cache saves time and computing power

Programmers today are increasingly entrusting work to so-called AI agents. These are programs built on artificial intelligence that independently examine code, run tests, and look for bugs. Such an agent may spend an hour searching for a hidden problem. But then it encounters an obstacle it cannot handle and must hand it over to a smarter model. At other times, it needs to delegate part of the task to another model that specializes in the matter at hand.

A great deal of time and computing power is lost during these handovers. Researchers from Nvidia and other institutions have therefore come up with a way to bypass this step. Instead of passing lengthy texts to one another, models transfer their internal memory directly. The first method made the handover up to twenty-five times faster, while the second method, called Cache-to-Cache, made it two and a half times faster on average.

How a model remembers what it has already read

When a language model receives a task, it first reads the entire prompt and makes its own notes about it. Technically, these are called a KV cache. It then begins writing its response and continuously refers to these notes, so it does not have to read the entire text over and over again.

The problem is that the notes are written in a kind of private script understood only by the model that created them. When an agent switches to another model, the newcomer cannot read them. It must therefore go through everything accumulated over the entire hour of work all over again, including the code, test results, and previous decisions. It works much like taking over an unfinished project from a colleague at work and having to read through an entire binder of documents instead of receiving a brief handover.

When an agent divides the work among several specialists, a different problem arises. The models send each other long messages that one must laboriously write and the other must then process all over again.

Nvidia translates notes from one model to another

Nvidia focused on situations where an agent works with a smaller model and needs to switch to a larger, smarter model from the same family, such as moving from a smaller Qwen3 to its larger sibling. Instead of having the large model read everything again, the researchers simply translate its notes from the smaller model's script into the larger model's script. This translation takes place in the following three stages.

  • Finding counterparts: the system determines which parts of the small model best correspond to the individual parts of the large model.
  • Adjusting the order: it removes information from the notes about where each word appeared in the text and adds it back only after translation. This allows it to convert even very long texts.
  • The conversion itself: this is handled by a simple statistical calculation that does not require expensive and time-consuming AI training.

Five hundred sample texts were enough for the researchers to set up the entire conversion process. They tested the method on six pairs of models from the Qwen3, Llama 3.1, and Ministral 3 families, always combining a smaller variant with a larger one. The process works only between models from the same family that have similar architectures.

The result is striking. Converting notes for a very long text took less than a third of a second. If the large model had recreated them from scratch, it would have taken almost seven seconds. However, speed comes at a cost, because some information is lost during translation. Depending on the type of task, the large model retained roughly three-quarters to nearly all of its usual accuracy. Mathematical tasks performed the worst. Although accuracy can be improved with a smarter converter, preparing one is more complicated.

Models communicate without words thanks to C2C

The second technique targets situations where two models work together. One might investigate why a program is crashing while the other prepares a fix. Normally, the first model would have to write a report word by word, and the second would then have to read it. This takes time, and important details can easily be lost in a short summary, or the result may be unclear.

This method was developed by a team of researchers led by Tianyu Fu, presented at the prestigious ICLR 2026 conference, and its code was released publicly. First, both models read the same source materials and make their own notes. Then a special interpreter converts the first model's findings into a form the second model can understand and inserts them directly into its notes. This means no one has to write or read any message. The models themselves remain unchanged; only the interpreter needs to be trained. Moreover, the process also works between entirely different models—the researchers tested Qwen, Llama, and Gemma, for example.

In tests assessing reasoning and knowledge, this method performed several percentage points better than when the models exchanged text messages. Compared with models working independently, it was six to fourteen percent more accurate. A clear measurement demonstrates the difference in speed. Writing a short message took the model more than a second, whereas transferring notes through the interpreter took roughly a tenth of a second.

This method also has its drawbacks. The interpreter must first be trained, and researchers need direct access to the models' internals. If the model from which the notes originate is weaker or poorly chosen, it can lead the other model astray. Both techniques can therefore be used only by companies that have full control over their models. Those who use artificial intelligence solely through the closed services of large companies cannot access its internals. In an experiment where two agents worked together to solve mathematical problems, the best results ultimately came from combining both approaches: the models exchanged a brief explanation in words as well as their notes.

Sources: arxiv.org and beri.net

Advertisement

Content created with help from UpTier.

SEO and GEO on autopilot. UpTier’s multi-agent systems write and optimize content for search engines and AI answers.

Discover UpTier ↗

Category:AI
Did you enjoy this article?
Discover more interesting posts on our blog
Back to blog

Related posts

Meta releases Muse Wonder and Wonder Full with a focus on long-term memoryMeta releases Muse Wonder and Wonder Full with a focus on long-term memory
Meta says Muse Wonder and Muse Wonder Full are designed to better retain and connect information from users. Wonder will be accessible through the API, while Wonder Full will be reserved for Muse Code subscribers.
2 min read
12. 10. 2026
vLLM adds preview support for NVIDIA Vera Rubin NVL72vLLM adds preview support for NVIDIA Vera Rubin NVL72
Developers with Rubin hardware can use a vLLM nightly container with CUDA 13.4 and PyTorch 2.15. Support includes optimized FlashInfer kernels, alongside preliminary measurements published by vLLM for MiniMax M3 and Qwen3-VL-235B-A22B.
3 min read
12. 10. 2026
OpenAI Is Earning 20 Billion Less Than Expected. Tech Stocks FellOpenAI Is Earning 20 Billion Less Than Expected. Tech Stocks Fell
OpenAI’s new figures revealed a major gap from earlier estimates. Investors grew uneasy, and tech stocks including Nvidia, AMD and Oracle fell sharply.
3 min read
12. 10. 2026
Přihlaste se k odběru našeho newsletteru
Zůstaňte informováni o nejnovějších příspěvcích, exkluzivních nabídkách, a aktualizacích.
CodedTrip

Operated by CodedTrip LLC, USA.

YouTube
TikTok