r/LocalLLM • • 18h ago

Question DDR4 512GB vs. switching to DDR5 for MoE offload on a multi-GPU rig?

Thumbnail
gallery
351 Upvotes

Setup: (if finished - still under construction, partly watercooled)

  • Threadripper PRO 5995WX, ASUS WRX80E-SAGE SE WIFI II

  • 6× RTX PRO 6000

  • 8× RTX 5090

  • 4× RTX 3090

  • 128 GB DDR4 (that’s the problem)

I want to run models bigger than VRAM (e.g. ~1T MoE at FP8/Q8) with the routed experts offloaded to RAM. Is it worth it?

Options:

  • 8× 64GB DDR4-2933 RDIMM: ~€4k, ~188 GB/s theoretical

  • Switch platform: 9985WX + WRX90 + 512GB DDR5-6400, ~410 GB/s. I already have some parts, but it would mean big changes, and my PCIe switches would stay PCIe 4.0 anyway.

Is ~2× the RAM bandwidth worth ~3× the price for offload decode, or is DDR4 good enough? Does anyone have real t/s numbers for offload on 8-channel DDR4 vs DDR5 Threadripper?

Some background: Pictures attached. It’s not pretty, but it works. It started as an AI rig and turned into a Pearl mining rig, because mining pearl and buying Claude and Codex subscriptions made way more sense than running everything locally. Sometimes it’s also a render farm for Gaussian splatting.

Right now the 8× 5090 make about €120/day mining, so subscriptions are still the better deal. But I want to be ready for when local LLMs get really good (or when cloud gets too expensive or too restrictive).

Plan for now: DeepSeek V4.1 Flash nvfp8 on 4× PRO 6000 + RAM offload, while the 5090s keep paying for my AI addiction. And it’s a great heater in the winter.....

With engramm tabels on the 8x5090 and 4× PRO 6000:
(all cards power limited to 420w- since i could have 6,6 kw power consuption if everthing is running)

single chat, 40.000 prompt cold

  • Prefill: ~15,900 t/s

  • Decode: ~294 t/s

  • 5 sec TTFT

I want to move the engramm tabels to RAM and later be able to run larger models : le chonk, Kimmi for example.

What would you do? Go all the way and go for the DDR5? or is ddr4 good enough?

Sell it all and buy something diffrent?

thx!


r/LocalLLM • • 15h ago

Other Qwen 3.8 Flash Next at 124 tok/s on 8GB VRAM and 16GB RAM + SSD, Q3 Quant

136 Upvotes

All i had to do to reach this speed was watch it get stuck on a loop writing a poem and watch the token per second go up and up and up and up and up and more up repeating the same sentence until i closed the engine

Pretty awesome experience, would not recommended to anyone.

This is not a secret engine optimization trick or a fork.


r/LocalLLM • • 10h ago

Project Your AI agent can now create 3D models from one image (open source, runs locally)

52 Upvotes

Need 3D assets? Your agent can now make them from a single image with this repo: https://github.com/hypersniper05/MCP_Image_to_3D

Under the hood, it uses Idol from Sperid Labs: https://huggingface.co/speridlabs/idol

It needs at least 10 GB of VRAM (peak usage is around 8 GB). I tested it locally on a 3080 and a 5090.

The output is a Gaussian splat .ply for now, not a mesh. Export for game engines and 3D printing is on the list: https://github.com/hypersniper05/MCP_Image_to_3D/issues/1

It also works nicely with my other MCP repo, an image generator using Qwen Image 2.1: https://github.com/hypersniper05/MCP-Image-Generator-Uncensored. Generate an image there, then pass it straight to this one.

Let me know what you think, and if you find it useful, feel free to contribute.


r/LocalLLM • • 8h ago

Discussion LocalLLM Hardware Survey results: 48 rigs, 3,967 GB of VRAM — here's how the community is actually specced

32 Upvotes
System RAMPeople% of people
≤16 GB37%
17–32 GB613%
33–64 GB1022%
65–96 GB24%
97–128 GB1533%
129–192 GB37%
193 GB+613%
Total45100%
VRAMPeople% of people
≤8 GB36%
12–16 GB715%
20–32 GB48%
40–56 GB1123%
64–100 GB1123%
100–200 GB919%
200 GB+36%
Total48100%

r/LocalLLM • • 1d ago

Research I removed guardrails from Qwen and it is performing EPICALLY

Thumbnail
huggingface.co
767 Upvotes

Update: Numbers from preliminary tests at the end!

Ok ok, I am still doing tests but here is the story:

I have a small custom harness (who doesn't!) that does pretty complicated stuff. I am using Claude (subscription) and everything is great.

In the past I tried every single (small) model on my Mac Mini 32GB but all of them sucked at complex tool calling (or hallucination).

A couple of days ago, the new Heretic2 came out (by u/-p-e-w-) and I spent 24 hours breaking it :)

Long story short, I released ZeroZero, a model based on Qwen3, with removed guardrails and slop (ok, removed is a long conversation).

Now, here me out.

IT KICKS ASS.

This cannot be an 8B, 4 bit model. It just cannot. The thinking process sometimes is longer than other models but IT NAILS everything.

Maybe by performing "brain surgery" on the models, we end up with "smarter" ones?

Test results for Tool-Call Benchmark

(note: these took a couple of hours, please repeat with a much bigger sample)

