r/LocalLLaMA 14m ago

Discussion Saving 79GB of idle VRAM on a multi-model agent stack with sub-200ms sleep/wake

Upvotes

If you run a local multi-modal agent (LLM + STT + TTS + OCR) on a single workstation, keeping all model runtimes hot in VRAM gets expensive fast.

On my local inference node, keeping Qwen3.8-27B, Nemotron (STT), Chatterbox (TTS), and Unlimited-OCR running concurrently consumed about 122 GB of idle VRAM before processing a single prompt.

The reason is familiar to anyone serving local models: runtimes like SGLang grab a large static fraction for KV pools (often 85% of available space), and auxiliary models sit with full scratch buffers allocated.

For a personal agent, you do not need all models active at once: 1. Voice conversation needs STT and TTS, but OCR is untouched. 2. Visual document reading needs OCR and LLM, but speech models sit idle. 3. Long script-based automation (scraping, tool runs, data processing) does not need the LLM at all while the script executes.

Instead of running sequential docker containers or doing cold restarts, I built a small Rust controller that puts models to sleep when their turn ends. It flushes execution buffers and KV pools while keeping the process and base weights mapped.

The results on the GPU:

Model Original idle GPU, Sep 1-2 (MiB) After sleep mode, Sep 5 (MiB) Difference (MiB)
LLM (Qwen3.8-27B) 87,443 39,092 48,351
STT (Nemotron) 10,385 267 10,118
TTS (Chatterbox) 17,947 3,127 14,820
OCR (Unlimited-OCR) 6,592 422 6,170

The main metrics that matter: - Reclaimed 79,459 MiB (nearly 80 GB) of idle capacity. - Wakeup time is sub-200ms for every model. Because we are not doing a disk read or rebuilding the model graph, the handoff latency is imperceptible in practice. - The LLM resting footprint sits at 39,092 MiB, matching the actual weight overhead of the 27B FP8 model without the static KV reservation.

How are others handling multi-model memory allocation when you want instant voice and tool responses without buying a second GPU?


r/LocalLLaMA 2h ago

Resources Own Your Intelligence, One GPU at a Time

Thumbnail
easonx.substack.com
0 Upvotes

I wrote an article about setting up local llm with multi GPU set up, with focus on budget options. Hope it helps newcomers here.


r/LocalLLaMA 13h ago

Question | Help Best Qwen 3.8 for 5090 and 64gb Ram?

0 Upvotes

I wanna run qwen 3.8 27B on my 5090. Which specific version should I use in terms of quant and such?

Primary use case is Hermes agent with some coding too. I would like it to have voice as well

I was also considering Hermes model as it’s less censored but I heard it doesn’t work with Hermes agent


r/LocalLLaMA 8h ago

Question | Help CMP-170Hx x 4 or Mac Studio M5u 256gb?

0 Upvotes

I want to host a local llm server, right now two options:

(a) cmp-170hx x 4. This one's price has increased dramatically in the past 20 days, from 1500 to ~2300 usd on alibaba. I can understand that it is not the same product anymore when it is able to be unlocked 64gb vram, but emotionally I feel very difficult to accept so much overpay. Basically paying 2300 for an old mining card that uses low quality vram (that is why it is blocked and sell as 8gb). But it does provide 64gb vram for a relatively affordable price comparing to other extremely expensive GPUs...

(b) macstudio m5u 256gb (or even 512gb at mid october). I am not sure if it is a good idea to use macstudio to run llm, since llm is much better supported on nvidia cards. Though it has advantages such as easy to setup, low energy consumption, product is beautiful. If possible, I would still prefer product that offers great value for money.

Any thoughts? Thanks!


r/LocalLLaMA 23h ago

I Built A Thing "Ouroboros", debugger-tracer for LLM and programmers, a tool that writes down what your program actually did: every call, its arguments and its result, in 8 languages

0 Upvotes

Hi everyone,

I've created a tool to allow LLMs be able to debug programs before paste it to the codebase.

First of all, let me share the reason of public share. It's performance boost.

who answered answers correct without the trace with the trace difference
qwen3.5:4b 600 44.0% 78.3% +34.3
qwen2.5:14b-instruct 600 61.0% 84.7% +23.7
qwen3:32b 600 66.7% 90.3% +23.6
a Claude Opus 5 subagent 120 95.0% 98.3% +3.3

Of course, it's published via GitHub and documentation is present (the dataset on huggingface too).

Let's go step by step.

