Beyond RAG: Injecting Tensor Memory Cartridges Into Layer-3 of a Frozen LLM

Nearby_Indication474 · reddit · 2026-10-15

A solo developer proposes a third path beyond RAG and fine-tuning: have a frozen Qwen2.5-7B-Instruct read a fact once, capture its layer-3 residual representation (H3) and attention K/V states from layers 0-3, and package them into a numeric "memory cartridge."

At answer time the source text is never pasted into the prompt; instead the stored H3 representation is injected at the layer-3 boundary, and later transformer layers attend to this numeric memory. Weights stay frozen — no gradients, no LoRA.

The v1.4 addition is cartridge consolidation: three separately written memories can be appended into one consolidated memory while previously written rows stay unchanged. Using three fictional facts forming a multi-hop chain, the model with all three cartridges installed correctly answers three-hop questions; with incomplete memory it sometimes produces unsupported answers (failure cases were explicitly tested). Full technical disclosure and reproducibility docs are on Zenodo (doi:10.5281/zenodo.23381336).

Caveat: this is an independent one-person experiment with limited validation — treat the claims accordingly.

Original post →

More from Research

Research channel →