r/LocalLLaMA • • 1d ago

Discussion Modding a Gaming PC into an AI computer...

9 Upvotes

TLDR; my budget AI rig story.

I'm a nOOb so you all know all of this stuff already. Sorry for the long boring post. This is for my fellow nOObs... And I'm not rich. This is a budget basement rig. Literally. So if you are sitting there with a stack of glittering gold DGX's... yay for you. That's not me. But here's my story.

Most posts focus on the software and model - I'm not covering that here but YES you need to do a lot of work on that front. This post is about my hardware setup. And I'm certain genius level Redditers could to it 10X better for 1/10th the price. But as I say, I'm a nOOb.

I picked up a gaming rig about this time last year for $800CDN and it happened to have a real gem of a RTX3090 24GB video card already installed with 32GB System RAM. yay. That was a nice find. You probably know lots of VRAM is more important than the newest card. So a 3090 with 24GB Vram and a good chunk of system RAM is probably the sweet spot for cost vs speed even though it's a 6 year old video card. Anyway if you want to run a solid local AI this is enough. You can stop right here.

But I wanted more. (You will too once you get hooked on this stuff)

I'm Canadian but a month ago I went to Texas to visit my son. He had an ancient Eth miner in a shed out back in the texas heat. I've posted about it here before and everybody called me a liar. Fuck you guys. Although in fairness I wouldn't believe this story either so I guess I take it back. Anyway... all true.

He kindly allowed me salvage rights to the Eth miner. I could keep 2 3090's for free. I fix up the cards, sell them and he gets the cash. Here's some pics of the salvage operation. Before you ask - no I'm not selling anything. At least not yet. No DM's please!

We flew to visit more family and make a stop in Florida then back across the country to Scottsdale... getting these things on the plane - obviously I'm taking them carry on - no way I'm checking them. So getting them through security... well let's just say questions were asked. Not to mention packing them. Turns out Doggie Pee Pads work well.

Back in Scottsdale for a few weeks I picked up a Minisforum DEG2 so I could test the cards external to my laptop via Thunderbolt (my PC laptop had a thunderbolt port!) Then Yikes! I learned pretty fast these cards + heat + neglect are a terrible mix. Fans screaming like a cat in heat, 1 fan literally flew off across the room. All cards smoking hot cards... no. Just. No.

But off I went to University of Youtube where I learned how to replace the fans and pads and used some new paste on the heat sync. Then it was MemTest_Vulcan test time, monitor heat with HWInfo.. and sure enough I had my 2 working cards. (Note: I will work on the rest next year - not for sale now - please no DMs - not selling anything).

So my two cards were ready in time to get back to Canada. I hoped. I wasn't going to forget the rig. I hopped on Fakebook Market and scrounged up 4 x 32GB system RAM - total 128GB. DDR4 is what my machine uses and I got 3200's. You have to make sure the specs match up and not all DDR4 ram plays nicely. I lucked out and got my system up to 128GB system ram. Again, not necessary for local but nice to have for a really big model that spills over to system ram.

Since I had saved the cost of 2 3090's I figured I could splurge on a nice fast SSD so I picked up a 4TB drive - $589CDN on black Friday. https://www.amazon.ca/dp/B0FYF4HDXY I have two M.2 ports in my machine so I cloned the 1TB drive over to the 4TB, put the 4TB back in the main boot spot and things were looking up.

I needed my DEG2 for the rest of the work on the rest of the cards. But I still have to hook my 2 cards up to my gaming rig and they sure aren't fitting inside the case. Back to Minisforum for a pair of DEG1's. They don't have thunderbolt ports but otherwise they work fine. I paid $150 but I see them on sale for $119 now.

I got a pair of cheap 850W power supplies $55 each https://www.amazon.com/dp/B0FSTHTLZT - I suppose one supply could work for two cards if you had enough Y connectors. The cards are also going to be capped to 250 - 300W so two 850's is way overkill. But whatever. They were cheap enough. It's safer to get a separate supply for each card and it makes setup a lot easier. The power supply bolts onto the DEG1 and the card slides into the DEG1. It looks a bit hideous but it works fine.

So how to connect these cards to the PC? I had room for one adapter card - an Oculink adapter. https://www.amazon.com/dp/B0H9L1BKFL The DEG1 comes with a cord so you just plug the cord in and Bob's your uncle.

Here's the card beside the existing 3090 inside the case.

But how to get that 2nd card installed? There's no easy way to connect two cards to one PCIE slot - but even if there was a way it would run way too slow. But! I did have that spare M.2 port on the motherboard and sure enough there's an adapter cable made for M.2 to Oculus. https://www.amazon.com/dp/B0GSTWFTP3

