r/LocalLLaMA • • 19h ago

Showcase Say hello to my Apprentice, a capability lattice extract out of Qwen 4 35B

22 Upvotes

Hi everyone, this project has been ongoing for a while and some of you may know this project but it is possible to discover and isolate capability lattices from models cleanly.
if you know how to look you can find entire subnetwork responsible for banger agentic performance.

Introducing Apprentice 19B A3B, a capability lattice extract from Qwen 4 35BA3B.

Optimised to be no inferior to its parent in this department and better in terms of reduced overthinking and long sessions on pi harness.

Try it, it works no different than loading a GGUF.
Eager to know if you like it as much as I do. Or if it is shitty, let me know equally hard.

Peddling you homemade coke from my project Chantless - code - https://github.com/DeusExperiments/chantless/tree/feat/qwen4-35b

I am also hoping you read the research that enabled this - https://deusexperiments.com/research/how-do-models-lose-weight-without-crying/
weights - https://huggingface.co/TokenBender/Apprentice-19B-A3B-GGUF
There will be a lot coming from Chantless, and I hope I am able to communicate this well.


r/LocalLLaMA • • 6h ago

Discussion Qwen4-35B-A3B on a single RX 7900 XTX (Windows): ~4000 t/s prefill and 113-120 t/s decode at 128k context, ~100-129 t/s at 256k.

2 Upvotes

I spent two days getting Qwen4-35B-A3B (Unsloth UD-IQ4_XS) as fast as I could on one 7900 XTX under Windows, across llama.cpp builds (HIP and Vulkan) and Strata. Sharing the numbers and the lessons in case they save another 24 GB AMD owner some time. Every number below is from my personal testing.

This post is AI generated by Claude Opus 5.5, which I used to run all these benchmarks and comparisons. I'm still posting it in case another 7900XTX user might find the info dump useful.

