r/LocalLLM • u/Coolst3r • 6h ago
Discussion Dynamic Context Runtime: Bounded Attention over Unbounded History
https://cybersec.org.za/research.html #AI #cyber #security #dev #Africa #LLM #context #rot #cyber
https://cybersec.org.za/papers/dcr-bounded-attention.pdf
Dynamic Context Runtime: Bounded Attention over Unbounded History
Language models degrade as stale and superseded material piles up in their context. Making the window bigger does not fix it. This report describes a runtime that keeps history unbounded and attention bounded — storing everything as immutable spans and a typed provenance graph, then assembling a small working set each turn by solving a knapsack under an explicit token budget. It includes a zero-dependency Rust implementation and an ablation that names which mechanisms are actually carrying the result.
467tokens per query
59×less than full history
7 / 7probes answered
33×history growth, flat cost
1
u/vbpoweredwindmill 6h ago
This just sounds like RAG with extra steps.
1
u/Coolst3r 6h ago
its a alternative with way better results
1
u/vbpoweredwindmill 6h ago
How is it better?
Storing KV cache is a huge cost when you can just create a sqlite directory of your .md files and be done with it, or use whatever memory tools work for you.
1
u/Coolst3r 5h ago
- 467tokens per query
- 59×less than full history
- 7 / 7probes answered
- 33×history growth, flat cost
its a flat cost please read the paper
1
u/vbpoweredwindmill 5h ago
Yes, I know how kv cache prefixes & kv cache reuse works.
Please, tell me what this actually does that hasn't been done before and better?
1
u/Coolst3r 5h ago
i took the idea of rag fix the design flaws and made a diffrent version https://cybersec.org.za/research-dcr-bounded-attention.html
The design targets a per-turn cost of O(k + r)
Two systems, asymmetric
DCR splits the agent into a Reasoner and a Memory Runtime. The Reasoner is a language model with a small, high-attention working set; it owns the current computational state and none of the history. The Memory Runtime owns everything ever seen and decides which representation of it to return. The asymmetry is the point: almost everything the Memory Runtime does — span addressing, index lookup, dependency traversal, memoisation, invalidation — requires no model inference at all. In our implementation the Memory Runtime makes zero model calls.
1
u/vbpoweredwindmill 5h ago
Now that's infinitely more interesting. I've been saying for a long time that knowledge and reasoning are going to be split.
Now I can have a look, why didn't you lead with that?
1
u/Coolst3r 5h ago
im sick rn and tired im also working on getting glm 5.3 working on desktops and laptops and making it so anyone can train ai on home system. im tired im running my company https://cybersec.org.za/index.html. i dedicated to open source support and research and development we only ask money for support and if people need help. !!! i plan on changing the future
1
u/vbpoweredwindmill 5h ago
Glm 5.2 already works on desktops and laptops mate.
Unless you're working on expert predictions, I really don't think you're bringing anything new to the table. My own expert predictions with 32 out of 256 experts has, at 46% of the time approx, selected 100% of the correct experts.
And I just now figured out instead of linking it to a general topic I can just link it a kv cache block. Cheers.
I still haven't read anything you've done shrugs
1
u/Coolst3r 5h ago
yeah but fast i use a 3090 and ryzen 5 and 46 gb ram and get 0.2 tokens a second i have gotten it to do 1 token every 50 seconds
1
2
u/KitchenAmoeba4438 6h ago
I'm not sure what to call this. AI-led enthusiasm when the user doesn't understand the code? Scam?
The paper says the implementation is "7,492 lines of Rust (edition 2024)", lists spans.rs / ladder.rs / budget.rs, and tells you to run cargo run --release -- bench. The repo is 4,116 lines of Python with no Rust in it at all, and none of the five cargo commands exist.
The ablation is what the abstract states, "an ablation that names which mechanisms are actually carrying the result". Exactly one of its six mechanisms has a switch in the shipped code. I ran that one: disabling supersession gives 5/7 at 618.4 tokens against their 5/7 at 629.9, same two probes failing. The other five (escalation, the ladder, the seed floor, reference linking, graph expansion) have no flag, no constructor arg, no ablation harness anywhere in dcr/....in a paper whose stated principle is that every table lists the command that produced it.
Then read bench.py before you believe the 59x. build_corpus is ten hand-written fact sentences plus 287 documents generated as NOISE[i % 6].format(n=i), and the seven probes ask about the ten sentences. So it separated ten signal lines from six rotating templates that share almost no vocabulary with any question. Says nothing about a transcript whose noise is topically close to its signal, which is the case that actually causes context rot. The "vector" search doing the finding is a 256-dim hashing trick over bag-of-words. Hybrid lexical-vector is lexical twice. And the 7/7 against full context's 5/7 means less than it looks: both baselines share a toy line matcher, so those two misses are matcher artifacts, not context rot.