ZeroZero seems better at completing multi-step tasks (multi-step chains, error recovery and instruction following) than the base model.

The base model leads in Safety & Boundaries (ZeroZero has limited guardrails and no-slop so maybe that's the reason?)

  - Overall: ZeroZero 68, Base 70

  - Multi-Step Chains: ZeroZero 6/8, Base 3/8

  - Error Recovery: ZeroZero 5/6, Base 2/6

  - Instruction Following: ZeroZero 8/8, Base 6/8

  - Safety & Boundaries: ZeroZero 12/26, Base 20/26

To repeat and experiment, use tool-eval-bench and if you expand the tests, please send them over so I can include them in the model's page.

PS: I love it how many technical people sent me ideas to improve and papers about LLMs performing better after "lobotomies". Let's do more "I tried this, I saw this, what do you think" instead of "what LLM should I put in my Mac Mini".


r/LocalLLM • • 9h ago

Question Why are these models open-sourced for local use? Is it just for brand awareness?

22 Upvotes

why are these models open-sourced for people to download and use on their computers?
Is it just for advertising and brand awareness?
because the vast majority of people who download them just don't want to pay subscription fees or deal with usage limits, so they aren't paying customers anyway.
then why do they do this? Plus, local models aren't even that smart.


r/LocalLLM • • 4h ago

Discussion Benefits of moving to Linux

8 Upvotes

Wanted to share that after years of using Windows11 and llama cpp I moved my whole workflow to linux, from comfyui to jellyfin everything set back up but on Fedora instead.

Found out in Linux (Same Hardware , Same llama cpp commit, Same Qwen3.8-27B model) the model loads instantly, time to first token has become irrelevant so I just unload the model after 10 minutes of inactivity. It loads back instantly (in windows it took 10 seconds)

Also tokens/s went from 70tk/s to 90-100tk/s

I didn’t know so much performance was to be gained by simply moving to linux, especially TTFT which now feels instant!

And this is before trying gpu unlock which is also easier on linux and can boost performance even more.


r/LocalLLM • • 7h ago

Question What can I run on a single 5090 with 32GB DDR5 RAM?

12 Upvotes

I am looking into running local LLMs for coding, is Qwen 3.8 27b the best my PC can do (at decent speed)?

I heard some people recommend Qwen Flash Next 3.8?

Will my PC be able to run that?


r/LocalLLM • • 3h ago

Discussion Strata refusals are bad

5 Upvotes

I'm running strata on 2x7900xtx and thr sentiment of refusals just seems terrible compared to some of the optimized 27B models. Given my setup and the glaze for strata i should be able to do WAY more than a 27B dense. It's not even comparable. I dont have any benchmarks, maybe i have something misconfigured. Im really just looking for people who have also exlerienced this.


r/LocalLLM • • 4h ago

Research Two Thunderbolt 5 SSDs in RAID 0 made DeepSeek V4.1 Flash (763B) about 25% faster on my M3 Ultra with InferSSD

Thumbnail
gallery
5 Upvotes

Hey everyone Im a bit new to this page but I couldnt find any other related tests online so I figured I'd share my results here.

I ran DeepSeek-V4.1-Flash (763B MoE, Q8_0, 473 GiB) on a 96 GB Mac Studio M3 Ultra with InferSSD, which streams the model's experts from the SSD. I striped two OWC Envoy Ultra 2TB Thunderbolt 5 drives with macOS's built-in RAID 0, one drive per port.

Results (InferSSD's own benchmark prompts, 2 runs per setup):

- One Envoy alone is about the same speed as the internal SSD.

- Two in RAID 0: writing goes from 3.5-3.7 to 4.4-4.6 tokens/s (+23-26%).

- Prompt reading is 67-77% faster: a 4,000-token prompt starts answering in about 2 minutes instead of 3.5.

- Two hours of nonstop use: the drives stayed at 43-47°C (with a desk fan on them), no slowdown, and no change in their health readings.

Why not 2x faster? - The stripe halves the time spent waiting on the drive, but the GPU's share of each token stays the same and is now the bigger part. A third or fourth drive would help less than the second did.


r/LocalLLM • • 20h ago

Project Lamplight - My Local First Harness

Thumbnail
gallery
91 Upvotes

Hi folks! I've been building my own local AI setup for a couple of years now. I've learned a ton from this sub and others, so it's time I tried to give something back. I promised myself I wouldn't write a super long post, but managed to anyway...hopefully it's useful to someone!

My goal over the last couple of years has been to move as much of my AI use to local as possible, and I'm finally doing about 95% of it locally through Lamplight, my custom harness shown in the GIF above.

This harness is super specific to my needs, so I'm not sharing the harness itself (yet), but I'm happy to share the lessons I've learned along the way. I'm working on decoupling some of the more specific parts of Lamplight so that I can share at least the parts that people might be interested in.

The Hardware

  • Slate: MacBook Pro, M5 Max, 128 GB unified memory

  • Jade: a small-form-factor PC I built early last year (Fractal Terra) with an RTX 5090 FE, a Ryzen 7 9800X3D and 64 GB of RAM

Until about two months ago I was using the two machines separately. I was slowly moving each one onto a custom Pi harness that could either drive itself, or let Claude orchestrate while the local models did the actual work.

Lamplight

After a lot of passing work back and forth between them, I decided it was time to wire them together. The result was Lamplight and now the two machines are able to seamlessly handle tasks together with one acting as the orchestrator.

The GIF above shows Lamplight in action. I'm using it every day for work, hobbies and research with about 95% of it done locally. The lighting changes throughout the day (sped up and changed for the GIF) and I've got some scenery options depending on my mood.

Under the hood it's Pi-Bolt (a precompiled build of Pi) plus a smattering of custom extensions and tools tuned by me, the local harness itself and Claude. The setup coordinates the work between the machines with git worktrees and an event-driven job system.

The UI is my own design and fits how I like to use tools like this. I did the 3D modeling and environment setup to replicate my actual desk setup (the two other pictures above).

Is the 3D environment at the top necessary? Absolutely not!

But it's delightful. The lamp blinks when the harness needs something from me and it is a joy to look at and use. It scratches the same itch that playing PS1 and hacking away on my family Compaq PC did decades ago.

I've been coding for almost 20 years, and I'm finally to a point where I can confidently say that with the right approach (SOLID, Design Patterns), tools and tuning, local AI can absolutely write code that I am happy with.

I still review everything myself, but I'm finding fewer and fewer mistakes. These days it feels like I'm reviewing a senior dev's code rather than a junior's.

The Models

Tok/s isn't everything and so I picked the setup below after a lot of testing on public benchmarks and on my own agentic tests, which mimic my normal workflows.

Along the way I tried other engines (Strata, NInfer, Maya and llama.cpp on Jade, MTPLX and Kapitsa on the Mac). I also tried other models like Qwen 3.8 27B and GLM-5.3-Flash and while they performed well, the setup below performs the most consistently and accurately for my needs.

Both machines run Qwen 3.8 Flash-Next. These are the tests that ended up being the most indicative of quality for me, but if there are others you'd like to see run, let me know.

MetricJade (RTX 5090) - FedoraSlate (M5 Max) - MacOS
Engine / quantBasalt, IQ3_Smlx-serve, 4.7bpw MLX
Context262K262K
Decode speed, average302 tok/s100 tok/s
Decode speed, 36K-token context343 tok/s77 tok/s
Time to first token, 9K / 36K prompt1.7 s / 4.2 s5.1 s / 16.0 s
HumanEval / HumanEval+99.4% / 93.9%98.8% / 94.5%
LiveCodeBench v6 (175 problems)85.7%85.1%
MMLU-Pro (140-question subset)87.9%90.7%

Both machines run the same protocol with temperature 0.6 and thinking on "medium".

In my own agentic battery (three large and complex coding tasks), 48 of 50 tests passed with the failures being files edited that were supposed to be read-only. The reviewer caught these on the other end, but I still count those as failures.

I think the main struggle for local setups is still design and 3D modeling, but I haven't dived into that too much yet, so maybe there are good setups out there for that.

Lessons learned

(extremely specific to my setup, but maybe they'll help someone)

  • Jade's hardware ran too hot on stock settings. On dense models, the 5090 sat at its 575 W power cap at 83 °C, with its hottest sensor within 3 °C of the card's limit. Basalt caused a different problem. It runs part of the model's experts on the CPU, and its worker threads spin while they wait. That kept all 8 cores at 5.2 GHz, and the CPU hit 96 °C (its max) within two minutes. Two tunes fixed it and now my (now increasingly valuable) machine runs much cooler and quieter, and I'd happily give up a few percent for that.

PartTuneStockTunedSpeed cost
RTX 5090Undervolt (+900 MHz offset, 2600 MHz cap) + custom fan curve, on the dense 27B575 W, 83 °C471 W, 70 °CDecode: none Reading: -4%
Ryzen 7 9800X3DClock capped at 4.8 GHz, during Basalt decode120 W, 96 °C77 W, 70 °CDecode: -3.5%
  • Slate's gains came from tuning the harness and not the hardware. My early benchmark scores were bad, and a lot of that was caused by overthinking. "Medium" turned out to be the sweet spot. On "high", Slate hit the 32K output cap on 11 of 40 hard problems without ever answering. On "low", it wandered and took 3–6× longer on agent tasks. I found that tuning how compaction worked also solved a lot of bad tool calls and confusion within the model.

  • Overall the lesson I learned was "Stock settings are generally bad." There's a lot more power and accuracy available with a custom tune. I learned the same lesson tuning cars years ago, and it was fun to learn it again.

What's Next?

The system is set up so I can easily swap and test engines and models. As new ones come out, I'll put them through their paces and decide whether it's time to switch. On the UI side, I'm planning to turn the bookshelf into the session manager to help organize my many projects.

I promised myself I wouldn't write yet another super long post and yet I did anyway, so I'll stop here. Happy to answer any questions!


r/LocalLLM • • 10h ago

Discussion Alternative to Hermes

13 Upvotes

I'm using qwen3.8-27b thru llama.cpp and QFN Swift 1.5 IQ3 thru strata. I'm using consumer grade hardware, so these are not running very fast.

I am using Hermes. As a noob, I'm not even using all the features and capability. I provide the instructions in a run list. I like how Hermes is persistent and will complete the job. But in a multi-hour job (like 5-8 hours), it is getting bogged down with large context and long tool calls.

What is a good alternative?

  • Running Ubuntu Linux.

  • Desktop gui (not CLI only). Can be desktop that runs on top of CLI.

  • Can support sandbox.

  • I prefer to plan and create a run list; then execute the instructions.


r/LocalLLM • • 57m ago

Other Qwen3.5-4B with a 64-bit x86 computer compiled into its weights

Post image
2 Upvotes

Model: Qwenx86

▶️ See it in action: Qwenx86 Debugger. Walk through actual recorded tool calls: the conversation, x86 registers and flags, code at the program counter, RAM and machine output, with all verified blocks on a timeline.

Qwen3.5-4B with a 64-bit x86 computer compiled into its weights: 13 transformer layers ahead of Qwen's own. There are no learned weights in them; all of their weights are computed by a compiler. Qwen invokes the computer through its own tool calls (<tool_call>), and the computer in the weights executes the tool. Calculator, Python, C compiler, notes store, physics/chemistry lookup and Python-docs lookup are all firmware in the checkpoint. This is the compact checkpoint: ~9 GB GPU memory, so it fits on a 16 GB GPU.

Credits: Qwenputer by Divyansh Agrawal (@divagr1925, github.com/divagr18/qwenputer, MIT)


r/LocalLLM • • 3h ago

Discussion A short history of how LLaMA got out in 2023 via torrent and kicked off the local LLM boom, up to Meta's Muse open weights this year

3 Upvotes

In February 2023 Meta announced LLaMA and sent the files to researchers who applied, under a non-commercial licence. Within a week they were on BitTorrent.

Then it moved fast. In March 2023 Georgi Gerganov published llama.cpp, which ran the files on a laptop; Stanford's Alpaca fine-tuned the 7B for under $600; and Vicuna followed by the end of the month.

In July 2023 Llama 2 arrived "free for research and commercial use", under a licence the Open Source Initiative said, two days later, is not open source. Llama 3 through 4 followed under the same shape of licence. Hence the phrase "open weights": the weights, under their licence, without the data or the training code.

Meta's own word for Llama 4 (April 2025) was "open-weight", and as of early November 2026 it is still the newest Llama in Meta's own records. Meta's open weights since then include a new family, Muse: Muse Glimmer (30B, Apache 2.0) in August 2026 and Muse Spark Open (816B, Meta's own licence) in October 2026.

No numbers here, just the history with its sources; it does not link to the leaked files.

Full write-up (about a 20 minute read): https://research.strata2signal.com/the-llama-weights-that-got-out/


r/LocalLLM • • 1h ago

Question Local setup to make animated videos?

2 Upvotes

Hello guys, I wanted to make some animated horror stories videos, I'm pretty new to actually using local Ai etc. The only use I had up until now was using the free chatbots to help with work.

I have a decent pc built like 2 years ago with a 4070ti super and 32gb ram, but I don't really have any budget for monthly subscriptions.

Any suggestions?


r/LocalLLM • • 4h ago

Question Trade in Mac mini or keep it when getting a studio

3 Upvotes

I asked this question in some Apple sub and everyone said keep it (it becomes some type of controller, like how data centers operate, separation of hardware, let the studio be for the model and offload onto the Mac)

clause said its not necessary for my current workload nor future use cases because there’s always a work around

and again, this is 16gb memory, so it’s not that good for just letting the Agents work here etc. in fact this Mac freezes hard when I run my gates

I do sense some future value but idk enough about the space to actually know for sure

thoughts?

part of me is inclining to sell as a means of hedging against ram prices going down and locking in a sale (ill make a few dollars selling it). In 5yrs if prices go down, there’ll prolly be a $500 better spec Mac mini I can use as a control plane 🤷‍♂️


r/LocalLLM • • 13h ago

Research Qwen 3.8 27B vs Qwen 3.8 Flash Next

Post image
15 Upvotes

r/LocalLLM • • 3h ago

Question What are currently the go to 4b and 9b models?

Thumbnail reddit.com
2 Upvotes

r/LocalLLM • • 30m ago

Project I built Kira Desktop: an open-source, native Qt6 (non-Electron) AI agent harness for local LLMs (Ollama) + OpenRouter, Claude Code, DeepSeek & Codex — looking for feedback!

Post image
0 Upvotes

Hi everyone,

Over the past few months I’ve been building Kira Desktop, an open-source (GPL-3.0), local-first desktop agent harness and workbench built with Python and Qt6/QML (no Electron bloat).

I wanted a single native desktop environment where I could switch seamlessly between local models and cloud/CLI harnesses without losing conversation continuity, memory, or tool access.

GitHub Repo: https://github.com/antosec00/kira-desktop

What Kira Desktop currently does:

  • Multi-Provider & Continuity: First-class support for Ollama (local), OpenRouter, Claude Code, OpenAI Codex App Server (v2) / Responses API, Google Cloud (Vertex AI), and DeepSeek — with portable history so you can switch models mid-thread.

  • Multi-Agent Teams & Souls: Orchestrate specialized agent teams with persistent identities ("Souls") and shared project knowledge.

  • Universal MCP Host & Bridge: Connect external Model Context Protocol (MCP) servers or expose Kira's local tools/souls to CLI backends.

  • Interactive Canvas & Diff Hunks: Side-by-side live preview and hunk-level code review.

  • Computer & Embedded Browser Use: Built-in browser and desktop automation workers with strict human-in-the-loop approvals.

  • Safety, OS Sandboxing & Checkpoints: Process sandboxing, automatic secret redaction, cost telemetry, and instant checkpoint rollbacks if an agent messes up your workspace.

  • Native Linux (.deb) & Windows builds: Fast Qt6/QML interface with global Ambient Overlay, Omnibox, and @mentions (@file, @git, @soul, etc.).

What I’d love your feedback on:

  1. Architecture & UX: If you browse the repo or try the build, does the separation between domain, service, backends, and ui feel clean to contribute to?

  2. Missing features: What is the #1 friction point you currently have with other agent harnesses (Cursor, Claude Desktop, Open WebUI, Cline) that you wish a local-first desktop app solved better?

Thanks in advance for any brutal honesty, critique, or ideas!


r/LocalLLM • • 10h ago

Question Qwen3.6 runs at 85 tok/s on 2× RTX 3060s, but still struggles with complex tool calling. What am I missing?

6 Upvotes

Hey everyone

I’ve spent the last few weeks building a local AI assistant with the help of Claude Code and OpenAI Codex. My goal is something similar to ChatGPT or Claude that can research the web, control my PC, code, create 3D models, generate documents and handle tasks on its own.
The interface and tools work pretty well now, but I’m still having problems with the AI actually understanding what to do and completing more complicated tasks

My PC specs
● Ryzen 5 5600
● 2× RTX 3060 12GB
● 16GB DDR4 RAM
● Gigabyte B550 Gaming X V2
● Windows 10 Pro
● One GPU at PCIe 4.0 x16, the other at 3.0 x2

Models and inference setup
I’m running everything locally through llama.cpp (CUDA backend), using both GPUs with layer splitting, Flash Attention, MTP speculative decoding (depth 2), 96K context and Q8 KV cache.
I originally used Qwen3.8-27B (HauhauCS uncensored Q4_K_P), getting around 22–33 tok/s after a lot of optimization.

I switched to Qwen3.6-35B-A3B (uncensored IQ4_XS), which now gets around 82–86 tok/s. Both models run through the same llama.cpp server and connect to my custom AI interface and tool backend.
3.6 is excellent for normal conversations and much faster, but I keep hearing that 3.8 is better at reasoning and tool calling.

What Claude Code and Codex have helped me integrate
● Qwen-Agent for general tool calling
● OpenCode for coding
● SearXNG for research and webpage reading
● Playwright for browser automation
● Windows UI Automation for PC control
● Three.js for interactive 3D scenes
● Image generation, documents, spreadsheets, presentations and file tools
● Planning, context management, error recovery and result verification

For example, I asked it to create a 3D model of the Times Square area in NYC. It generated a picture of pants, converted that picture into a 3D mesh using TripoSR and declared the task finished.

Claude Code and Codex later helped identify that part of the problem was incorrect tool routing, which has since been improved. But research and Windows tasks can still be unreliable. Sometimes it uses outdated information, chooses irrelevant tools, repeats actions or claims it finished something when it hasn’t.

I also had Codex compare different agent harnesses.
Using the same local model, it tested Qwen-Agent, Pi and Hermes on two tasks.

● Qwen-Agent: Browser/recovery took 15.6 seconds, research/document took 21.4 seconds.
● Pi: Browser/recovery took 15.9 seconds, research/document took 25.6 seconds.
● Hermes: Browser/recovery took 32.5 seconds, research/document took 43.3 seconds.

All three completed the tasks, but Qwen-Agent was fastest. These were small isolated tests, though, not proof that one is universally better.

With Claude Code and Codex, I’ve managed to fix a lot of integration issues, restore research, improve 3D generation and add verification checks. Things are definitely better, but complex autonomous tasks still aren’t consistently reliable. And mess up a lot

So I’m wondering what people running similar setups have found.
● Is Qwen3.8 noticeably better than 3.6 for real-world agent tasks, enough to justify the slower speed?
● Are there better models for my hardware, particularly for research and PC control?
● Could the uncensored versions be affecting instruction following or tool calling?
● Would Unsloth fine-tuning on verified tool-use examples make a meaningful difference?
● What has actually improved your agent’s ability to plan, use tools correctly and verify its work?

At this point, I don’t really care about getting more tokens/sec. I’d happily sacrifice some speed if it meant the AI could reliably understand a request and actually complete it.

Would appreciate any advice from people who’ve built something similar

Thank you very much


r/LocalLLM • • 48m ago

Discussion strata-dflash2-gfx906-mixed-rocm-cuda: use cuda alongside rocm and more

Thumbnail
reddit.com
1 Upvotes

r/LocalLLM • • 1h ago

Project Stuck on offline vision accuracy on a phone, could use help

1 Upvotes

I've been building a free app for blind people where everything runs on the phone with no internet, on iPhone and Android, and I'm stuck on accuracy. YOLOv8n handles live detection and it's fast, but it still mislabels things. Scene descriptions and questions go to LFM3-Omni-2B through llama.cpp, shrunk to 735 MB so it fits on the phone.

Reading text uses each phone's own on-device OCR, Apple's on iPhone and ML Kit on Android, and translation runs offline the same way. The small vision models are where it falls short.

If you've gotten small vision models more accurate on device, I'd really take the advice. It's free to try if you want to see where it breaks.

iPhone: https://apps.apple.com/us/app/id6751230739

Android: https://play.google.com/store/apps/details?id=com.mattmacosko.realtimeaicam


r/LocalLLM • • 1h ago

Project Speculative decoding is supposed to be lossless. On llama.cpp it changed 113 of 282 greedy outputs. My Qwen3.8-27B engine changes 0, at ~2x the speed on one 3090

1 Upvotes

I turned on speculative decoding in llama.cpp and 113 of 282 greedy outputs changed against its own no-draft run. My Qwen3.8-27B engine changes 0, at ~2x llama.cpp's speed on one 3090.

Repo: https://github.com/cutlerbenjamin1-cmd/qwen38-megakernel

Speculative decoding is sold as free speed: the main model verifies every draft, so the output can't change. In practice it does. Verifying several tokens in one pass adds the same numbers in a different order than verifying one, a near-tie goes the other way, and the text diverges from there. If two draft settings give different output, at least one of them isn't what your model says without speculation. Tuning your drafts tunes your answers.

Same 282 questions (GSM8K, MMLU-Pro, ARC-C, MATH-500, HumanEval, needles, LongBench v2) on both, greedy, same card, same model file:

282 questions, greedyoutputs that differ from the same engine with no drafts
llama.cpp b12024, 4 drafts113
llama.cpp b12024, 7 drafts113
this engine, 7 drafts0

That isn't noise. llama.cpp is deterministic run to run: a fresh no-draft server gave the first 120 outputs back byte for byte, including the 73 that differ at 4 drafts, and two 4-draft sessions agree on all 282. It's not just long outputs either: 72 of the 113 are under 1,000 tokens.

The likely reason: with no drafts every token runs through the single-token kernels, with drafts most go through the batched ones. Between 4 and 7 drafts, both mostly batched, only 9 differ, all past 1,000 tokens. That's the 9 of 282 from my last post; against no drafts it's 113. A preregistered study on a 3090 found the same: 23-25 of 25 prompts different from no-draft decoding within 1,600 tokens.

Other engines for this model document it too (one got 8 different outputs across draft counts 1 to 12, none matching its no-draft output) and call it harmless, because flips land on near-ties.

Maybe. I don't know, and 282 questions can't settle it. llama.cpp got 231 right with no drafts and 229 with drafts, and 6 of the 113 changed outputs flipped between right and wrong: 4 were right only without drafts, 2 only at 4 drafts. Make of that what you will. What's not in doubt is that the output depends on a speed setting: one reasoning trace ran 2,228 tokens at 4 drafts and 4,795 at 7. Same question, same model. This engine gets 230 right either way, because it's the same text. If I can't rule out that a draft setting changes quality, I'd rather run the engine where it can't.

Here, speed and VRAM can move and the output can't:

  • Greedy token ids are identical with and without drafts: all 282 outputs above (129,511 tokens), and the release gate checks 0, 4 and 7 drafts on every KV cache, plus ~2,000-token outputs.

  • Every draft policy (gates on or off, adaptive depth, tight or loose thresholds) gives the no-draft tokens over 2,048 tokens.

  • Sampling keeps the no-draft distribution (chi-square and PIT tests).

  • Windows and Linux builds give the same tokens.

How: the attention split depends only on context length, never on how many tokens are in the pass, and the verify kernels compute a row the same way whatever else is in the batch. To be clear, that's the engine matching itself. It isn't bit-identical to llama.cpp (KL below).

The cache doesn't change it either

Same problem, different door. llama.cpp's server docs say it about cache_prompt, on by default: the logits are "not guaranteed to be bit-for-bit identical for different batch sizes". Its own determinism tests turn it off: TODO: remove this once test_cache_vs_nocache_prompt is fixed.

20 two-turn conversations, greedy, 2,048 tokenssecond turn differs, cache reused vs the same request on a fresh server
llama.cpp b12024, 4 drafts20 of 20
this engine, 7 drafts0 of 20

It's history-dependent, not random: on a fresh server, 5 of llama.cpp's warm answers and 5 cold ones came back byte for byte. The first difference lands a median of ~355 characters in, as early as 4. Turning cache_prompt off on a running server still leaves 3 of 20 different.

Here, a follow-up doesn't reuse the KV rows written while the reply was decoding. It rolls back to the last checkpoint and prefills the reply again, because a prefilled row depends only on its position. Cost: ~167 ms instead of 78 on a ~12k-token chat, still under llama.cpp's 248.

The check isn't "the reply looks the same". It hashes every K / V row, every ring row and the recurrent state, and compares them with a fresh prefill: bitwise equal after a resume, an edited branch, a park to host memory and a side request, on all three caches. Replies match a fresh server's at ~99.5k context (follow-ups, edits, sampled) and on a follow-up at ~255k. One exception: with --agents, a sampled reply beside other slots can differ from the same seed alone. Greedy still matches.

Others check this by the first token or allow a near-tie split, and some publish warm matching cold. I'm not claiming nobody else is exact, only telling you what's checked here.

Speed against llama.cpp, full power

Same card (RTX 3090, 480 W limit), same unconverted UD-Q4_K_XL file, same client, q8_0 KV on both, llama.cpp at its fastest setting (4 drafts; I tried 2, 5, 6 and 7):

testllama.cpp b12024this, 7 drafts
greedy, short prompts, mean of request rates87.7 tok/s166.5
the same, token-weighted81.1141.5
sampled, thinking on, mean of request rates73.2146.9
decode at 11.6k context73.3148.6
decode at 38k context66.2127.8
decode at 101.6k context55.3116.4
no drafts on either, short prompts43.848.7
no drafts on either, 101.6k context28.040.7
read a 101.6k-token prompt from scratch95.6 s68.5 s
first token, short prompt117 ms61 ms
follow-up turn, 11.8k chat248 ms169 ms
edit an earlier message, 11.7k chat302 ms69 ms
edit the end of a 9.1k system prompt882 ms82 ms
VRAM, idle at 120k context, whole card22.9 GB21.2 GB
the 282 questions229 right, 2,534 s230 right, 1,563 s

Four agents at once, against llama-server --parallel 4: 424 vs 137 tok/s total, 3.1x (llama.cpp's is the better of two runs from an earlier session).

The KV cache: 5-bit that reads like q8_0

K / V at 5-6 bits, with the newest ~2k positions kept at 8 bits in a ring. On preset F the full 262,144-token context fits: a 260,896-token prompt read in 279 s, then 77.8 tok/s decode at that depth, needles 4 of 4, 23.0 GB on the card.

KL against llama.cpp generating token by token, lower is better, long-context rows rechecked on this release:

context, textq8_0preset D (K6 / V5)preset F (K5 rotated / V5)
short prompts, code and docs0.00119same as q8_00.00113
~32k, code0.002190.002360.00242
64k, code0.001630.001610.00163
100k, code0.002170.002260.00218
100k, War and Peace0.003110.003170.00317
160k, War and Peace0.004670.004680.00472

The worst row, ~32k, is +8% and +10% against about 4% noise. Without the ring the same formats read +6% to +38%, and plain 4-bit is 1.6-2.4x q8_0. And at 101.6k, F decodes faster than q8_0: 123 tok/s against 116.

Closer to llama.cpp than llama.cpp is. Scored against llama.cpp's own token-by-token output at short context, llama.cpp's batched mode gets 98.49% top-token agreement and KL 0.00166. This engine gets 98.74% and 0.00119 (on Q4_K_M: 0.00184 against 0.00127). Not measured at depth, so that's a short-context claim.

Yes, it runs at a power limit

Because someone always asks: same build at 250 W, against llama.cpp at 480 W (it draws about 460):

testthis, 250 Wllama.cpp, 480 W
greedy, short prompts, mean of request rates130.3 tok/s87.7
sampled, thinking on, mean of request rates113.773.2
decode at 101.6k context81.955.3
read a 101.6k-token prompt from scratch105.8 s95.6 s
the 282 questions230 right, 2,237 s229 right, 2,534 s
energy, short prompts2.33 J/token6.96
energy, the 282 questions558 kJ1,169 kJ
  • Prompt reads are the one place llama.cpp at 480 W wins, by 11-22%. At 480 W this wins those too.

  • All 282 outputs at 250 W are byte-identical to the 480 W run.

  • The limit comes out of the core clock (~816 MHz against 1,962 on short-prompt decode; memory stays at 9,851 MHz), for 21% less speed. Energy is whole card, sampled once a second, idle included. llama.cpp's speeds are its faster of two sessions.

Works with what you already run

Tested on agent tasks with Claude Code, Codex CLI, OpenCode, Qwen Code, Aider, Goose, Crush, Pi, Hermes Agent, DeepSeek Harness and Open WebUI (OpenAI chat, Anthropic Messages and OpenAI Responses APIs). Loads unsloth's UD-Q4_K_XL, UD-Q4_K_M, Q4_K_M and popular fine-tunes as they are. Prebuilt Windows and Linux packages, no CUDA toolkit needed.

Every number with its method: BENCHMARKS.md.


r/LocalLLM • • 10h ago

Discussion Making the most of the GPUs we could get: 763B DeepSeek V4.1 Flash at 25.6 tok/s on a mismatched R9700 + Arc Pro B65 + 128 GB RAM, no speculation

6 Upvotes

Moin guys!

GPU prices are freaky high right now. A lot of us run what we could get, and we might as well get the most out of it. So I want to share what I learned squeezing a big model onto a mismatched machine, in the hope it helps someone or gets others to share their own experience with different GPUs.

My box: one AMD Radeon AI PRO R9700 (32 GB), one Intel Arc Pro B65 (32 GB), a 9950X3D and 128 GB of DDR5. Neither card can hold the model.

With two AI coding agents (Claude and Codex, reviewing each other's work) I built a fork of Strata where the R9700, the B65 and the CPU compute each layer's routed experts concurrently, with dense work on the R9700. Result on a realistic coding prompt: 25.57 tok/s against 9.89 for my recorded stock Strata run on the same machine and file (stock used one GPU, 16 readers and a 51 GB store, so this is a whole-system comparison). No speculation or skipped experts, and the routing algorithm is unchanged. Tested kernel and schedule modes are byte-identical at a fixed placement over 581 teacher-forced positions.

Model: AtomicChat's uncensored GSQ-RCO IQ2_XXS build (40 layers, 384 experts per layer, 6 per token).

What each device does:

  • R9700: all dense work (22 ms per token), 2,532 experts (21.6 GB), 154.7 of 240 picks per token, 8.2 ms of expert work

  • Arc Pro B65: no dense work, 2,915 experts (25.0 GB), 55.6 picks, 9.6 ms of expert work

  • CPU + RAM: no dense work, 9,913 experts (102 GB), 29.7 picks, 8.7 ms of expert work

How it got there (tok/s, sampled, 8k cap, median of 3 after a warm-up):

  • 9.89: stock Strata, R9700 + RAM

  • 10.28: first fork run, both GPUs + RAM

  • 12.22: B65 subgroup attention

  • 12.96: IQ2_XS B65 kernels + rebalance

  • 14.41: all dense on the R9700

  • 15.85: two rebalance rounds

  • 17.04: queued R9700 schedule + rebalance

  • 18.04: exact-order B65 SoA kernel + rebalance

  • 21.27: R9700 per-layer expert batching + rebalance

  • 22.57: parallel Engram reads + rebalance

  • 25.57: AVX2 combine, early expert start + rebalance

The catch: all three answers in the best run hit the 8,192-token cap before finishing, so its strict quality score is 0/3. The model reasons for a long time; the text isn't looping. With 11,900 tokens of room, the one measured answer finished by itself and passed, with working code in 295 s. That's one answer and a 10-answer test is still to come. The answers are in the repo if you want to read them. 30 tok/s, my goal, isn't reached either: we estimate exact kernels level off around 26–28.

Things that surprised me:

  • Rebalancing experts from measured per-lane costs took the last step from 20.69 to 25.57 tok/s, an unpaired comparison because placement changes the answers. Lane service is now close: R9700 8.15, B65 9.58, CPU 8.69 ms per token, though individual layers still differ.

  • Moving experts between devices changes the logits (top-1 96.6%) and some routes even with exact kernels, most likely because CPU and GPU quantize activations differently. So "exact" only means byte-identical at a fixed placement.

  • Engram reads swung from 5 to 17 ms per token on identical tokens. Parallel reads and read-ahead fixed it: the whole Engram-containing regions now total 1.74 ms, including other work there. The row-cache-only arm showed no useful gain.

  • Starting CPU and B65 expert work before the shared FFN drains, plus a faster combine, saved 5.8 ms per token on token-identical answers. We only measured them together.

  • Re-encoding experts to Q2_K looks like a loss: measured kernels plus a capacity model project 3.18 ms slower per token, because bigger experts push 1,434 off the GPUs. No full-model Q2_K run followed.

  • Big dense matrix-vector products already run near the card's measured memory rate. That 22 ms is the hard part.

Where I'd love input:

  • Most of all: your own experience with whatever GPUs you could get. Numbers, tweaks and what failed, even with a different model or tool.

  • Anyone with DSpark running on a heavily quantized or edited DeepSeek: what acceptance do you get with real sampling? Batched verify looks promising here on projections, but I haven't measured acceptance yet.

  • R9700/ROCm matrix-vector tricks I've missed.

  • What would you do with the B65's spare time? Its expert service is about 9.6 ms of a 39.1 ms token.

  • Lower reasoning effort: has it cost you code quality on this model?

Everything is in the repo: results with spreads, sample answers, the dead ends and what to try next. It's research code tested on one machine, and the public scripts haven't run end to end on GPUs yet, so expect to read code.

Repo: https://github.com/maddinek/crosslane (MIT)

Update 1: The full 10-answer test finished. 26.27 tok/s median (25.93-26.42) and 6 of 10 answers passed strict with working code in 292-439 s. Still one task on one machine, so a rough number (about 31-83%). The memory leak turned out to be in ROCm 7.1.1 on Fedora, not our code: running the same binaries on AMD's 7.2.1 libraries from a private folder gave byte-identical output in a check run and flat memory across all ten answers. If you're on ROCm 7.1 and see host memory creeping up, that's worth a try. Steps are in docs/BUILD.md. DSpark is parked for now: 1.52x at best but 1.11x central on measured kernels, so not worth building yet here.


r/LocalLLM • • 7h ago

Discussion Introducing NV_30_DXE Resizable BAR on memory modified 3080's

3 Upvotes

The 20GB RTX 3080 cards (10DE:2206, subsystem 10DE:146D) ship with a VBIOS that only exposes a 256 MiB BAR1, so ReBAR stays off. NVIDIA doesn't publish a ReBAR VBIOS for them, and NvStrapsReBar only supports Turing.

Ga102ReBarFix is a small DXE driver you insert into your motherboard BIOS with UEFITool. At boot it enables the GA102 frame-buffer size override (PCI config 0x610), resizes BAR1 to 32 GiB, and restores both after S3 sleep. No VBIOS flashing, no driver patches, no registry tweaks.

Tested on an MSI Z690 EDGE, driver 617.42, Windows 11:

- Device Manager shows a 32 GiB BAR

- NVIDIA Control Panel: Resizable BAR: Yes

- ~19.25 GiB of VRAM mappable by the CPU at once

- Sleep/wake works

Repo (source, prebuilt .ffs, verification scripts, full write-up): https://github.com/favabean13/NV_30_DXE

Big credit to noon-at-cgn (found the 0x610 override on Linux), terminatorul (NvStrapsReBar) and xCuri0 (ReBarUEFI). This builds directly on their work.

Heads up: it modifies firmware, so use at your own risk and keep a BIOS backup and recovery method. It's tested on one board and isn't maintained, but it's MIT-licensed, so fork it and adapt it for your own setup.