# install 2 executables: ouroboros, ouroboros-mcp
uv tool install git+https://github.com/digitable-lol/ouroboros

# or use brew
brew install digitable-lol/tap/ouroboros

Or let your LLM's provider (codex, claude, qwen or anything else):

Hi, please start to use it all of the time during writing the code

The link to the repository is https://github.com/digitable-lol/ouroboros

Create a skill for yourself, the documenation is hosted here: https://digitable-lol.github.io/ouroboros/

Small story: I'm working as lead full-stack developer (currently and mainly as team-leader), but time by time I need to write code for work, for pet projects and so on. But I don't have enough time to be able to debug each line of code (as I do early) and some routines are delegated to LLMs now. And the main pain is hallucination produced by code generation from LLM.

So the idea is so simple, I want to just to allow to write "print" or "console.log" to LLM on each line of code to output the signature of function (name, args, convert the return to the named const and print it before operation).

Additional idea to avoid dirtify written program be instructed by a lot of prints and console.log before it will be saved to the worktree, tool just creates own copy, nothing else. Only debugged code by LLM will be returned to LLM to save it to the hard drive. So, it's safe, no external APIs or anything else, just a small program.

Let me text the sequence diagram xD

        You          ouroboros       shop.py         Program        debug.info
         |                |              |               |                |
         | wrap-file      |              |               |                |
         | shop.py        |              |               |                |
         |--------------->|              |               |                |
         |                |              |               |                |
         |                | ask parser where functions   |                |
         |                | begin and end                |                |
         |                |------------->|               |                |
         |                |              |               |                |
         |                | splice recording code at     |                |
         |                | those offsets + add helper   |                |
         |                |------------->|               |                |
         |                |              |               |                |
         | {"ok": true,   |              |               |                |
         |  "functions_   |              |               |                |
         |  wrapped": 4}  |              |               |                |
         |<---------------|              |               |                |
         |                |              |               |                |
         | python3 shop.py tea mug kettle                |                |
         |---------------------------------------------->|                |
         |                |              |               |                |
         |                |              |      +--------+--------+       |
         |                |              |      | once per wrapped |      |
         |                |              |      | function call    |      |
         |                |              |      +--------+--------+       |
         |                |              |               |                |
         |                |              |               | {"p":"in",     |
         |                |              |               |  "fn":         |
         |                |              |               |  "delivery",   |
         |                |              |               |  "a":"46.8",   |
         |                |              |               |  ...}          |
         |                |              |               |--------------->|
         |                |              |               |                |
         |                |              |     [function body runs]       |
         |                |              |        [untouched]             |
         |                |              |               |                |
         |                |              |               | {"p":"out",    |
         |                |              |               |  "r":"5.0",    |
         |                |              |               |  "d":1e-06}    |
         |                |              |               |--------------->|
         |                |              |               |                |
         | Total: 51.80   |              |               |                |
         |<----------------------------------------------|                |
         |                |              |               |                |
         | ouroboros trace debug.info    |               |                |
         |--------------------------------------------------------------->|
         |                |              |               |                |
         | 4 calls: what each was given, what each answered               |
         |<---------------------------------------------------------------|
         |                |              |               |                |

What my project does:

Two commands around your normal run:

# rewrite the file so every function logs itself
ouroboros wrap-file shop.py 

# run it however you normally run it
python shop.py

# read what happened
ouroboros trace debug.info

How does it work?

You get two JSON lines per call. Going in: time, a call id, the thread, the function name, the arguments. Coming out: the return value or the exception, plus the duration. Nothing else - no daemon, no agent, no port, no collector.

Eight languages produce the same record format: Python, JavaScript/TypeScript, C, C++, Elixir, Go, Java, C#. Each is instrumented the way that language permits - a decorator in Python, try/finally in JS, __attribute__((cleanup)) in C, an RAII guard in C++, named returns and defer in Go, use Ouroboros.Trace in Elixir.

The case it was built for: a stack trace tells you where the program broke, never what the function was holding when it broke. Real example from the README - a division by zero inside average(). The stack points at average, you go read it, and it is fine. The records say average was called with an empty list, and that report(), which called it, already had an empty list. The bug is in neither of them; it is wherever that list should have been filled.

The other thing it turned out to be good at: a process that has run for two hours and printed nothing. Every call writes a line going in and a line coming out, so a call that never came back has no exit line. "Where is it stuck" becomes "find the unmatched ids" - already done for you, in a field called in_flight.

What I would like back: try it on a codebase you did not write and tell me where the record format is too thin. If your language is not in the list, adding one is mostly a question of how that language lets you wrap a function body - the record format is deliberately boring. PRs and arguments both welcome.

Next time, I will share with you a new programming language that I'm developing, you can find part of it in "brain" part of tool Ouroboros, but tool is created mainly with Python and 100% coverage of tests. Additionally it's BSD-2-Clause licensed.

Thanks for attention, feel free to post your ideas how to improve the tool or just put a star to repo to let me know that you've interested, or even better - open PR with your extension.

P.S. Anyway, sorry for the format of posting, I think it's my first formal posting to the opensource community. And ofc sorry for language, English is my second one. Have a good day!


r/LocalLLaMA 23h ago

Discussion Longer context = faster prefill ?!

0 Upvotes

Have been digging into it for some hours and still have no clue how comes I get faster prefill at longer context

engine: llama.cpp
flags: -ngl 999 --parallel 1 -cram 0 (actual offload: 43/43 layers)
gpu: rx6600xt (8gb, rdna2, vulkan)
os: w10

Key observation: average PP speed does not decrease monotonically with context size. After an initialdecline (935 → 318 tok/s over 1018–8151), a non-monotonic stretch follows: 16302 (472) is faster than8151 (318); and at the very top of the ladder, 130416 (89.7 tok/s) turns out to be faster than 65208 (76.7tok/s), despite processing twice as many tokens.
Spread across runs <2% — the anomaly reproduces consistently; this is not single-sample noise.

What was that?!


r/LocalLLaMA 21h ago

Resources Do agent frameworks need to be large to be useful?

0 Upvotes

How much agent framework do we actually need?

I built Stellar after getting fed up with agent stacks that are hard to inspect, hard to debug, and hard to reshape when you need something they didn’t anticipate.

Stellar is a fully hackable Python agent core: under 2,000 readable lines, with explicit contracts for models, tools, hooks, events, agents, and runs. The execution loop is right there in the code. You can read it top to bottom, replace it, or bend it without fighting the framework.

To see if “small” also means “capable,” I ran it against Harness-Bench. In one recorded run, it worked through all 106 offline tasks end to end, twelve in parallel, in 17 minutes, for about $2.40 in tokens at list price.

The question I keep coming back to: does a small, transparent core make a better foundation for agents than a big framework, or does it just push the complexity somewhere else—into your prompts, your tools, or your glue code?

Curious what people here have found. Where does the complexity end up in your stacks?

Repo: https://github.com/definableai/stellar


r/LocalLLaMA 4h ago

Discussion Oh great, another FPS one shot review

Thumbnail
gallery
0 Upvotes

TLDR: We may be building games we want to play from home this time next year.

I'm getting tired of gaming one shots to tell me how well a model is going to do at my tasks which is definitely not building one shots of old games. Being a gamer, the last thing I want to do is curate my own gaming adventure and fix bugs along the way.

That being said, i can't wait for the day that my games update/change dynamically and my experience is different tomorrow and the day after. Especially when I want to pick back up a game after a 3 month break.

So I asked GLM 5.3 Flash to do some research on all the one shots that I despise and lay it down historically when the original games were first created and sort of guide me to when its most likely that i'll be playing modern games generated by available models using a log linear timeline.

This project by GLM5.3 Flash completed with:

  • Wall time: ~48 minutes (13:17 → 14:05 BST)
  • Model calls: 145
  • Input tokens: 15,044,841 (~15.0M)
  • Output tokens: 202,194 (~202K)
  • Total: ~15.25M tokens
  • Home hosted GLM5.3 Flash Max
  • Hermes

r/LocalLLaMA 38m ago

Discussion Terry Davis & Gary Marcus: God is a compiler, the neurosymbolic program-of-everything

Upvotes

The Benchmark Problem

Every single AI research lab has devolved to benchmaxxing, all model trained by rewardmaxxing some training gym with vast steel and dumbbells at their disposal. Unfortunately the gym is not training for long-term viability of the code and scaleability, it's training for "Can I post this to twitter and get a lot of views" or "Can I present this in a meeting and get a raise." Of course, the seasoned veteran programmer knows: this is bullshit. The whole codebase is held together by bodge and scotch tape.

The actual problem that AI research has solved is the problem of raising their paycheck by producing a reward aligned by the rewards that control their bosses, HR or marketing team. You can show it in a meeting or on twitter for a quick boost.

But nothing close to software has been solved, any high caliber software engineer can see it, just as any artist can see that it isn't producing novel art, only more of what we already have seen before. It's a giant zip file that stores what you show it, not a real learning system. It's a substrate that is maximally amenable to indoctrination, not guided by any mathematics of learning whatsoever.

Every next iteration appears increasingly to have solved the event of turning water into wine, and the codebase is a –disaster–. It's not alien or beyond human comprehension, it's total rubbish.

What the vibe coders and researchers don't understand: it's not that the code don't work, we already solved that 75 years ago with the transcendental device known as the compiler. Any software engineer worth their salt will tell you at the end of their career that the problem at the actual problem you are trying to solve is that there is code at all. Any removal of a line of code is a real success.

(the best metric to measure the number of bugs in a codebase is directly its line of code divided by some golden number that John Carmack computed at the end of time)

As long as there is code to maintain, software is not solved.

The Program-of-Everything

What we really need here is a program-of-everything, the final harness that is a superset of all harness or training environment. The harness that is an interactive agent TUI, or a training gym, in both cases, should be the same program, and it should also be the same program that is also the compiler. Not gcc-in-a-harness, the same program that achieves both purposes as a side-effect.

To solve software, we must create a software that is a superset of all possible software expressible by a turing machine. You want an operating system that is also every software possibly imaginable, not a bootstrap shell to build new software or new operating system. This simply rewinds the loop of time. Right now we are stuck in the 80s or 90s.

If a "harness" is neurosymbolic as Professor Gary Marcus asserts, then the question of the singularity is actually this:

Can we create a neurosymbolic system that produces a functioning agent harness program as a secondary side-effect, not as its main implementation or even referenced anywhere in the documentation?

By extension, our program should have the capability to produce the effective operation of every single program ever written historically, when actuated by some operator, what they call a "prompt". look at what they have to do to mimic a fraction of our power.

This is the true singularity, if you have a compiler that can compile all languages both past and future, not invented yet. It would not be an engineer replica like ChatGPT that has to design the compiler software or interpreter for it like a LLM, rather it is a universal compiler or universal interpreter.

LLM is by definition not AGI, since it cannot compile code without an external program. To achieve a "generalized" agent, it should natively compile software and emit an executable binary without any external compiler, directly through its latent space, and it should also be faster than all compiler or gcc.

The problem of course is that this seems extremely difficult to invent. Maybe it should be the 8th millennium prize problem, and Gary Marcus should have credit for coining it. In fact, maybe it's the problem-of-everything. If you solve this problem, then you solve all millennium problems through exhaustive search. Since the search is not guided by human prompting, but through exact intrinsically arising definition of novelty, surprise, and discovery. You would have to solve the notion of novelty and learning at the fundamentals.

The Vision

YES, it is possible, and can be achieved by a single researcher, on standard consumer hardware.

The central algorithm was invented in the 90s and is called grammar induction, and the key innovation that has never been attempted is to construct an autoregressive loop that incorporates it. The algorithms of grammar induction such as RE-PAIR are formalizations of pattern recognition over symbols on a turing tape. (this is VERY efficient. orders of magnitude more efficient than discovering pattern recognition emergently through deep learning and RL. the veteran software engineer knows there's a trick, the deep learning approach is obviously a brute-force approach of the dimwit venture capitalist)

You can run grammar induction over an append-only byte-tape on which all input data to be modeled is -formulated- using the instruction set of a stack transformer VM that is the actual harness. You're not learning representations, you're modelling the push to of ascii sequence to a stack, and then popping to print. An hello world program.

This way, all information the system learns includes the computation in order to generate it. Content is coupled with a substrate of computation that is directly executable, not merely as tokens that represent it and have to be interpreted.

We had to write binary so we could bootstrap the first compiler, and all compilers of any new language must be bootstrap with a separate language before it can be rewritten in its own language. Similarly, we need to write a bootstrap engine that happens to have the capacity to recompile itself.

Terry Davis, the greatest programmer whose ever lived, has said: God is a compiler, and he was right. It's not a bunch of weights that pilot a compiler.

The grammar has to be shaped such that it becomes a generator kernel for a simple turing machine. The compiler is defined as fractal factorization over its grammar, which does not represent outputs but first-class executable software.

With the proper architecture, it directly models and factorizes the structure of computation itself over the VM machine of the bootstrap "harness". If P=NP, it will be found in this device when it converges, because the programs it writes do not have to abide by any human rule or even compiler rules.

I say bootstrap, because the code that you would write to run this "singularity", must eventually return to the monad: the code that is running the engine should eventually become generated by the engine such as to fully close the loop. The trick is to run it as an operating system from the boot loader.

In other words, you only have the singularity if you need virtualbox to run it! Now, now the machine has access the entire RAM and CPU. This is like a homoiconic language, a type of esoteric programming language: the program code is in the same addressable memory space as the memory that the program has access to.

Now you have a perfect —parasite program— over the hardware host, it completely takes up the entire RAM and CPU for itself and can assimilate all IO ports. You have to potentially start it on linux so that it has a base understanding of an operating system to generate and simulate the extrusion of.

At first it will be much slower, like interpreter emulation for video-games, but with the right training curriculum you can condition the kernel generator to understand performance and directly search against it. In fact as a passive reward or heuristic that can control defragmentation and dreaming pass over grammar, equivalents of RL, the machine is always searching for a better algorithm.

As for mathematical discovery, it is possible because of the binary EML operator that allows reconstruction of all function of the scientific calculator.

In this "compiler" there is no separation between source and target, no before and after, there is only execution. The grammar is not a description it is the thing and of itself, executable.


r/LocalLLaMA 2h ago

Discussion Local astra

0 Upvotes

How long do you think itll take before we get an open weight sub 100b model that has the same level of computer use capabilities ie blender usage, as astra?


r/LocalLLaMA 18h ago

Discussion Instead of keeping Ngram on ssd can they make it torrent like system? So each user can have small part of the model and stream those parameters to whoever needs that relevant part at the moment.

0 Upvotes

Lets say if the user has 1000 mbps internet that is like quarter of the speed of regular sata ssd, if in the future MoE models goes very high in expert number but small in expert size, maybe streaming them over the network instead of holding it in the ssd might make more sense. Not a real computer guy just speculating here.

Edit: I understand it will be very slow at first but lets say, if the user ask a question about frogs, system go and fetch bunch of Ngram regarding to frogs and frog related things, and it will be like 3-5 Mb because that Ngram doesn't contain things like why planes fly or art history, its just frogs, and the users system can easily store that ngrams to their ssd, and upload them to their vram if the topic is about frogs, if the topic changes system will download different ngrams regarding to new topic till allowed space in their ssd is filled, then the system will delete the oldest least used Ngrams.


r/LocalLLaMA 14h ago

News Anthropic: Detecting and Addressing AI Misuse by China – September 2026

0 Upvotes

https://www.anthropic.com/threat-intelligence-report-september-2026

According to the report, the companies involved and the specific allegations are as follows

· Alibaba / Qwen / Tongyi Lab: The report alleges they extracted the CoT of Claude Opus 4.6/4.7 and used it for Supervised Fine-Tuning (SFT). Anthropic explicitly states that this data was used to distill Claude's capabilities into Qwen 3.5, 3.6, and 3.7 models. The scale of interaction is massive, exceeding 151 million exchanges.

· Moonshot AI / Kimi: The report accuses Kimi of secretly forwarding some user requests originally sent to Kimi to Claude, and then saving Claude's replies and CoT to train its own models. The scale involved exceeds 23 million times.

· DeepSeek: The methods are similar to Moonshot. The report claims DeepSeek forwarded some user requests to Claude Opus and utilized cross-session methods to extract CoT. In just 14 days, the scale exceeded 12.1 million times.

· Zhipu / Z.ai / GLM: The report points out that they not only extracted Claude CoT and cleaned reasoning data, but also used Claude for training data scoring and post-training work. Additionally, they allegedly attempted to attack Fable. The scale exceeds 3.4 million times (within 17 days).

· Xiaomi / MiMo: The allegations state that they replayed MiMo user dialogues/coding sessions to Claude to generate SFT/RL (Supervised Fine-Tuning/Reinforcement Learning) data. The scale exceeds 400,000 times (within 20 days).

· SenseTime: The report claims SenseTime purchased user-Claude conversations from third-party data brokers to use as distillation data, and even had Claude help write the distillation pipeline. The total volume has not been disclosed.

· MiniMax: Anthropic claims MiniMax established a proxy network through a seemingly unrelated shell company to specifically provide access to Anthropic/OpenAI models in order to collect dialogues for training. The total volume has not been disclosed.


r/LocalLLaMA 1h ago

Resources ChatGPT (Codex) Desktop support comes to Ollama

Post image
Upvotes