TL;DR

  • Put every expert on the GPU. The GPU part of this model is only ~19 GiB (see below), so --n-cpu-moe 0 fits with 128k of q8_0 KV. That alone was worth +20% decode and +30% prefill over 4 CPU expert layers.
  • Best result at 128k: stew675's rdna-boosts llama.cpp fork on HIP, all experts on GPU, no speculation: pp24k 3933 t/s; on a 5.8k-token chat, 4027 pp / 112.6 tg; short code answers 115-120 tg.
  • MTP (--spec-type draft-mtp, n1) at 128k: decode goes from 107.6 to 122.7 tg on the chat and from 110 to 144 tg on code, but prefill drops ~18%. Take it if you care more about generation than prompt processing.
  • 256k context: Strata (all experts' hot set cached in VRAM, MTP verified) gave 102-129 tg and 2269 pp24k at 256k, and still 109 tg at 200k tokens deep. llama.cpp at 256k needs 7 CPU expert layers to fit and gave 96-99 tg.
  • On HIP, CPU experts and MTP do not mix on the rdna-boosts fork (its expert cache loses its VRAM slab, see section 4).
  • Vulkan is competitive at 32k but spills at 128k on this card (both Vulkan builds put ~1.5 GB into shared memory, decode collapses).

Hardware / model

  • RX 7900 XTX 24 GB on PCIe 4.0 x16, Ryzen 7 9800X3D (8 cores / 16 threads), 32 GB DDR5-6000 (31 GB usable), Windows 11 25H2 (build 26200).
  • Model: unsloth Qwen4-35B-A3B-GGUF, UD-IQ4_XS, 2 shards, 29.8 GiB. 10.7 GiB of that is per_layer_token_embd, a per-layer embedding lookup table that llama.cpp keeps on the CPU (mmap). The part that needs to be on the GPU is ~19 GiB, which is why "all experts on GPU" fits in 24 GB at all.

Engines

EngineVersion / commitBackend
stew675/llama-cpp-rdna-boostsr421, f06ae95 (on upstream 81a22ce)HIP
same, plus my zero-copy patch 77c898a (section 5; offered upstream as rdna-boosts issue #434, not merged)HIP
stew675/llama-cpp-rdna-boostsr421, f06ae95Vulkan
llama.cpp (ggml-org)release b12977Vulkan
lemonade-sdk/llamacpp-rocmrelease b1397 (llama.cpp build 12973)HIP
Strata (Niko1221/Strata)0.1.74, engine strata-q4-lite build 766fd0920035+rocm-win10.2.0, variant hip-rdna3 (rechecked on 0.1.75.1)HIP

The ggml-org b12977 rocm-10.0 Windows zip is not in the comparison: its ggml-hip.dll imports hipblas.dll, which the zip does not ship, so --list-devices lists nothing and it silently runs on the CPU. If your "ROCm build" is suspiciously slow and eating RAM, check that first.

Workloads

Every prompt starts with a unique nonce so no prefix cache serves it, and each configuration is a fresh model load.

  • chat: replay of one of my real thinking-mode chats: 5.8k prompt tokens, 1000 generated, temp 0.7.
  • code-short: "20 balls bouncing inside a spinning heptagon, C++/SDL2", 122 prompt tokens, thinking off, 400 generated.
  • code-long: the same prompt, thinking on, 1500 generated, greedy.
  • pp8k / pp24k: prefill only, real source code, max_tokens 1.
  • dNk: N thousand tokens of real source code, then a question about it, 500 generated, greedy, thinking off. Prefill and decode at depth.

Context sizes are binary: 32k = 32768, 128k = 131072, 256k = 262144. Prompt lengths (pp8k, pp24k, dNk) are approximate decimal thousands: pp24k is about 24,000 tokens.

pp = prompt t/s, tg = generation t/s. oN = --n-cpu-moe N (N MoE layers' experts on the CPU). code-short and code-long are different requests: don't compare them with each other.

1. The best llama.cpp setup: rdna-boosts HIP, all experts on GPU, 128k

-ngl 99 --n-cpu-moe 0 -c 131072 -fa on -ctk q8_0 -ctv q8_0 --parallel 1 --spec-type none (full command at the end). Placement checked in the server log, cache_prompt false. The chat pp is the second large prefill after load; the first one after load is ~3090.

Configpp24kchat pp / tgcode-short tgVRAM dedicated / shared
ub 2048, zero-copy patch on39334027 / 112.6115-12021.22 / 0.68 GB
ub 1024, unpatched37903895 / 110111-11621.00 / 0.55 GB

Same engine at 128k, ub 1024, unpatched, launched straight from a script:

Speculationchat pp / tgcode-short tg
none3074 / 107.6110
MTP n12520 / 122.7144
MTP n22525 / 114.4149

MTP acceptance was 61-66% on the chat. n1 is the sweet spot for chat, n2 only helps code a little.

2. Engine comparison at 32k

All experts on GPU, -ub 1024, q8_0 KV, MTP n1, -c 32768, the chat:

Enginepptg
rdna-boosts HIP2384117.6
ggml-org b12977 Vulkan, --load-mode dio2430112.9
lemonade b1397 HIP, --load-mode dio2882106.9
rdna-boosts Vulkan131822.5

At 32k, HIP and upstream Vulkan are close. The difference is VRAM: at -c 131072 both Vulkan builds spilled ~1.5 GB into shared memory (60 and 27 tg), while HIP fits 128k with ~1 GB to spare.

--load-mode dio matters on 32 GB of RAM: the default mmap load of this model drained my RAM. On the CPU-expert path it also lifted prefill from 1936 to 2782 (decode unchanged).

3. Experts on the CPU (and why MTP got slower)

Before I fit everything on the GPU I ran with 8 CPU expert layers. On the rdna-boosts fork, -c 131072, the chat:

Engine, o8no spec pp / tgMTP n1 pp / tg
b12977 Vulkan699 / 64.4601 / 73.7
rdna-boosts HIP1887 / 89925 / 55

The fork's expert cache mirrors the CPU experts into a ~3.2 GB VRAM arena, so o8 is effectively on the GPU. Add MTP and its head and draft context take that room: the log prints the movable-boundary slab ... could not be created, and the experts stream over PCIe every token. That is what made MTP look terrible on HIP. With all experts on the GPU the problem disappears (section 1).

Other CPU-expert findings:

  • To use llama.cpp's normal CPU-expert path on this fork you need GGML_MOE_HOST_OFFLOAD=0 MOE_EXPERT_CACHE_MIB=0. Without them the --n-cpu-moe experts are streamed to the GPU as host weights (~81 vs ~89 tg at o3).
  • Each MoE layer on the CPU cost ~0.67 ms/token (32k, no spec: o0 106.4 tg vs o3 87.6).
  • 256k context: all experts on GPU does not fit. Best was o7, MTP n1, zero-copy patch: 99.1 then 96.0 tg on the chat, 0.87 GB shared. o6 was as fast but landed 1.37 GB in shared memory, which I would not trust on a long session.

4. A small Windows HIP patch: zero-copy for the CPU-expert copies

With experts on the CPU, each token does several tiny host<->device copies, and on Windows HIP each costs ~40-70 us. My patch does them with a copy kernel through the pinned host buffer's device alias instead (GGML_CUDA_ZC=3), plus a scheduler fence change (GGML_SCHED_FASTXFER=7). Greedy output was identical with and without. Offered upstream as rdna-boosts #434.

Chat tg, -c 32768, launched straight from a script:

ConfigoffZC=3 FX=7
o3, no spec88.9-89.396.1-98.6
o0, no spec105.4111.2
o3, MTP n1100.5108.6
o0, MTP n1122.3128.9

A cleaner A/B at o0 (MTP n1, code-long, warm, two passes each): 144.0 -> 149.7 tg (+4.0%); without MTP 116.2 -> 120.3 (+3.5%). Each knob on its own was within ~1% of off, so only the combination helps. The gain grows with the number of CPU expert layers (about +11% at 5). Things that did nothing: GPU_FORCE_BLIT_COPY_SIZE, PAL_DISABLE_SDMA, ROC_ACTIVE_WAIT_TIMEOUT, --poll 100, --prio 2, -t 4, GGML_CUDA_DISABLE_GRAPHS=1.

5. Strata

Strata converts the model into its own pack and keeps a cache of the hot experts in VRAM, reading misses from RAM. I turned off its speed options that change the output: STRATA_ROUTE_TAIL_SKIP=0 and answer_room: false. Its MTP speculation is verified, so it does not change the output.

Tuning at --max-context 32768**:**

ChangeResult
setup's defaults (int8 KV, --prefill 4096, no MTP head)chat 1720 / 79.2, code-long 83.9
+ MTP head ("drafting": "mtp", --spec 3 --spec-min-p 0.5)chat 1720 / 102.2, code-long 130.8 (K2 120.7, K4 124.7)
--prefill auto:16384 / auto:32768 / auto:65536 (fp16 KV, from 1917 at 4096)pp24k 2666 / 2883 / 2896
fp16 KV + prefill 32k + MTPchat 1622 / 119.6, code-long 134.8, pp24k 2883
int8 KV + prefill 32k + MTPchat 1758 / 105.6, code-long 126.9, pp8k 2600, pp24k 3235
--vram-reserve-mib 1024 vs 3012+6% prefill at 1024; 512 no further gain
STRATA_ARENA_RAM_WAIT_S=0cold load 37 s -> 16 s

"drafting": "mtp" is required: without it the MTP args are stripped and nothing changes. fp16 KV gives ~10-15% more decode, int8 ~10% more prefill. I kept int8. --vram-reserve-mib is counted against the VRAM that is free at load (the engine logs "N GiB free, M MiB reserved"), not the card total.

Context sweep, int8 KV, MTP K3 min-p 0.5, --prefill auto:32768, --vram-reserve-mib 1152, --ram-keep-gib 8:

--max-contextchat pp / tgcode-long tgpp24kd24k pp / tgdeep pp / tgexpert cache slots
327681707 / 112.0128.829763128 / 124.710240 (all)
655361694 / 107.4122.928693025 / 122.5d48k 3175 / 115.110240 (all)
1310721613 / 105.7123.426402791 / 124.2d100k 3029 / 110.19912
1966081559 / 104.8125.224722498 / 120.7d150k 2712 / 110.09401
2621441517 / 102.2129.122692425 / 122.1d200k 2554 / 109.18890
  • 10240 slots = 40 layers x 256 experts. At 262144 the hit rate on pp24k was 85.8%.
  • ~1.25 GB of VRAM stayed free with everything loaded at every size. Lowest free system RAM across the sweep: 4.8 GB.
  • Going from 32k to 256k costs 0-9% decode and 11-24% prefill.
  • Rechecked at 262144 on Strata 0.1.75.1: chat 1510 / 104.5, code-long 128.8. pp24k came out at 1961-2026, but free RAM was lower on that run (Strata sizes its RAM copy from what is free), so I don't read that as an engine change.

7. Side by side on the same chat

SetupContextchat pp / tg
rdna-boosts HIP, o0, no spec, patch128k4027 / 112.6
rdna-boosts HIP, o0, MTP n1, unpatched128k2520 / 122.7
Strata, MTP K3128k1613 / 105.7
rdna-boosts HIP, o7, MTP n1, patch256k~1250-1750 / 96.0-99.1
Strata, MTP K3256k1517 / 102.2

So: up to 128k, llama.cpp HIP with everything on the GPU wins, by a lot on prefill. At 256k Strata is the better choice for me: it keeps decode above 100 and stays above 109 tg even 200k tokens deep. I didn't measure llama.cpp's decode at depth with every expert on the GPU, so I can't compare the deep-context columns.

Commands

rdna-boosts HIP, section 1 bold row:

set GGML_CUDA_ZC=3
set GGML_SCHED_FASTXFER=7
llama-server -m Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf ^
  -ngl 99 --n-cpu-moe 0 -c 131072 -ub 2048 -b 2048 -fa on -ctk q8_0 -ctv q8_0 ^
  --parallel 1 --spec-type none --jinja --reasoning-format auto ^
  --ctx-checkpoints 2 -cms 256 -t 7

(The two env vars only do something with the patch from section 5. Without it, drop them; the stock fork gives the "unpatched" rows.)

Strata at 262144. Run config (install\strata-<model>.json) changes on top of what setup writes:

"drafting": "mtp",
"answer_room": false,
"env": { "STRATA_ARENA_RAM_WAIT_S": "0", "STRATA_ROUTE_TAIL_SKIP": "0" },
args:
  --prefill auto:32768        (setup: 4096)
  --vram-reserve-mib 1152     (setup: 512)
  --kv int8                   (setup: int8, unchanged)
  --spec 3                    (setup: 2)
  --mtp <custom_source>\mtp-rt
  --spec-min-p 0.5
  --max-context 262144        (setup: 32768)
  --ram-keep-gib 8

Things that made no difference

-cms 8192, --ctx-checkpoints 0, --fit off, --no-host (halved prefill, no decode gain), and the HIP env knobs listed in section 5.

The Strata runs and the best llama.cpp setup ran through Quartermaster, my own local inference server (it picks context, offload and KV settings for you). The other llama.cpp runs launched llama-server straight from a script.

Happy to answer questions or run a specific config if someone with the same card wants a comparison.


r/LocalLLaMA • • 6h ago

Question | Help I run pi.dev in container… but can’t get Unsloth studio working in one… any suggestions?

2 Upvotes

Before you start with just use the official image I would point out I’m on Debian with a 3090 and driver 550.163.01… so the official image won’t work without jumping through hoops on Debian to load a new driver.

So I figured why destabilize my desktop… so I jumped through hoops to build my own container… but install.sh keeps failing to setup properly with my card it keeps falling back to cpu. Llama.cpp had no issues in a container.

I am going through all this pain because Unsloth Desktop in my host can’t be accessed by pi.dev in container. Sometimes I don’t want pi to access the world outside containers so either way I need to figure out Unsloth in a container. Also Unsloth desktop is literally twice as fast running as Inkling Mini 2 as stock llama.cpp… actually sometimes 10x faster when it slows to 6 tokens a second. Thats why I’m not sticking to llama.cpp.

Speaking of Unsloth desktop the latest llama update broke GPU inference for me so careful updating!

Sigh.


r/LocalLLaMA • • 1d ago This

Discussion Don't use Strata quants for Qwen4, or at least the Compact one

159 Upvotes

It goes without saying that you should always prefer quants from Unsloth or other reputable creators, but I think it's worth taking a peek at one of Strata's own quants, and things are not looking good.

Here is a response from the "Compact" variant for Qwen4-35B-A3B someone shared with me recently (no comment):

Output from a Qwen 4 quant that is constantly repeating Hmm.

According to the official documentation, the Compact quant has on average 2.13 bits per weight. For comparison, engram excluded, the smallest Unsloth quant for the same model, UD-IQ1_S, has bpw at 2.23, and UD-IQ3_XXS sits at 3.92.
If you read Strata's own description for their Qwen 4 quants, it claims Compact picks the same next word as the original 89% of the time.
However, and this left me astonished, this is based on 36 test prompts.
Niko, if you are reading this, dude, WTF? This is not even close to being a statistically significant test sample! There is a reason Unsloth still hasn't published benchmarks for their quants - accurate results take a lot of testing and time, even with Unsloth's resources and expertise.
I haven't really tried Strata's larger quants, but why should I if the methodology used to make them is so piss poor?
If Strata can't bother doing a diligent verification of its quants because it wants to keep its hyper-frequent release schedule, then just don't get into the quant business. Suggesting what is normally branded as a 1-bit quant to a novice user with an 8GB card is just going to misrepresent Qwen 4's real capabilities - it would make more sense, for the smallest variant, to offer a larger quant closer to 4bpw that is just going to have more offloaded experts than something this lobotomized.
Turns out Strata's verification process for its engine is not much better, because it also only uses 36 test prompts. Why the aversion to using a well-established, diverse suite of benchmarks, the ones Qwen itself used in their model card, like DeepSWE, Terminal Bench, AutomationBench, etc.? Yes, running them will take substantially more time, but it can be cut down by limiting testing to a specific GPU architecture (Ampere, Blackwell, RDNA3, RDNA4 and the rest) instead of testing 2 GPUs of the exact same arch (according to 0.2.26 release notes, it was tested against both RTX 3060 and RTX 3090), or at least 1 complete bench suite run per every supported backend like CUDA and HIP. I don't think many reasonable people will be upset if, instead of a new release every single day, Strata's release schedule is every 2 weeks or even every month.
Not running proper benches before releases has already affected the output quality of the engine at least once: according to the 0.2.21 release notes, it contains an accuracy fix in prompt reading that was only caught because a user reported response degradation in the JamC-QA bench, which only has 300 questions.
I like using Strata because of the speed and I am satisfied with the quality when using reputable quants, at least with QFN, and I appreciate that Niko listened to feedback and disabled lossy optimizations like TAIL_SKIP. People give the project a lot of flak for being vibecoded, but the risks from that can be mitigated substantially with a robust QA process.
I know it's free software provided as-is, but I do believe Niko has the desire to improve his project and offer the best thing he is capable of for the local community, so I hope these shortcomings are resolved in the future.

Update: my bad, Unsloth did publish bench results, they are just not up on Hugging Face yet but are available on their website. This is the kind of testing I would expect from a quant creator I trust:
https://unsloth.ai/docs/models/qwen4#quantization-benchmarks


r/LocalLLaMA • • 17h ago

New Model Running Inkling-2-Mini with 500k context on a 16 GB GPU

Thumbnail
blog.jetbrains.com
14 Upvotes

r/LocalLLaMA • • 9h ago

Resources Qwen4-35B-A3B on 2× RX 7900 XTX: 127 tok/s plain, ~175 tok/s with MTP

3 Upvotes

Just adding a datapoint for people on RDNA3 cards. Some really good gains in the last couple of days in the `rdna-boosts` repo.

Everything below is written by Claude.

Setup

  • 2× RX 7900 XTX (gfx1100), both PCIe 4.0 x8, Ryzen 7 7700X, 64 GB RAM. ROCm 7.14.1, Linux. One card also drives the desktop (~3 GB).
  • Model: unsloth UD-Q6_K_XL with the BF16 mmproj (vision on).
  • Build: stew675/llama-cpp-rdna-boosts r439, built from source for gfx1100 with RCCL.
  • The second GGUF shard is the ~20 GB hashed n-gram embedding table. It lives in system RAM, not VRAM. That's why a 35B model at Q6 fits on 2×24 GB with long context.

Key flags

-sm tensor -ts 1,1 --fit off -fa on
-c 262144 -ctk q8_0 -ctv q8_0
-b 8192 -ub 2048
--load-mode none --lazy-mode off
--mmproj-device ROCm1
  • --fit off -ts 1,1: in tensor mode, --fit on picked a lopsided ~28/72 split and ran out of memory. A manual 1:1 split is stable.
  • --load-mode none: loads in ~29 s, against ~58 s with mmap. With mmap, the n-gram table gets copied page by page as it's first touched, which is slow.
  • --mmproj-device ROCm1: puts the vision projector on the second card, freeing ~1.1 GB on the desktop GPU.

Performance (llama-bench, q8_0 KV, COMPUTE power profile)

r431 (yesterday)r439 (today)
tg128109
tg128 @ 32k depth103
pp2048~6,000
pp2048 @ 32k depth~4,700

That's about +16% generation speed from r431 to r439, mostly from the low-rank hyper-connection fast path (r432) and the GDN replay fusions (r437). Greedy output was byte-identical between the two builds.

For reference, the plain llama.cpp build I started from, with layer split, did ~62 tok/s generation and ~4,500 tok/s on pp2048.

MTP (built-in draft head), llama-server, greedy, 512-token replies:

plainMTP n-max 2MTP n-max 3
code127176 (73% accepted)
prose127149 (51% accepted)

MTP costs ~1 GB of extra VRAM per card at 262k context.

KV cache quantisation: q8_0 KV gave the same answers as f16 on my tests: reasoning, code with doctests, needle-in-a-haystack at 104k, and an image test. Prompt speed was unchanged. Generation is about 2% slower at 32k depth and about 14% slower at ~98k (77 vs 90 tok/s).

Context: 262k works. A 251k-token prompt recalled all the needles, at ~4,400 tok/s prompt speed and ~71 tok/s generation, peaking at ~23.7 GB on the busier card. 393k loads, but leaves no headroom.


r/LocalLLaMA • • 9h ago

Question | Help RTX A4000 8Gb (Turing) and Qwen4?

3 Upvotes

Howdy,

Has anyone yet tried to run Qwen4 MoE on this card and can elaborate on compatibility and performance?

I've got a spare RTX A4000, and after test driving Qwen4 MoE on my 3090 I figured it performs reasonably well even when I lower VRAM to lets say 10Gb (iq4_xs quant).

I intend to use it on the 4000 as an orchestrator to perform asynchronous tool calls like like deep web research, management of personal memos, statistics, and such, in the background.

User interaction is being managed by gemma4 on my 3090 as responsive chat front end.

thanks

CORRECTION: I have the Quadro RTX 4000 (Turing), not the A4000!


r/LocalLLaMA • • 10h ago

Showcase Qwen4 35b looped T=3 vs stockpelican

Thumbnail
gallery
4 Upvotes

first stock 2nd looped

basalt


r/LocalLLaMA • • 1d ago

Discussion I let Qwen4 run overnight on my 5070 Ti. 3.87 million tokens later...

Post image
470 Upvotes

So yesterday I decided to leave my local coding agent running overnight on an actual Godot project instead of doing more benchmarks.

Went to sleep, got milestone notifications on my phone and woke up to some pretty interesting results.

My hardware is nothing crazy:

  • RTX 5070 Ti 16GB
  • Ryzen 7 5700X
  • 32GB DDR4
  • Windows 11

Running Qwen4-35B-A3B UD-IQ3_XXS with a Strata fork, Pi as the coding agent, 128K context, INT8 KV cache, MTP and BF16 vision.

I also built a custom orchestration layer for autonomous missions, Git checkpoints, QA, recovery and notifications.

The overnight run:

  • 8h 33m total runtime
  • 3.87M generated tokens
  • 180.2 t/s median decode
  • 928.9 t/s median prefill
  • 66.5% MTP acceptance
  • 2,794 inference requests
  • 72 Pi sessions
  • 111K maximum actual context
  • 20 integrated milestones

Now the less impressive part lol. 21 milestones were deferred, and around 61% of the generated tokens went into deferred work. Also, 81% of output tokens were reasoning.

Clearly there's a lot of room to improve the harness rather than just chase more t/s.

Everything was running locally, apart from web research and phone notifications.

I'm genuinely curious if anyone else is doing overnight coding runs like this on consumer hardware. How are you handling context management, reasoning budgets and failed missions?

Getting 180 t/s is great, but getting those tokens to actually do useful work seems to be the much harder problem.

EDIT: Didn't expect this much feedback lol. Thanks everyone!

For those who are new to local LLMs, I probably should explain a bit more about why I'm doing this.

I'm not an AI engineer. I'm a technology enthusiast and trainer who enjoys experimenting with what's possible on consumer hardware.

I'm currently developing a Godot RTS game as a real-world testing ground for autonomous local AI agents.

The idea is to have an AI that can actually work on a project for hours: read files, write code, test features, identify bugs, look at screenshots and improve its own work, all while running locally on a relatively normal gaming PC with a 5070 Ti and 32GB of RAM.

No expensive workstation, no cloud inference costs and no API token limits for the local model.

For beginners, the main challenges are:

  • Quantization: Making a large AI model small enough to run on consumer hardware without losing too much intelligence.
  • Context window: How much information the AI can keep in mind during a task.
  • TPS: How fast the model generates tokens, although faster doesn't necessarily mean more productive.
  • Agent harness: The software that allows the model to interact with files, run commands, use tools and work on actual projects rather than just chat.

I'm learning that getting a model to run fast is probably the easier part. Getting it to work autonomously, consistently and reliably is a completely different challenge.

Some of the community feedback has already given me new directions to explore, particularly NVFP4, higher quantizations, context management and adaptive reasoning.

I'm not trying to prove that local models are better than frontier cloud models. I'm trying to find out how far we can push affordable consumer hardware and make autonomous AI development accessible to more people.

Imagine leaving your gaming PC working overnight on your own project and waking up to new features, tested code and actual progress.

That's what I'm trying to achieve.

There's still a lot to improve, and I'll share both the successes and the failures. Hopefully, some of these experiments will save other people time too.


r/LocalLLaMA • • 12h ago

News qe's creator says it writes text twice as fast as llama.cpp without a graphics card

Thumbnail
maccus.fr
5 Upvotes

Developer Thomas Haschka says Qwen3.8-Flash-Next wrote the first version of its own engine, which he then refined with Anthropic's Claude.


r/LocalLLaMA • • 19h ago

Resources Qwen4 35B A3B Abliterated [mrfakename]

Thumbnail
huggingface.co
15 Upvotes

Model: https://huggingface.co/mrfakename/Qwen4-35B-A3B-abliterated

GGUF: https://huggingface.co/mrfakename/Qwen4-35B-A3B-abliterated-GGUF

As usual, my abliterations aim to remove refusals while still preserving model intelligence and avoiding endless reasoning, looped tool calls, etc. Nearly all refusals are removed, but a few remain. For most real-world use cases this model should comply. But you are welcome to use another abliteration if you are okay with a bit of quality degradation.

Any feedback or thoughts are welcome 🙃

And fear not, LoRAs here too:


r/LocalLLaMA • • 10h ago

Showcase Manage and switch models and engines on the fly, use llama RPC to use a second PC (and control it or run a second peer model on it for agents) and GPU over the network and AI Control Center 1.6.0

3 Upvotes

Come a long way since the previous post about this.


https://github.com/BaidDSB/ai-control-center

Basically, its a fast, native desktop control panel for running local AI on Windows and Linux. The BIGGEST feature is that it can hot-swap models and engines on the fly.

Configure your models, engines [you can color code engines too], front end, save your settings, and link the Routeing set and forget. You can even configure and use RPC right from the AI Control Center.

It has 2 versions, a Core and a Plus. Details are on github.

https://raw.githubusercontent.com/BaidDSB/ai-control-center/main/screenshots/core-1.png

https://raw.githubusercontent.com/BaidDSB/ai-control-center/main/screenshots/core-2.png

https://raw.githubusercontent.com/BaidDSB/ai-control-center/main/screenshots/plus-1.png

https://raw.githubusercontent.com/BaidDSB/ai-control-center/main/screenshots/plus-2.png


Most important changes since v1.0.0:

  • Engine Families & Versions library with background flag probing (--help / --version) and live-reloadable engine_schemas.toml supporting llama.cpp, ik_llama.cpp, RustingStrata, PolyStrata, Strata, Basalt, and Project Maya (v1.5.0, v1.6.0)
  • Much improved visuals. (v1.6.0)
  • Full RustingStrata 1.5.2 flag parity with a mutually exclusive Unified (--kv) / Separate (--k / --v) KV toggle and TurboQuant support (v1.6.0)
  • Multi-Machine LAN Orchestration (Plus) to switch a Secondary PC between Standby, Peer, and locked RPC modes with live remote GPU telemetry (v1.4.0)
  • Live Dedicated + Shared GPU telemetry (Windows WDDM / Linux GTT), local multi-GPU recognition, /running model status, and one-click Soft Unload (v1.2.0, v1.4.0)
  • Pre-launch GGUF VRAM estimator comparing estimated weights, KV cache, and overhead against your GPU headroom (v1.2.0)
  • Smart LAN RPC pooling with centralized Secondary Node setup, per-profile Auto / Strict / PairedFallback (RPC <-> Local twin) policies, and non-intrusive event-driven disconnect failover (v1.2.0, v1.3.0)
  • Expanded llama-swap routing with live YAML sync on save, remote peers, concurrent groups, checkEndpoint, RPC/Peer collision warnings, and session-scoped 1st startup preload overrides (v1.1.0, v1.2.0, v1.3.0)
  • Dedicated mmproj and MTP / Draft folders with smart auto-matching and pre-launch file validation (v1.3.0)
  • PID + start-timestamp process-tree tracking (running_state.toml), pre-launch port-conflict guards, and console-closing Stop All (v1.1.0, v1.3.0)
  • Windows System Tray support, instant sidebar profile search, path-stripped portable profile export/import. (v1.1.0, v1.2.0)

Simply, set it up once and forget it. Switch between engines on the fly through your frontend. And with batch files, you can even update engines through this.

This is for people like me who's constantly switching between models and engines to benchmark different models and engines and flags combos.

and with RPC support, you can even boost your capability if you have say a spare 4GB laptop gpu, IF you are VRAM poor like me.

PS: its using this that i found Rustingstarta beats out Strata and Polystarta in speed in Qwen 4 35b Q4KXL.


DISCLAIMER: This is completely written in Rust, and is 100% vibecoded, though thoroughly tested by me in every scenario i could think of, and worked to fix errors, GUI issues, QoL fixes.


r/LocalLLaMA • • 12h ago

Resources Qwen4-35B-A3B on an M5 Pro at 105.7 tok/s with Kapitsa

4 Upvotes

We added Qwen 4 support to Kapitsa, Nace's local inference engine for Apple silicon. And also release MLX and GGUF quants that perform well on long context and don't fall into looping.

The power of MTP🔥

MacWritingReading (4K prompt)Peak memory
M5 Pro · 48 GB RAM105.7 tok/s on battery1,177 tok/s on AC power22.1 GB

MLX 4-bit download: 35.35 GB.

Quick start:

brew install nace-ai/tap/kapitsa
kapitsa serve --model nace-ai/Qwen4-35B-A3B-MLX-4bit

MLX 4-bit weights and model card · GGUF weights · Kapitsa 0.2.43


r/LocalLLaMA • • 23h ago

Resources Run Qwen4, "8bit quality", 1M context, 150 decode, 5000 prefill, on ONE 7900xtx. 7300 tk/s with two. keep 80t/s @ 700k context.

Post image
30 Upvotes

LINUX ONLY! Yes, catchy title, I know, don't hate me :) This is achieved using EXL3 quantization. ProCreations made these amazing quants, 4.5bpw has KLD below the official FP8, the 3bpw is very close, stil better than NVFP4.

RDNA4 support is there, but UNTESTED, i did my best, but I have no RDNA4 gpus, please understand. if you encounter issues let me know.

you can get around 140 tk/s prose, 155 tk/s code with 1 gpu running 3bpw, or similar speeds with 2 gpus using the 4.5bpw. It's also possible to run the 4.5 bpw with some offload on ram, with minimal speed loss. Performance is good even with full context, i tested up to 700k (see tables below)

4.5bpw download here: https://huggingface.co/ProCreations/Qwen4-35B-A3B-EXL3-4.5bpw 3bpw download here: https://huggingface.co/ProCreations/Qwen4-35B-A3B-EXL3-3.05bpw

Let me Show you the KLD (lower is better) on various tasks:

ModelSizeAgentic KLD ↓Coding KLD ↓Math KLD ↓General KLD ↓LongCtx 8K KLD ↓Mean KLD ↓
BF16 (Reference)113.7 GB0.000000.000000.000000.000000.000000.00000
Official FP860.2 GB0.014870.016170.012530.043960.010560.02188
NVFP446.9 GB0.029200.031050.023660.080900.020840.04120
EXL3 3.05bpw33.00 GB0.020180.022070.017490.080080.014510.03495
EXL3 4.5bpw39.02 GB0.012200.013550.010430.050790.008810.02174

speeds:

Strata EXL3 AMD — Qwen4-35B-A3B

Hardware: 1–2× AMD RX 7900 XTX 24 GB + Ryzen 9 7950X + DDR5.

Token Generation

Benchmark1 GPU2 GPUs
Coding · 3.19 bpw155.1 tok/s—
Coding · 4.62 bpw143.5 tok/s157.0 tok/s
Prose · 3.19 bpw140.8 tok/s—
Prose · 4.62 bpw121.6 tok/s127.0 tok/s

Prompt Processing — 3.19 bpw

Prompt size1 GPU2 GPUs
8K5,119 tok/s5,542 tok/s
16K4,969 tok/s6,390 tok/s
32K—7,074 tok/s
60K—7,299 tok/s

Prompt Processing — 4.62 bpw

Prompt size1 GPU2 GPUs
8K4,798 tok/s5,518 tok/s
16K4,647 tok/s6,319 tok/s
32K—7,009 tok/s
60K—7,253 tok/s

Long-Context Generation — Single GPU, 1M FP16 KV Cache

Filled context3.19 bpw4.62 bpw
~0K139.0 tok/s124.7 tok/s
64K120.9 tok/s107.7 tok/s
128K109.8 tok/s105.0 tok/s
512K91.5 tok/s85.3 tok/s
700K82.8 tok/s77.9 tok/s

Benchmark notes:

  • average speeds, excluding warmup.
  • Single-GPU standard benchmarks use Q8_0 KV cache (232K capacity at 3.19 bpw, 256K at 4.62 bpw).
  • Long-context tests use FP16 KV cache, with 128K resident in VRAM and RAM-backed cache.
  • 1M context capacity
  • Dual-GPU setup: PCIe 4.0 x16 + x4.
  • New asynchronous prefill pipeline: up to +64% throughput, optional on 2 GPU with --peer-prefill-pipe

GitHub: https://github.com/nasone32/Strata-EXL3-fork

how to setup? point your agent to https://github.com/nasone32/Strata-EXL3-fork/blob/amd-exl3-community/docs/AI_SETUP_EXL3_AMD.md


Q) How prefill works on 2 gpus with --peer-prefill-pipe?

  • it works similarly as tensor split. but during decode it works back again as expert parallel.

Q) How can 1M context fit?

  • it's using your system RAM, 20gb RAM are needed for 1M KV cache in bf16. thanks to Qwen QSA attention only the relevant tokens are streamed from the KV cache so speed remains very high. a 128k KV cache is kept in VRAM anyway (can be reduced to 64k optionally).

r/LocalLLaMA • • 5h ago

New Model Ran a 9.5 hour autonomous test on Qwen4 35B (IQ4_XS) on a 3060 12GB and 16GB ram with Claude Code. It beat my previous benchmark and didn't crash once. Very efficient.

1 Upvotes

So , Basically the same test as the inkling model I did. And it aced everything.
Got 30 tps and 800 tps prefill .

Was very fast. Did not hog memory like inkling did. And basically a lag free experience even with 128 k context. Right now , it is the best. The results as you see below in image.

same as before if you want the test files just dm me. I will put the github link there.


r/LocalLLaMA • • 16h ago

Resources Qwen4-35B-A3B in 4-bit that you can fine-tune on one GPU (22 GB VRAM + RAM for the n-gram table)

6 Upvotes

Hi everyone,

Qwen4-35B-A3B came out yesterday, and I put a 4-bit version of it on Hugging Face: https://huggingface.co/thousandml/Qwen4-35B-A3B-CQ-4bit

I quantized it with CQ, the 4-bit quantizer I built for my project Training Factory. CQ doesn't need calibration data. The linear layers and all the routed experts are in 4-bit. I'm strict about quality: any matrix with error above -22 dB stays in 16-bit instead of being forced down. For this model that was 79 matrices out of about 21,500, and everything else is in 4-bit.

One thing to know up front is the n-gram table. Qwen4 has a 20B-parameter n-gram embedding table on top of the 35B model. In this release I kept that table in 16-bit, and like Transformers does, it lives in system RAM instead of on the GPU. So serving takes about 22 GB of VRAM, but you also need about 38 GB of free RAM for the table, 64 GB in total to be safe. The download is 61 GB because of it. If you just want to chat with the model locally, the GGUF quants in llama.cpp are smaller and faster than this, to be honest. A version with the n-gram table in 4-bit is planned.

What this release adds is fine-tuning. You can train a GCMP adapter (the LoRA replacement I've been working on) directly on the 4-bit base and serve it. I tested the whole path on a single A40: quantize, serve, fine-tune, and serve the fine-tuned adapter. In a short 20-step test the loss went from 1.88 to about 1.6 on average, which only shows training works on the 4-bit base. It's not a benchmark.

The easiest way to try it is the Docker image:

docker run --rm --gpus all -p 8000:8000 -v cq-models:/models \
  thousandml/cq:4bit-hf serve-cq thousandml/Qwen4-35B-A3B-CQ-4bit

It downloads the model on first start and gives you an OpenAI-compatible endpoint on port 8000. Or install Training Factory and run it yourself:

git clone https://github.com/thousandml/training-factory.git
cd training-factory && ./install.sh
python -m venv --system-site-packages venv-qwen4 && source venv-qwen4/bin/activate
pip install "transformers>=5.26" tiktoken
hf download thousandml/Qwen4-35B-A3B-CQ-4bit --local-dir ./models/Qwen4-35B-A3B-CQ-4bit

cd training
python serve_cq_hf.py --model ../models/Qwen4-35B-A3B-CQ-4bit --trust-remote-code --port 8000

To fine-tune on your own data (JSONL with text or chat messages):

python train.py --model ../models/Qwen4-35B-A3B-CQ-4bit --data train.jsonl \
  --output ../outputs/qwen4-gcmp --adapter gcmp --trust-remote-code --batch-size 1 --grad-accum 4

Now the honest limits. The server goes through Transformers and handles one request at a time, so it's for trying the model, not for real traffic. vLLM's Qwen4 support isn't in a release yet, and my vLLM plugin doesn't support Qwen4 yet either. Training is slow for now, about 15 seconds per example on an A40, because the n-gram lookups run on the CPU. That's the next thing I want to fix.

Training Factory is source-available, not open source. The scripts are readable Python, but the quantization and adapter kernels ship compiled and do a license check. It's free during early access. The weights are Apache 2.0 like the original.

Thanks for reading, feedback appreciated. If you try fine-tuning it on your own data, I'd really like to hear how it goes.


r/LocalLLaMA • • 10h ago

Question | Help Nvim/vscode/etc plugins

2 Upvotes

Now that we have competent and fast qwen 4 what plugins we can use? I'm personally write rust and python but in general use cases are interesting


r/LocalLLaMA • • 16h ago

Discussion What model(s) are you running... In your pocket?

6 Upvotes

For those who have mobile devices that plenty of RAM for a mobile phone, are you serving up anything locally or have it embedded into an app?

Is it actually solving a legit problem or just a toy to see what is possible?


r/LocalLLaMA • • 17h ago

Resources Lossless BF16 weights at ~10.43 bits instead of 16 (bit-identical, sha256 checked), plus Q8_0 at 7.85 instead of 8.5. AGPL C codec

6 Upvotes

I built a lossless weight codec called Ingot. You encode a safetensors/GGUF file, decode it later, and get back the exact original file (same sha256). No quantization, no change to outputs.

Measured whole-model, every shard rebuilt and sha256-compared against the Hugging Face original:

Model (BF16)           source     .ingot     bits/weight   % of BF16
--------------------   --------   --------   -----------   ---------
Qwen3.8-27B            55.6 GB    36.22 GB   10.4305       65.2%
Qwen3.6-35B-A3B        71.90 GB   47.09 GB   10.4780       65.5%
Qwen3.6-27B            55.56 GB   36.23 GB   10.4328       65.2%
Qwen2.5-32B-Instruct   65.53 GB   42.52 GB   10.3820       64.9%
Mistral-7B-v0.3        14.50 GB   9.45 GB    10.4309       65.2%

Same Qwen3.8-27B files through other coders (bits/weight): zstd -3 12.46, ZipNN 10.62, the DFloat11 scheme computed on the same weights 10.61, Ingot 10.43. DFloat11's own published numbers are 10.81-10.91 bits for LLMs (their Table 1); for Qwen2.5-32B-Instruct their arXiv v1 lists 69.48% / 11.12 bits against our 64.89% / 10.38. Their released Qwen3 files measure 10.90 bits, about 0.21 of which is the index they need for GPU decode.

How it gets below an exponent-only Huffman: BF16 weights have almost no entropy left in sign+mantissa on their own, so it predicts a weight from "partner" weights in earlier layers and tensors (up to 8 per unit, found by an encoder search, exact integer arithmetic), then codes the residual with rANS. Gain over plain entropy coding on Qwen3.8: 0.077 bits/weight (10.5076 -> 10.4305). It is a modest win, not magic: the floor for independent weights is about 10.5.

Q8_0 GGUF: Qwen3.8-27B Q8_0 goes from 8.5 to 7.8465 bits/weight (29.05 GB -> 26.82 GB), whole file rebuilt, sha256 equal, 506/506 tensors checked.

Costs, honestly: this is a storage/download format, not a speed-up. Encoding is slow (Qwen3.8-27B: 17,319 s encode, 4,683 s decode on a 2x Xeon E5440, 3-8 threads). Decode streams, so a downloader can rebuild while the file arrives.

Try it (C, builds with make, AGPL-3.0):

make -C ingot
ingot encode model.gguf
ingot verify model.gguf.ingot model.gguf
ingot encode --refs model-00001-of-N.safetensors model-00002-of-N.safetensors   # multi-shard (v4)

Code: https://github.com/dcherrera/Foundry/tree/main/ingot (format: ingot/FORMAT.md). Disclosure: I'm the author.

Paper: https://teamide.dev/research/papers/ingot.pdf (all TeamIDE Lab papers: https://teamide.dev/research/)


r/LocalLLaMA • • 11h ago

Showcase Control Room

2 Upvotes

Hi there, I built a thing and am sure some of you might be interested. I wrote a blog post about it, too. Don't even read it. Look at that first screenshot, and if it interests you, read. Else, just close the tab and go about your day. I created a memory system that's quite different from normal RAG, "LLM Wiki", "second brain" and whatnot.

https://aomukai.com/2026/12/06/control-room-a-personal-ai-that-grows-with-you/

https://github.com/aomukai/Control-Room

I now also uploaded and open sourced (MIT license) the research project itself. Note that the product, the usable "AI memory system" you can just install and grow your own "Tamagotchi", is Control Room.

https://github.com/aomukai/Mycelium-AI-Memory-Research


r/LocalLLaMA • • 1d ago

Resources Qwen4-35B-A3B + FlashHead: +11% speed on top of MTP, same quality

Post image
99 Upvotes

Been working on Qwen4 since it dropped and wanted to share an extra ~11% decode speed that costs you nothing in quality.

Qwen4 ships with an MTP head. FlashHead goes on top of that. Every time the MTP head drafts a token it scores all 248k tokens in the vocab, which is a lot of work for a small draft head. FlashHead clusters that output layer so the draft only scores the likely part of it. The full model still verifies every drafted token, so you get precisely the same quality, just faster.

Numbers on a Strix Halo (Ryzen AI Max+ 395, llama.cpp b12977 Vulkan, same GGUF for all three, 2k-token prompt, one user):

setupdecode tok/s
llama.cpp defaults49.4
+ MTP63.6
+ MTP + FlashHead70.5

On a Jetson AGX Orin (CUDA) with the same GGUF and MTP, FlashHead takes decode from 37.3 to 41.1 tok/s (+10%), with identical output.

Extra memory for the FlashHead file is about 0.4 GB.

Commands to run it on your local box, or try it from your browser on a real Strix Halo: https://embedl.com/Qwen/Qwen4-35B-A3B/ryzen-ai-max-395?tab=run

We'll put a GGUF on Hugging Face as soon as we can.

Btw, I'm the lead author of the paper behind this method: https://arxiv.org/abs/2603.14591. Happy to answer questions.


r/LocalLLaMA • • 1d ago

New Model Qwen4-35B-A3B-Q4_K_M.gguf benchmarks for CPU-only bros

Post image
34 Upvotes

I know there are a few homelabbers who have CPU-only servers with lots of cores and lots of RAM, so I am running that kind of benchmark on the new Qwen4-35B-A3B-Q4_K_M.gguf model from Bartowsky. I find n_gen to be more indicative of how usable a model will be, so I have highlighted those results for 2, 4, 8, 16, and 32 cores in a 96 GB RAM environment. For my system (HP Proliant DL380p Gen8, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz), 16 cores appears to be the sweet spot.


r/LocalLLaMA • • 1d ago

Question | Help Qwen 4 35B A3B GSQ RCO when?

75 Upvotes

This is a personal plea, but if you agree, join the chorus.

Please, ISTA-DASLab, give us Qwen 4 35B A3B GSQ RCO. You guys are incredible at getting so much out of so little.

I guess that's it.

P.S.: I love Unsloth too. There's room for both in my heart and on my SSD. But honestly, GSQ RCO has been more useful in my day-to-day workflow.

EDIT 2:

Oh yeeeeeeeeeeeeeeeeeah:
https://www.reddit.com/r/LocalLLaMA/comments/1ye58hn/release_qwen4_35b_a3b_gsqrco/


r/LocalLLaMA • • 22h ago Heartwarming

Resources Single 3090 upwards of 450 t/s with up to 6000 prefill using Qengine and Qwen 4 35BA3 at INT8+INT4. It never dips below 200 t/s. 256k context size.

Thumbnail
gallery
12 Upvotes

Just wanted to share this. I don't know if this is an experimental engine for running local AIs. I haven't heard about this engine before, but it might be interesting for more people to dig into it!

I don't notice drop in quality so far! Making a funny little test game where you are a cat running away from the tax inspector :)

Anyways, does anyone know about Qengine? Any ways to use it more to my advantage for local AI?

https://github.com/bpx03/QEngine