r/TinyLlama_TITAN • u/Nearby_Indication474 • Oct 03 '26
I Built Removable Memory Cartridges for a Frozen 7B Language Model 16 Independent Memories, No Fine-Tuning, No LoRA, and the Original Source Is Gone at Readout
Zenodo permanent record:
https://doi.org/10.5281/zenodo.23127434
AKBASCORE NIRVANA — Cognitive Cartridge has now been publicly archived and timestamped on Zenodo.
Release: v1.0_NIRVANA_Cognitive_Cartridge
AKBASCORE NIRVANA — Cognitive Cartridge: Multi-Cartridge Compressed PKV Memory for Frozen Language Models
The complete implementation, raw execution log and reproducible public demonstration are available below.
What if knowledge could be loaded into an AI like a cartridge?
Think about an old Atari or game console. The console stays the same. You insert one cartridge and it becomes one game. Remove it, insert another cartridge, and the same hardware does something completely different.
AKBASCORE NIRVANA explores a similar idea for language models.
But there is one detail that completely changes what “cartridge” means here:
There is no human language stored inside the cartridge.
No source sentence.
No paragraph.
No document.
No readable summary.
No hidden copy of the original text waiting to be pasted back into the prompt.
If I give the system a statement such as:
“Container VX-731 is located at the cobalt observatory.”
the cartridge does not simply store that sentence somewhere and retrieve it later.
The sentence is passed through the frozen transformer during the forging stage. What is captured comes from the model's own internal computation: the numerical key/value states produced inside its transformer layers. NIRVANA represents that internal K/V information through a source-independent numerical codebook and stores the resulting compressed numerical representation as a Cognitive Cartridge.
So after forging, we have crossed an important boundary:
human language → transformer internal state → compressed numerical memory
The cartridge is therefore not a tiny text file wearing a new name.
It is not a database row containing the sentence.
It is not conventional RAG returning the source paragraph.
It is not a prompt template.
It is not fine-tuning hidden behind another term.
The original knowledge has been transformed into a numerical representation of internal transformer memory.
And when the model is questioned later, we do not give the original sentence back to it.
The cartridge is reconstructed into transformer K/V memory, installed into the frozen model's inference context, and the model produces language from that internal numerical state.
In the simplest possible terms:
A human writes knowledge in language.
The model converts it into its own internal numerical memory.
NIRVANA packages that memory.
The human-language source is removed from readout.
Later, the frozen model receives the memory rather than rereading the source.
That distinction is the heart of Cognitive Cartridge.
Instead of changing the model's weights every time we want to give it specialized knowledge, NIRVANA takes source information, processes it once, and turns the resulting internal transformer memory into a removable Cognitive Cartridge. After that, the original source sentence does not need to be placed back into the question prompt. The model's weights remain frozen.
Knowledge goes in.
Language disappears from the stored cartridge representation.
The internal memory remains.
And now we have extended that idea beyond a single cartridge.
16 cartridges, one frozen model
The public implementation released here contains 16 independently forged Cognitive Cartridges. They do not simply become one giant text prompt. They remain separate memory records.
Imagine that one cartridge contains:
amber compass → VX-731
and another contains:
VX-731 → cobalt observatory
These arrows are a human-readable explanation of what the cartridges represent. They are not literal text strings stored inside the cartridges.
Now ask:
Where is the amber compass?
The system can first retrieve VX-731 from one cartridge. That intermediate result can then be used to address the cartridge bank again. A different cartridge supplies:
cobalt observatory
In other words, information stored in separate internal memory records can participate in a multi-stage retrieval chain.
This is the point where the project became much more interesting to me. We are no longer asking only:
Can information be compressed into the internal memory of a transformer and recovered later?
We are now asking:
Can independently created internal memories become a modular memory system, where one retrieved memory can lead to another?
That is what the multi-cartridge architecture is beginning to explore.
Why does this matter?
I see two major directions.
1 — Specialized AI and agents
Think of the base model as the console. The cartridges are the knowledge packages.
Imagine a legal knowledge cartridge constructed and validated by highly qualified lawyers. Another cartridge bank could represent the legal system of a particular country. Another could contain aviation procedures. Another could contain engineering knowledge. Another could contain company-specific operational knowledge. Another could be built for medicine, industrial maintenance, finance, scientific work or a specialized autonomous agent.
The important difference is that the underlying model does not have to be retrained for every package.
In the implementation released here there is:
no fine-tuning
no LoRA
no optimizer
no model-weight update
The model remains frozen. The knowledge is carried by the cartridge.
And “carried by the cartridge” does not mean carrying around the original document in another container. The cartridge carries the compressed numerical representation derived from the transformer's internal K/V states.
Once a compatible cartridge has been forged for the model architecture used by the system, it becomes a reusable machine-readable memory object rather than a source document that must be repeatedly inserted into the prompt.
That opens an interesting direction for smaller models. Today we often try to make one model know everything. But a smaller model equipped with the right specialized memory bank may not need everything at once. It may need the right knowledge for the task in front of it.
A small model plus a carefully constructed domain-specific cartridge system could therefore become far more capable inside a narrow field than the base model alone.
The 16 cartridges in this release are not an architectural claim that the system is limited to 16. Sixteen is simply the size of the public experiment being released now. Scaling this architecture to much larger memory banks is a separate engineering and research problem.
2 — The longer-term AGI question
This direction is more speculative, but I think it is even more important.
Human beings do not appear to remember by rereading the complete text of their lives every time they need something. Experiences become memories. Those memories can later be triggered.
You are driving down a road. You see a car that looks exactly like a car you owned years ago. Almost instantly, your own car comes to mind. That memory may bring back another memory: a journey, a place, a person, an event, perhaps even an emotion associated with it.
One memory can activate another.
Of course, transformer K/V memory is not biological memory. I am not claiming that Cognitive Cartridge reproduces the human brain. And I am absolutely not claiming that we have created AGI.
But there is an important conceptual similarity worth investigating: the system does not need to reread the human-language source in order to access the information represented by the cartridge. The information has already crossed from language into an internal machine representation.
The important question is architectural:
Can an artificial system accumulate independently addressable internal memory objects, retrieve the relevant ones when needed, and allow the result of one memory retrieval to lead to another memory?
I believe that persistent, modular and relational internal memory is one of the important doors on the road toward more general artificial systems. Cognitive Cartridge has now opened that door far enough for us to experimentally put something through it.
What is actually happening inside the system?
NIRVANA operates on transformer K/V states. A source record is presented during a dedicated forging stage. Internal transformer K/V information derived from that source is represented using a fixed, source-independent codebook and stored as a compressed cartridge representation.
This point is worth repeating technically: the stored cartridge is numerical. The human-readable source text is used to produce the internal states during forging; it is not the payload subsequently supplied to the model during cartridge readout.
Later, during readout, the original source sentence is not placed back into the question prompt. The cartridge is reconstructed and installed as transformer memory.
For multiple cartridges, we developed an architecture called Isolated Batched Read, or IBR. The independently forged cartridge records remain logically isolated. Instead of concatenating all original source information into one ordinary textual context, multiple cartridge rows can be read independently and in parallel. A retrieved identifier can then become the input for another retrieval stage.
The basic path is:
human-readable source
→ frozen transformer
→ internal K/V states
→ compressed numerical Cognitive Cartridge
→ human-language source absent from readout
→ K/V memory reconstructed
→ isolated memory retrieval
→ intermediate result
→ another cartridge
→ final answer in human language
Or, even more simply:
language → internal state → cartridge → internal state → language
The language model itself remains frozen.
This touches a very specific gap between several existing ideas.
KV-cache compression exists.
KV-cache reuse exists.
External memory exists.
Retrieval systems exist.
Prompt caching exists.
Fine-tuning exists.
What Cognitive Cartridge is exploring is a different intersection:
source-derived knowledge encoded as independently retainable and removable transformer memory
→ no human-language source stored as the cartridge payload
→ source-absent readout
→ multiple isolated memory records
→ staged retrieval across those independent records
→ frozen model weights
So the question is no longer only:
How can we make the KV cache of a long prompt smaller?
The question becomes:
Can transformer internal memory itself become a modular knowledge medium?
A cartridge instead of a prompt.
A bank of cartridges instead of one context.
And eventually, perhaps, a system capable of navigating very large collections of independently created internal memories.
What happened in the public experiment?
The released implementation uses:
Qwen/Qwen2.5-7B-Instruct
28 transformer layers
BF16 / SDPA
K120 / V128 / OWN
fixed neutral codebook
16 independently forged cartridges
Isolated Batched Read
deterministic greedy decoding
frozen model weights
The locked public battery produced:
14/16 correct
87.5%
Missing-link detection: 4/4
Absent-ID detection: 4/4
False links: 0
NOMEM control target hits: 0/4
Original cartridge source sentences appearing in the readout prompts: 0
Trainable tensors: 0
Fine-tuning: NO
LoRA: NO
Optimizer: NO
Model-weight update: NO
The frozen-weight fingerprint before and after execution remained unchanged. The sampled SHA-256 weight sentinel also remained unchanged.
And I deliberately did not clean up the failure cases to turn this into a perfect-looking 16/16 demonstration. One linguistic family, F2, failed both of its evaluated cases in the live panel. That failure is in the public record.
Interestingly, one of those failed direct readouts internally reproduces the relevant relation:
“the saffron lighthouse houses container RQ-415”
but then still returns NONE instead of extracting the location.
So this is not a promotional benchmark where the failures disappeared before publication. The implementation, successes, failures, controls and raw execution are all being released together.
Why publish everything?
Because I don't want Cognitive Cartridge to exist only as a claim. I want anyone interested in this architecture to be able to inspect what was actually built.
The source code is public.
The raw execution log is public.
The controls are public.
The failed cases are public.
The architecture is public.
The release contains 18 technical visual records documenting the cartridge construction, memory path, controls, measurements and execution.
And the complete technical disclosure has now been permanently recorded on Zenodo:
https://doi.org/10.5281/zenodo.23127434
This is still an experimental system. There are major questions ahead.
How far can the number of cartridges scale?
How should very large cartridge banks be indexed?
Can cartridge selection become hierarchical?
Can memories be composed without losing isolation?
How portable can a forged cartridge become within compatible model instances and architectures?
Can specialized expert cartridge banks allow much smaller frozen models to perform at unexpectedly high levels inside narrow domains?
And, in the much longer term, what happens when an artificial system has not 16 independently addressable memories, but thousands, millions or more — with memories capable of leading to other memories?
Those questions are now much more interesting to me than simply achieving 16/16 on this test.
The first objective was to determine whether the underlying mechanism could exist at all.
Now there is code.
There is a frozen model.
There are independently forged memory cartridges.
The cartridges contain numerical transformer-memory representations, not copies of the human-language source.
There is source-absent readout.
There is multi-cartridge retrieval.
There is cross-cartridge relational lookup.
There are controls.
There are failures.
There is a raw log.
And anyone can test it.
AKBASCORE NIRVANA — Cognitive Cartridge
Inventor / Developer: Mustafa Akbaş
Zenodo permanent record:
https://doi.org/10.5281/zenodo.23127434
GitHub repository:
https://github.com/ceceli33/titan-cognitive-core-v2
Complete single-file implementation:
https://github.com/ceceli33/titan-cognitive-core-v2/blob/main/AKBASCORE_NIRVANA_CC.py
Same implementation split into three parts:
Part 1:
https://github.com/ceceli33/titan-cognitive-core-v2/blob/main/AKBASCORE_NIRVANA_CC.part1.py
Part 2:
https://github.com/ceceli33/titan-cognitive-core-v2/blob/main/AKBASCORE_NIRVANA_part2.py
Part 3:
https://github.com/ceceli33/titan-cognitive-core-v2/blob/main/AkbasCore_NIRVANA.part3.py
Raw execution log:
https://github.com/ceceli33/titan-cognitive-core-v2/blob/main/AKBASCORE_log.Nirvana.cc.log
Knowledge goes in.
Language disappears from the stored cartridge representation.
The internal memory remains.