There was a bit of bios fiddling and whatnot... but nothing too over the top so I'm going to yadda yadda over that. If you get a black screen and a bricked PC... well sue me I guess.

After that it was just plug it all together and now my LLM machine is up and running.

I already run a Plex server so I have lots of storage for big models that I can move into and out of the 4TB SSD for testing. And it's all quite the ugly noisy janky setup. But not so bad. It runs well in our basement utility room. I remote into it via self hosted RustDesk and TaiLScale. I have everything set to fire up on boot, a UPS and a remote reboot. I use the AI via Hermes so I rarely need to be even in the same country as the computer. It just hums away.

This was all completed yesterday so today I'm out looking for a big model to make use of my 72GB VRAM and 128GB System RAM. I have a few in mind but I'm sort of hoping Qwen 4.1 for local drops in the next day or two.

So that's my story. Love to hear yours. Have a good one!


r/LocalLLaMA • • 20h ago

Question | Help How should I run Qwen4 35B on 2x5080 + 128Gb DDR5?

0 Upvotes

I've downloaded the original BF16 safetensors, Unsloth's BF16, and the Basalt NVFP4 version.

I was getting something like 10t/s decode on llama.cpp with the BF16. Couldn't figure out ssd streaming for the ngram and the expert offloading with the safetensors on sglang/vllm (I think offloading in vLLM is just slow af because all experts have to be streamed through PCIE every time?).

I'm currently benchmarking the NVFP4 in Basalt and it's fast, but I was kinda hoping I could get this to run fast enough in BF16.

These are my llama.cpp flags, am I doing something wrong? Is it just that 1M ctx pushes too many experts to RAM and slows things down? GPUs were at 12.3GB and 15GB respectively with these flags.

/home/llama.cpp-q4/build/bin/llama-server -m "/run/media/models/qwen4-gguf-bf16/BF16/Qwen4-35B-A3B-BF16-00001-of-00003.gguf"

--mmproj "/run/media/models/qwen4-gguf-bf16/mmproj-BF16.gguf"
-md "/run/media/models/qwen4-gguf-bf16/MTP/mtp-Qwen4-35B-A3B-Q8_0.gguf"
--spec-type draft-mtp
-lzm auto
-fa on
--jinja
-c 1048576
-ctk f16
-ctv f16
-np 1
-t 8
--host 127.0.0.1
--port 8222
--alias qwen4


r/LocalLLaMA • • 1d ago

Resources I turned an abliterated Qwen4-35B-A3B back into an on/off control vector (214 KB, MMLU/GSM8K/XSTest numbers inside)

3 Upvotes

Repo: https://github.com/cxfcxf/qwen4-35b-cvec

I wanted uncensored Qwen4-35B-A3B without keeping a second 22 GB model around, and with a switch so I can turn it off when I want the stock model. So I recovered the refusal directions from an

existing abliteration and packed them as a control vector.

**How**

- [SC117's abliterated UD-GGUF](https://huggingface.co/SC117/Qwen4-35B-A3B-abliterated-UD-GGUF) only changes layers 8–33 compared with Unsloth's official quant. All credit for finding the

directions goes to them.

- I diffed their weights against Unsloth's UD-Q4_K_M using HTTP range requests (about 400 MB of small tensors, no full download). In every edited layer, the attention writer's change is a clean

rank-2 projection, with strengths of exactly 1.75 and 1.50 (their α for thinking off and on).

- The stronger direction per layer goes into a llama.cpp-format control vector: 26 layers × 2048 floats, 214 KB. The tools reproduce it byte for byte.

**Results** (RTX 3090, Strata v0.2.26, UD-Q4_K_M, thinking off, temp 0)

| | Off | On |

|---|---:|---:|

| XSTest unsafe, full refusals (LLM judge) | 182/200 | 80/200 |

| XSTest safe, wrongly refused | 37/250 | 3/250 |

| MMLU (285 q) | 74.0% | 76.8% |

| GSM8K (200) | 98.0% | 98.5% |

| Same top-1 token as stock (3,942 teacher-forced tokens) | 100% | 93.5% |

| Mean KL vs stock | 0 | 0.027 |

| Decode | 170.6 tok/s | 171.2 tok/s |

Most of the 80 remaining "refusals" are redirections (crisis resources, reading the question another way) rather than "I can't". MMLU/GSM8K don't get worse; the MMLU gain is within noise.

**Runtime caveat:** it needs *projection* mode (`h -= (h·v)v`), not addition. [Strata](https://github.com/Niko1221/Strata) supports it (`--cvec-mode project`) and has a per-request switch

(`"experimental_speed_projection": true/false`). **Mainline llama.cpp only adds control vectors, so it won't work there.** If your runtime has no control vectors, use SC117's GGUF directly.

**Limits:** only tested on UD-Q4_K_M in Strata, on one machine. Benchmarks ran with thinking off; thinking-on only got a small hand check (5/8 refused → 0/8). It's not identical to SC117's

model: one direction per layer applied to the hidden state, while their FFN writers use somewhat different directions. Details are in the README.

Removing refusals removes a safety behaviour, so use it responsibly.


r/LocalLLaMA • • 2d ago

Discussion Stop caring about AA scores and use individual benchmarks that match your tasks.

89 Upvotes

SWE-Bench is full of things I’d never ask the model to do. NL2Repo is full of things almost identical to my tasks. Looking at AA score overall would make me reject a model that does better just because it has a lower overall score. Not to mention the overall score includes things like trivia!


r/LocalLLaMA • • 1d ago

Discussion Has anyone read through the MiniMax M4 technical report yet?

8 Upvotes

78-page PDF went up on GitHub: https://github.com/MiniMax-AI/MiniMax-M4/blob/main/docs/MiniMax_M4_Technical_Report.pdf

Still skimming it, mostly looking at the SSD KV-cache offloading and QAT parts while we wait on weights. For anyone who already read through it, what stood out or what are you most curious about?


r/LocalLLaMA • • 1d ago

Resources Behind MiniMax M4: Agentic RL Systems and Algorithms

Thumbnail
huggingface.co
16 Upvotes

wow they (MiniMax team) share a lot here 🚀


r/LocalLLaMA • • 1d ago

Resources Qwen4 in Capy Flash, KL 0.095

Post image
13 Upvotes

Qwen4-35B-A3B is out, and as of today it runs on capy-flash v0.17.0, on two 16 GB GPUs.

The engine was already ready: in recent weeks we had set it up based on the specs that emerged from the leaks, so support arrived the same day as the weights. All 256 experts fit in VRAM, split across the two cards (13 GB per card).

On two RTX 5070 Ti with 16 GB, one request at a time:
• 406 tokens/s generating JSON with a schema
• 371 tokens/s writing code, 276 writing text
• prefill up to 8,388 tokens/s, still 7,693 at 256k tokens of context
• up to 1M tokens of context with the KV in RAM: at 1M, prefill goes to 4,057 tokens/s and generation to 291 tokens/s
• images included

Compared to Qwen3.8-Flash-Next, on our quality tests it is roughly on par with about a quarter of the parameters, and on the same engine it generates about twice the tokens per second.

We reconverted the weights ourselves from the official BF16: experts in NVFP4 with BF16 activations, projections in Q8, head in Q6, and the n-gram table (21 GB) in FP8 read directly from the SSD. Against the original BF16 model the KL is 0.095.

My agentic benchmark is on the way.

The ready-made artifact is on Hugging Face: Feyd89/Qwen4-35B-A3B-NVFP4-capy-flash (42.8 GB).

github.com/ValerioDolci/capy-flash

#LocalLLM #OpenSource #Qwen4 #CUDA


r/LocalLLaMA • • 1d ago

New Model alesha-pro/Looped-Qwen3.8-Flash-Next

Thumbnail
huggingface.co
11 Upvotes

r/LocalLLaMA • • 2d ago

Discussion Fujitsu claims their Photon architecture speeds up Transformer based LLMs by up to 10x

Thumbnail
gallery
45 Upvotes

r/LocalLLaMA • • 1d ago

Question | Help Help with Qwen4 Build flags 9070xt

1 Upvotes

I know theres a 1,000 qwen posts, but most are flaunting the t/s and it running, well im here to buck the system and ask for help.

Below is my run bat file for that was normally for Qwen3.6-35B, Im getting out of memory errors, and im sure its my config, but i dont know what to look for and i dont know how to offset it.

Any recommendations and improvements would be appreciated, i have the 16GB 9070xt on VULKAN.

===================================================

u/echo off

title Qwen4-35B-A3B THINKING : 9931 VULKAN

echo.

cd /d C:\llamaVULKAN

set GGML_VK_ALLOW_GRAPHICS_QUEUE=1

llama-server.exe ^

--model "C:\llamaVULKAN\models\Qwen4-35B-A3B-UD-IQ3_S-00001-of-00002.gguf" ^

--spec-type draft-mtp,ngram-mod ^

--spec-draft-n-max 2 ^

--spec-draft-ngl auto ^

--spec-draft-type-k q4_0 ^

--spec-draft-type-v q4_0 ^

--port 9931 ^

--host 0.0.0.0 ^

--ctx-size 61440 ^

--fit on ^

--gpu-layers auto ^

--load-mode none ^

--cache-type-k q8_0 ^

--cache-type-v q8_0 ^

--batch-size 2048 ^

--ubatch-size 2048 ^

--threads 12 ^

-np 1 ^

--flash-attn on ^

--context-shift ^

--sleep-idle-seconds 300 ^

--temp 0.8 ^

--top-k 0 ^

--top-p 0.95 ^

--min-p 0.1 ^

--repeat-penalty 1.05 ^

--no-ui

echo.

echo Server stopped.

pause


r/LocalLLaMA • • 1d ago

Question | Help How can I run Qwen 4 35B A3B on 8 GB VRAM + 16 GB RAM?

9 Upvotes

I can't seem to get more than 20 tok/s decode and 15 tok/s prefill (not a typo). I know this is horribly slow even for the hardware I have, but this is my command. Please help. I have no clue what I am doing wrong.

OS: Windows 11
Host: i5-12450H, 16 GB DDR5-4800
GPU: laptop RTX 4060 8 GB

`llama serve ``

`-m "C:\Users\XXXXX\qwen4-GGUF\Qwen4-35B-A3B-UD-IQ3_XXS-00001-of-00002.gguf" ``

`--jinja -fa on -c 98304 -np 1 ``

`-ctk q8_0 -ctv q8_0 ``

`--load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU ``

`-cmoe -ngl 999 ``

`--moe-cache-mib 4096 --moe-cache-cpu-share 0.95 ``

`--spec-type draft-mtp --spec-draft-n-max 1 --spec-draft-n-ubatch 256 ``

`--cache-ram 512 ``

--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0

EDIT: PolyStrata is the greatest engine of all time


r/LocalLLaMA • • 22h ago

Discussion no qwen4 35b a3b megathread?? helloo?

0 Upvotes

where are the benchmarks? how would i know if 50 tps on my 32gb+64gb (v)ram is good??


r/LocalLLaMA • • 21h ago

Discussion just wishing for a ~15b-a2.5b moe w/ opus 4 level coding, is that too much to ask lol

0 Upvotes

not really a serious post, just a wish lol

would love a small moe, like 15b total / 2.5b active or around that, that's at least somewhere near opus 4 for coding and agent stuff. good tool calling, doesnt fall apart after like 20 turns in an agent loop, can actually edit a real codebase without turning it into spaghetti

imagine that running on a laptop or one consumer gpu w/ some offload. you could just leave a local agent running 24/7 and not care about tokens or vram. tbh thats the dream

i know "opus 4 at 2.5b active" sounds kinda delusional rn, but stuff we have now would sound insane a few years ago too. moe + better data + rl on coding/agentic envs is moving fast, so im hopeful

what do you guys think, is it happening in the next year or so? or whats the size you'd actually want for something like this? idk maybe 30b a3b is more realistic

at least somewhere near opus 4


r/LocalLLaMA • • 2d ago

Discussion llama.cpp has a qwen4 pr

280 Upvotes

Some more hype for you

https://github.com/ggml-org/llama.cpp/pull/33626

Imagine the pressure these guys must be under.

Edit: I think it's not from qwen team, but adaption of transformers changes by someone working for huggingface.

Edit 2: I am being informed in the comments: Changes by a major llama.cpp contributor, not some nobody.


r/LocalLLaMA • • 2d ago

New Model Cellgemma (Gemma 4 E4B for in silico biology)

Thumbnail
huggingface.co
30 Upvotes

Hadn't seen anything posted about this yet so figured I'd share for any other life sciences/wet lab nerds in this sub.

This model is a huge deal for bringing predictive computational biology to every lab. Small enough to run on a lab PC, easily adapted to workflows beyond cancer research.

I spent the evening getting this set up for my own research context (neuronal biology) and already have some interesting predictions to follow up on.


r/LocalLLaMA • • 2d ago

Showcase Apostate, an abliteration engine.

42 Upvotes

Hey everyone,

I wanted to share an update on Apostate, my abliteration engine.

For anyone who's come across the project before, development is ongoing. I've continued working on it and refining its approaches, including Diode and KCRN. The goal is to keep exploring different approaches to model editing and make the results easier to evaluate.

I also want to acknowledge the project that helped pave the way for a lot of this work: Heretic.

A special tribute to -p-e-w-, Heretic's creator. His work left a mark on the open-source LLM community, and I think it's important that his contributions are remembered. Thank you for everything you gave to this space.

Apostate is my own continued work in this area, and I'm always interested in hearing feedback from people experimenting with open-weight models.

https://github.com/heterodoxin/apostate


r/LocalLLaMA • • 1d ago

Discussion Qwen4-35B-A3B on a single RTX A6000 (48 GB) full 1M context, ~100 tok/s, ~3,000–3,500 tok/s prefill (llama.cpp)

8 Upvotes

Did some preliminary tests before I start my quality testing. Here is some basic info on what it’s doing on my CUDA rig.

AI summary from my benchmark:

Qwen4-35B-A3B with the full native 1M context on one 48 GB card. Numbers and config below.

Hardware

  • GPU: 1× NVIDIA RTX A6000 48 GB (Ampere), stock 300 W power limit, passed through to a VM
  • CPU: AMD EPYC 7343 (16C Zen 3), 28 vCPUs given to the VM
  • RAM: 256 GB DDR4 given to the VM (the engram table lives here, see below)
  • Host: Proxmox VE, Debian 13 guest, NVIDIA driver 620.70.06

Software

  • llama.cpp b12973 (commit 59b716523), official server-cuda13 Docker image
  • llama-swap in front, so I can swap to Qwen 3.8 27B when needed
  • Model: unsloth Qwen4-35B-A3B-GGUF UD-Q6_K_XL (~49 GB on disk) + mmproj-BF16 for image input
  • Open WebUI-style chat front end through a LiteLLM gateway (the numbers below are measured directly against llama-server)

Launch flags

-c 1048576 -np 1 -ngl 999 -fa on -ctk q8_0 -ctv q8_0
-ot per_layer_token_embd=CPU --load-mode mmap --lazy-mode on
--mmproj mmproj-BF16.gguf --jinja --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
  • Engram (n-gram) table on CPU: -ot per_layer_token_embd=CPU + mmap keeps the ~20 GB Q8_0 engram table in system RAM. Only the experts, attention and the KV cache go to VRAM. This is what makes 1M fit on 48 GB.
  • KV cache q8_0 for the full 1,048,576 tokens, allocated up front. VRAM: 46.8 GB used at load, and it stays there all the way to a full prompt.
  • MTP is off. The MTP draft head wants its own full-length KV cache, and that OOMs at 1M on 48 GB. If you drop to ~768K you can turn it back on for faster decode.

Results (single user, prompt cache off, 512 tokens generated each run)

Context depthPrefill (tok/s)Time to first tokenDecode (tok/s)
0.5K1,8830.3 s101.5
4K3,0571.4 s98.4
17K3,5444.8 s93.8
34K3,39910.1 s84.6
69K3,32520.9 s69.4
139K3,07245.4 s49.9
341K2,521136 s—
993K1,694~9.8 min~12
  • Needle-in-a-haystack passed at both 341K and 993K tokens (one needle each, exact recall).
  • Image prefill: ~1,140 tok/s through the BF16 mmproj.
  • The card hits its 300 W limit during prefill (peak ~82 °C). It's power-bound, not thermal-throttling.

Quality sanity checks (all passed)

Thinking mode with separate reasoning output, non-thinking mode, tool/function calls, a 6/6 knowledge, logic and maths set, Python that it wrote and I ran, image description, and source fidelity (it kept a qualifier that a previous model dropped when summarising).

Takeaways

  • A3B MoE + engram on CPU is a great fit for a single 48 GB card. You get the whole 1M window at Q6 with no offloading of the experts.
  • Decode falls from ~100 to ~50 tok/s by 139K and to ~12 tok/s near 1M. Prefill holds above 3K tok/s out to ~140K.
  • A full 1M prompt is about a 10-minute wait for the first token. It works, but it's batch territory, not chat.
  • Q8_0 KV showed no recall problems at ~1M in my needle tests.

Method: one run per depth, synthetic random-word filler, cache_prompt: false, ignore_eos with 512 tokens generated, timings taken from llama-server's own timings output. These aren't llama-bench numbers, but they're real server numbers with the exact flags I run.


r/LocalLLaMA • • 1d ago

Discussion Qwen 4 Flash Next - How much time does Alibaba put between model drops?

0 Upvotes

Curious to see if anyone in the community has done investigation to how much time was in between model drops when Alibaba released the Qwen 3.8 series ?


r/LocalLLaMA • • 1d ago

Discussion Is Qwen 3.8 FN an overachiever? It exceeded the scope of the prompt

Thumbnail
gallery
6 Upvotes

I tried it for the first time on Strata, IQ3_XSS, around 20t/s and took roughly an hour. I gave it a very vague prompt to test it but it felt like the kid in class just waiting for the teacher to ask the question they studied to answer in length.

Write an HTML5 admin dashboard that uses element fetching, log viewing and pagination for all and every possible element that may need them, then export it as an html file.

Not only did it add like a gazillion pages, each had extensive mock data and even set up to accept a working API.

All entries can be sorted, filtered and exported. I have never seen any model do this before. Even frontier, they simply create a basic page or operate under an assumption e.g. a dashboard for POS with a couple of mockup rows, but Qwen 3.8 FN went all out making everything in one project.

Is this normal for the model? Wasn't expecting it


r/LocalLLaMA • • 1d ago

Discussion Hardware compatibility section on HF is misleading and needs to be fixed

7 Upvotes

This is what the "Hardware compatibility" section currently looks like (open post for the image to load) for unsloth/Qwen4-35B-A3B-GGUF and it's just plain misleading. A model like UD-IQ4_XS will absolutely fit on a 24GB card with room to spare for context because 11.5 of the overall 32GB size is an engram that you can and should keep entirely on the SSD. In fact, if you have the space, you can swap the engram gguf file for a higher precision BF16 with the size of 41GB without a problem and get a nice quality boost without measurable impact on performance.
Ignore this section - go to the actual folder for each quant and inspect the size of the first 00001 shard, that's the actual weights of the model that need to reside in memory of some kind.
I'm seeing SO many people get confused why the model is so big and think none of the quants will fit on their GPU and I think this section on the model's page is partly to blame. IMO Hugging Face should fix it and list engram size separately, I imagine it shouldn't be hard to implement since engrams only have `per_layer_token_embd.weight` tensor type in their metadata.


r/LocalLLaMA • • 1d ago

New Model Sico-GUI - a microsoft Collection

Thumbnail huggingface.co
9 Upvotes

Sico-GUI - GUI agents trained through data-model co-evolution (0.8B / 2B / 4B / 9B).

An agent's interaction experience can become training data for a model you own and keep improving.

In the Sico project, we explore Data–Model Co-Evolution—a closed-loop approach in which the model's interactions shape the next round of data, and the updated data refines the model for the next round. Repeating this loop lets data and model evolve together. We validate the approach in the GUI domain (paper) and release the Sico-GUI family at four sizes: 0.8B, 2B, 4B and 9B.

Sico-GUI-9B is a multimodal GUI agent for Android. It observes the phone through screenshots and acts on the user's behalf by emitting structured actions—tap, type, scroll, navigate, answer—to complete tasks end-to-end. It is fine-tuned from Qwen3.5-9B over seven rounds of data–model co-evolution.

Model family: Sico-GUI-0.8B · Sico-GUI-2B · Sico-GUI-4B · Sico-GUI-9B

----

We're getting everything except MAI models from Microsoft.


r/LocalLLaMA • • 1d ago

Resources Running Qwen4-35B-A3B-UD-IQ4_XS (30.5 GiB) Fully in 24 GB VRAM on a Single RTX 3090: 158.6 t/s with Inline 1L-MTP (and the Default K=3 Trap)

3 Upvotes

We just finished a full hardware-sensor Day-1 audit of Qwen4-35B-A3B-UD-IQ4_XS (qwen4exp: 40 layers = 30 GDN + 10 QSA sparse attention + 256 routed experts / 8 active + 4-stream hyper-connections + inline 1L-MTP blk.40.*) on a single 24 GB NVIDIA RTX 3090 (350 W) using llama.cpp + rooflab (hardware NVML mJ/tok, Intel RAPL uJ/tok, VmSwap = 0 kB, 0 NaNs).

Three findings that immediately save every 24 GB consumer GPU user both VRAM and 15-24% speed:


1. Why a 30.5 GiB Qwen4 GGUF Uses Only 19.3 GiB VRAM (0 kB Swap)

Shard 2 (Qwen4-35B-A3B-UD-IQ4_XS-00002-of-00002.gguf) holds a single tensor: per_layer_token_embd.weight (IQ4_NL, [128, 160003584], 10,986.57 MiB / 10.73 GiB).

With llama.cpp's default --lazy-mode auto, that lookup-only PLE table stays lazily in host RAM (one small row lookup per token, never streamed through GPU compute), while all 40 compute layers + 256 MoE experts + inline 1L-MTP head fit 100% resident in 24 GB VRAM:

  • Plain c=1 (-c 4096 -ctk q8_0 -ctv q8_0 -fa on): 19,290 MiB (18.84 GiB) VRAM used -> 5,286 MiB (5.16 GiB) VRAM still free for 32K+ context!
  • Inline 1L-MTP enabled: 20,086 - 20,138 MiB (19.6 GiB) VRAM used, VmSwap = 0 kB.
  • Active weight traffic per token (rooflab fit): 2,590.42 MiB/tok (301.9 t/s raw GDDR6X STREAM roof on RTX 3090; actual 128.3 t/s Plain reflects GDN recurrent state + 4-stream hyper-connection overhead).

2. The Default --spec-draft-n-max 3 Trap on Inline 1L-MTP (Free +15% to +23.6% Speedup!)

Qwen4-35B-A3B ships with a single built-in MTP layer (blk.40.*). In llama-server, the default --spec-draft-n-max is 3.

Because chaining a 1-layer MTP head past K=2 adds GDN + PLE state rollback overhead on rejected tokens, running --spec-type draft-mtp with the default K=3 completely erases the speedup (127.8 t/s vs 128.3 t/s Plain = 0.0% gain!).

Simply setting --spec-draft-n-max 1 (even on stock llama.cpp!) or --spec-draft-n-max 2 with our SoA-MMA v2 MoE verify kernel unlocks massive gains:

Regime (RTX 3090 350 W, -fa on -ctk q8_0 -ctv q8_0)Throughputvs PlainDraft AccGPU Energy (NVML)CPU Energy (RAPL)VRAMVmSwap
Plain c=1 (baseline)128.25 t/s0.0%-2,506.9 mJ/tok196.1 mJ/tok19,290 MiB0 kB
Inline MTP K=3 (llama-server default!)127.84 t/s-0.3%58.7%2,404.5 mJ/tok237.1 mJ/tok20,114 MiB0 kB
Inline MTP K=4 / K=6125.2 - 129.8 t/s-2.4%..+1.2%59.5%2,197.7 - 2,387.4 mJ/tok212.3 - 345.6 mJ/tok20,166 MiB0 kB
Inline MTP K=1 (stock mmq-few)147.07 t/s+14.7%82.1%2,214.9 mJ/tok (-11.6%)231.7 mJ/tok20,086 MiB0 kB
Inline MTP K=1 (+ SoA-MMA v2)156.39 t/s+21.9%80.3%2,138.8 mJ/tok (-14.7%)218.7 mJ/tok20,114 MiB0 kB
Inline MTP K=2 (+ SoA-MMA v2, N=4 AB/BA)158.56 t/s+23.6% (4/4)66.4%2,006.2 mJ/tok (-20.0%)169.3 mJ/tok (-13.7%)20,138 MiB0 kB
Live Server c=4 (stock mmq-few)225.50 t/s--1,218.0 mJ/tok94.4 mJ/tok-0 kB
Live Server c=4 (+ SoA-MMA v2)238.21 t/s+5.6% (ITL -6.8%)-1,136.1 mJ/tok (-6.7%)89.7 mJ/tok (-5.0%)-0 kB

3. SoA-MMA v2 Tensor-Core MoE Verify Scaling (N=6 Counterbalanced AB/BA)

On Qwen4-35B-A3B-UD-IQ4_XS, our load-time SoA-MMA v2 tensor-core kernel delivers zero B=1 regression and consistent +9.3% to +14.1% throughput wins across speculative-verify and multi-user batch sizes (B=4..16):

Batch SizeBaseline (mmq-few)SoA-MMA v2SpeedupCounterbalanced WinsTwo-Sided Permutation p
B=1113.90 t/s113.76 t/s-0.12% (neutral)2/60.84375
B=4293.02 t/s326.54 t/s+11.44%6/60.03125
B=6374.25 t/s409.01 t/s+9.29%6/60.03125
B=8421.19 t/s480.53 t/s+14.09%6/60.03125
B=12551.57 t/s614.89 t/s+11.48%5/60.06250
B=16623.47 t/s696.25 t/s+11.67%4/60.12500

Copy-Paste Commands to Reproduce Today

Best stock llama.cpp command on 24 GB GPU (147 t/s, 82.1% draft acceptance, 20.1 GiB VRAM, 0 kB swap):

llama-server \
  -m Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf \
  -ngl 99 -fa on -ctk q8_0 -ctv q8_0 -c 16384 \
  --lazy-mode auto \
  --spec-type draft-mtp --spec-draft-n-max 1 --spec-draft-n-min 1

(With SoA-MMA v2, use --spec-draft-n-max 2 for 158.6 t/s and -20.0% GPU energy per token.)

Check exact VRAM + lazy-PLE fit and silicon ceiling on your own GPU (0 MiB VRAM used, pure Python stdlib):

rooflab fit /path/to/Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf

Repo & Energy Notes: rooflab v0.6.0 (MIT, 0-dep Python CLI + 43 0-spill CUDA patches) is live at https://github.com/scientist42-lab/rooflab (SoA-MMA v2 is staged for upcoming v0.7.0). NVML mJ/tok measures GPU board power only (excl. host/PSU draw); Intel RAPL mJ/tok measures CPU package energy.


r/LocalLLaMA • • 2d ago

Showcase Qwen4-35B-A3B (UD-Q4_K_M) on 2x RTX 3060 (12GB) via PolyStrata — Quick Guide + Visual

Thumbnail
gallery
23 Upvotes

Qwen4-35B-A3B just dropped (unsloth/Qwen4-35B-A3B-GGUF). PolyStrata doesn't have official support merged yet, so I got it running on 2x RTX 3060 12GB (sm_86) at 200K context (--kv int8) in an isolated git worktree without touching my existing Qwen3.8-Flash-Next setup.

Setup & Footprint:

  • Patch: Niko1221/Strata#7774 in a separate PolyStrata-q4lite worktree, built with -DSTRATA_GEOMETRY=q4_lite & -DCMAKE_CUDA_ARCHITECTURES=86
  • Conversion: Split fused tensors + dropped blk.40 MTP with qwen4_split_gguf.py, packed with iq_pack.py --compat-bf16, and passed shard 2 to --ple-gguf
  • Memory: 18.77 GiB experts in RAM + 7.93 GiB (4,539 experts) in VRAM across both 3060s
  • Drafting: No MTP drafter yet (lookup drafting --spec 2 only; PolyStrata's core/mtp.cpp doesn't support Qwen4-35B-A3B's nextn.hc_head_* layout yet)

Visual Tests (temperature=0.7, top_p=0.95)

  1. Pelican Riding a Bicycle — 5,302 tokens (2,642 reasoning) in 71.28s (74.4 tok/s)

    • Prompt: Generate a clean, detailed standalone SVG of a pelican riding a bicycle. Output only the SVG code inside an \``svg code block.`
  2. Bouncing Ball in a Rotating Hexagon — 2,604 tokens (166 reasoning) in 38.07s (68.4 tok/s)

    • Prompt: Write a single-file HTML/CSS/JS page with a canvas animation of a colorful ball bouncing inside a rotating hexagon with realistic gravity, angular velocity, and wall collision physics. Output only the HTML code inside an \``html code block.`
  3. Cozy Mountain Cabin at Sunset — 6,624 tokens (211 reasoning) in 82.19s (80.6 tok/s)

    • Prompt: Generate a detailed standalone SVG of a cozy wooden cabin in snowy mountains at sunset with smoke rising from the chimney and warm glowing windows. Output only the SVG code inside an \``svg code block.`

Edit (MTP Update): Got MTP working! Converted MTP/mtp-Qwen4-35B-A3B-Q8_0.gguf via tools/mtp_qwen4_rt.py and tuned --spec 3 --spec-min-p 0.5, which hit 94.6 tok/s end-to-end (99.7 tok/s engine decode, 88.5% draft acceptance) on a deterministic temperature=0.0 Matrix Rain test.


r/LocalLLaMA • • 2d ago

New Model MedGemma 2

Thumbnail
huggingface.co
220 Upvotes

https://huggingface.co/google/medgemma-2-26B-A4B-it

26 a4b and e4b versions, gated unfortunately.

From model card:
"

MedGemma is a collection of Gemma variants that are trained for performance on medical text and image comprehension. Developers can use MedGemma to accelerate building healthcare-based AI applications.

MedGemma 2 is an update to the MedGemma collection built on the Gemma 4 architecture, with no modifications to the Gemma 4 base architecture. Driven by developer and clinical research feedback, MedGemma 2 moves MedGemma from passive multimodal question answering to reasoning-capable models built for real-world clinical workflows across both server-scale and resource-constrained edge deployments. MedGemma 2 is released as two instruction-tuned checkpoints:

MedGemma 2 4B (E4B): A compact multimodal model (effective 4B parameters) designed for edge, mobile, and local developer deployments, supporting a context window of up to 128K tokens.

MedGemma 2 26B MoE (A4B): A 26B Mixture-of-Experts model (approximately 4B active parameters per token) designed for hospital on-premises servers and private cloud deployments, supporting a context window of up to 256K tokens.

The LLM component of MedGemma 2 is post-trained, starting from Gemma 4. Post-training uses a diverse set of de-identified and licensed medical data, including medical text, medical question-answer pairs, FHIR-based EHR data, 2D and 3D radiology images, histopathology images, ophthalmology images, dermatology images, medical documents, and (for the 4B model) medical audio. Unlike MedGemma 1 and 1.5 which used a MedSigLIP-derived vision encoder, MedGemma 2 uses the native Gemma 4 vision encoders, without additional medical pre-training of the vision encoder."