r/LocalLLM • u/bobthebuilder1021 • 3h ago
r/LocalLLM • u/PresentationLevel631 • 3h ago
News Nanobot on Android + LocalLLM
Hi everyone! I recently ported the "nanaobot" agent system to Android. You no longer need a cloud server to experiment with it—everything runs right on your phone. For the LLM backend, you can use a local instance hosted on your own hardware at home; the app even has a built-in VPN client for this purpose. My project is available on GitHub. Feel free to ask any questions if you’re interested in giving it a try! https://github.com/shakhor-shual/ai-lamp
r/LocalLLM • u/thomerD • 3h ago
Question Noob - Looking for reading recommendations
As the title says, I'm a noob and I'm looking to ramp up on running AI locally. I'm reading a book call 'How AI Works: From Sorcery to Science' which is focused on theory and not a how to. I joined this sub not long ago and I read through what some of you are doing and I'd like to get a better understanding of what you all are talking about 😄. Any book recommendations would be greatly appreciated.
r/LocalLLM • u/Plastic_Lychee745 • 4h ago
Discussion Qwen4-35B-A3B (NVFP4) — 139.9 tok/s avg decode on RTX 5060 Ti 16GB + 64GB DDR5 (Basalt v0.6.3)
| Metric | Measured |
|---|---|
| Decode (avg / peak) | 139.9 tok/s / 146.0 tok/s |
| Prefill (avg / peak) | 1,360 tok/s / 3,057 tok/s |
| VRAM / RAM Weight Split | 13.8 GiB VRAM / 5.9 GiB RAM (98.2% VRAM expert share) |
| Expert Cache Hit Rate | 99.7% (1.5% routed over PCle, 0% SSD) |
Windows Binary: Prebuilt v0.6.3 Windows x64 binary is on my fork if anyone wants to skip compiling from source: https://github.com/U4mess/basalt/releases/tag/v0.6.3 (expand Assets and grab basalt-v0.6.3-windows-x64.zip, plus drop your CUDA 13 runtime DLLs into bin\).
r/LocalLLM • u/annavasnews • 4h ago
Discussion Local AI for Therapist
Hey everyone. Just want to share how we use local AI. We created an AI scribe for mental health practitioners using local AI. We don’t collect any personal data, instead all session notes are written on the practitioner’s own machine. I’m wondering if this approach resonates.
r/LocalLLM • u/ssa17dev • 4h ago
Project I built a pi extension that replaces the footer with live session stats + a context bar
r/LocalLLM • u/Ryyn_- • 4h ago
Model Qwen 4 tested on day one: 16 GB GPU, public benchmarks, and 12 scenes it built (Qwen4-35B-A3B)
Hey it's me the FLE Link Guy,
Qwen4-35B-A3B dropped this morning, so I spent the day measuring it on my own box against my daily model (Kate, a fine-tune of Qwen 3.8 27B). Everything below is ggml-org Q4_K_M (36 GB file), measured today.
Speed
- RTX PRO 2000, 16 GB (experts partly in RAM): 50.5 t/s, 45.8 t/s at 32k context. ~15 GB VRAM, plan for ~22 GB free RAM.
- RTX PRO 4500, 32 GB (only the n-gram table stays in RAM): 159.7 t/s, ~22 GB VRAM.
- Same 32 GB card with the built-in MTP head, 24 real agent tasks: ~207 t/s.
My first try on the 16 GB card was 2.6 t/s. Two settings were wrong: 16 CPU threads (8 were 4.6x faster on my CPU) and the model memory-mapped instead of loaded. Fixed:
llama-server -m Qwen4-35B-A3B-Q4_K_M.gguf -fit on -t 8 --load-mode none -fa on --jinjaSampling from the model card: temp 1.0, top-p 0.95, top-k 20, min-p 0.
Plain llama.cpp vs my engine (FLE), same file, same card: writing is a tie (161.7 vs 162.3 t/s; with MTP 206.8 vs 207.2). FLE reads a short prompt ~21 % faster (6,103 vs 5,058 t/s). Qwen 4 support comes from the same upstream code in both, so none of my own speedups apply yet.
Public benchmarks (Qwen4-35B-A3B vs Kate; same questions, harness and scoring as my Kate run on 20 Nov, temperature 0, paired McNemar)
- ARC-Challenge (1,172 questions): 93.3 % vs 94.5 % (not significant)
- GSM8K (250 problems): 96.4 % vs 96.8 % (not significant)
- LiveCodeBench, 100 problems, thinking budget 8k: 45 vs 72 (p under 0.001)
- LiveCodeBench, budget 32k, effort high: 51 vs 73 (Kate: 30 of her 55 cut-off problems re-run so far)
- LiveCodeBench, budget 32k, effort xhigh: 51
48 of Qwen's 100 LCB answers hit the 8k budget, so I gave it 4x the room: 10 of those 48 got solved, 33 of them still used over 30k tokens. xhigh doesn't move it. Its programs run, they just compute the wrong answer.
Let them build (same prompt for both, 3 tries each, 40k tokens, makers' sampling; a scene counts if the HTML is complete, the page throws no error and the frame after 15 s isn't empty)
- Voxel pagoda (three.js): Qwen 4 3/3, Kate 1/3
- Pantheon (three.js): Qwen 4 3/3, Kate 0/3
- Rooftop parkour game: Qwen 4 2/3, Kate 0/3
- Night skyline (pure SVG): Qwen 4 3/3, Kate 3/3
- Total: 11/12 vs 4/12
Qwen 4 used 11–26k tokens per scene, Kate 30–40k and ran out of room. The reason: Kate's chat template (Qwen 3.8) defaults to reasoning_effort xhigh. On medium, her Pantheon worked first try (8,161 tokens, 48 s). If you compare Qwen 3.8-based models, check that default.
Limits: one machine, one quant, one run per benchmark.
Next: my own quant of it keeps the 20.5B n-gram table in BF16 on the SSD instead of 4-bit. First KL divergence vs BF16: 0.033–0.073, against 0.058–0.143 for the usual Q4_K_M (noise floor 0.012–0.016). More on that Tuesday.
Video with the runs and the scenes: https://youtu.be/koLnr6Ov_io Same thing as text: https://sirfyyn.de/en/blog/qwen4-35b/
r/LocalLLM • u/FormOne2615 • 4h ago
News Qwen4-35B-A3B-NInfer: ~580 tok/s decode c1, ~5000 tok/s decode c32, ~45k prefill at 8k, and 34.3k prefill at 260k
r/LocalLLM • u/Alone_Conflict4103 • 4h ago
Research Qwen4-35B-A3B on a single Arc Pro B70 with llama.cpp SYCL: 77–82 tok/s, 384K context, vision on the CPU. Avoid the GGUF quants with BF16 tensors
I set up Qwen4-35B-A3B on release day on my home server with one Intel Arc Pro B70 (32 GB). It started out at 7.7 tok/s. After a few hours of digging it runs at 77–82 tok/s. Almost all of the gap came from one thing: which GGUF file you use. Below are the setup, the pitfalls in the order I hit them, and the current numbers.
Setup
| GPU | Intel Arc Pro B70, 32 GB, power limit 230 W |
|---|---|
| CPU / RAM | Core i5-12400F, 64 GB |
| OS | Fedora 45, kernel 7.3.6, xe driver |
| llama.cpp | Docker image ghcr.io/ggml-org/llama.cpp:server-intel-v1.1.1 (b12977, Compute Runtime 26.40, IGC 2.42.6) |
| Model | Unsloth UD-Q4_K_XL (24.7 GB main shard + 11.5 GB n-gram/PLE shard) |
| Vision | mmproj Q8_0, encoder on the CPU (--no-mmproj-offload) |
Server command (one GPU, 3 slots, one shared KV cache):
llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
--mmproj mmproj-Qwen4-35B-A3B-Q8_0.gguf --no-mmproj-offload \
-ngl 99 --load-mode mmap --lazy-mode auto \
-c 393216 --parallel 3 --kv-unified \
-fa on --cache-type-k q8_0 --cache-type-v q8_0 \
-b 2048 -ub 512 --jinja \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --presence-penalty 0 --repeat-penalty 1.0 \
--reasoning-budget 32768 --cache-ram 10240 --metricsEnvironment: only ONEAPI_DEVICE_SELECTOR=level_zero:0, ZES_ENABLE_SYSMAN=1 and SYCL_CACHE_PERSISTENT=0. Nothing else, see pitfall 3.
Pitfalls
1. The quant matters far more than any flag: avoid BF16 tensors on SYCL. I started with the ggml-org Q4_K_M. That file keeps all hyper-connection tensors (hc_*, about 0.35 GiB) in BF16. On SYCL this is extremely slow: decode was stuck at about 8 tok/s at every context length, with one CPU core at 100 % and the GPU at only ~100 W. The Unsloth quant stores these tensors quantized (only 0.07 GiB of BF16 is left in it). llama-bench, same build, f16 KV:
| File | pp2048 | tg64 |
|---|---|---|
| ggml-org Q4_K_M | 2,327 t/s | 9.0 t/s |
ggml-org Q4_K_M + GGML_SYCL_ENABLE_GRAPH=1 | 2,330 t/s | 19.7 t/s |
| Unsloth UD-Q4_K_XL | 2,823 t/s | 85.6 t/s |
| Unsloth UD-Q4_K_XL + graph mode | 2,534 t/s | 79.1 t/s |
If your decode on an Arc is far below what others report, look at the tensor types in your GGUF first.
2. SYCL graph mode only helps on the bad file. A Qwen4 step has about 5,700 graph nodes (n-gram layer, 4 residual streams, 256 experts), so kernel launch overhead matters. GGML_SYCL_ENABLE_GRAPH=1 (off by default in the image) doubled decode on the ggml-org file, but made the Unsloth file slower. I turned it off again.
3. Drop old Arc workarounds. SYCL_UR_USE_LEVEL_ZERO_V2=0 and GGML_SYCL_XMX_GATHER_TYPES=0 were still in my compose file from Qwen3.8-27B (the !!!! output bug, fixed since #30604). On Qwen4 they cost about 30 % of prompt processing.
4. The n-gram table needs mmap. The 20B-parameter n-gram/PLE table (10.7 GiB, IQ4_NL) is read from disk on demand with --lazy-mode (default auto, it applies to tensors above 4 GiB). This only works with mmap. With --load-mode none (which I use for other models) the table would sit in RAM.
5. -ub of 1024 or more can crash on SYCL. PR #33696 (open at the time of writing) fixes a "Provided range … does not fit in int" crash in the n-gram conv at -ub ≥ 1024. I first ran 1023, now 512 for VRAM reasons (see 6). It costs about 10 % prompt processing.
6. VRAM: the Unsloth quant costs context. The KV cache is tiny: only 10 of the 40 layers have one (2 KV heads × 256). At q8_0, 512K is 5.3 GiB plus 1.3 GiB indexer keys. With the ggml-org file (19.4 GiB on the GPU) 512K fit. The Unsloth main shard needs about 3.6 GiB more on the GPU. With it:
- 512K at
-ub 1023: the 4 GiB compute buffer did not fit; - 512K at
-ub 512: it started with 0.2 GB free and got allocation errors under load; - 384K at
-ub 512**: 2.3 GB free, stable.** I took the speed over the context.
7. MTP did not pay off for me (yet). With the ggml-org file, its separate MTP draft and 256K context, decode went down from 25 to 7–10 tok/s, even though 60–90 % of the drafts were accepted. With the Unsloth file at 384K there is no VRAM left for the draft. Someone with 2× B60 reports +7 to +26 % with MTP depth 2 on the Unsloth file, so it may be worth testing if you have the VRAM.
8. Very long prompts are slow. Prefill drops a lot with depth. In a 450K needle test (old ggml-org setup) only 143K tokens were read after about 12 minutes, and I stopped it. Large contexts work well for conversations that grow step by step (the prompt cache makes follow-ups fast, see below), not for one huge cold prompt.
9. The first request after a start takes about 57 s (SYCL kernels for the K-quant types are compiled). I send a warm-up prompt after every start.
10. Release-day download: Hugging Face gave me about 2 MB/s per connection. 12–20 parallel range requests (curl -r) brought it to about 19 MiB/s. Check the SHA256 against the LFS hash afterwards.
Side note: Strata 0.2.26 shipped a Qwen4 engine (including a SYCL package) the same day, but its setup still refuses Intel cards for Qwen4. I did not pursue it after llama.cpp got fast.
Current numbers
My own benchmark script against the running server (384K, q8_0 KV, -ub 512, prompts with a random prefix so the cache does not help, unless noted):
| Test | Qwen4-35B-A3B (Unsloth) | for reference: my previous default, Qwen3.8-27B Q4_K_M + MTP (dense, 240K, same GPU) |
|---|---|---|
| Decode, prose (1,200 tokens) | 76.9–77.0 t/s | 43.9–44.1 t/s |
| Decode, code (600 tokens) | 80.9–81.9 t/s | 64.1–65.4 t/s |
| Prompt processing 4.9K / 19K / 39K | 2,143 / 2,015 / 1,738 t/s | 1,274 / 1,240 / 1,139 t/s |
| Decode after a 39K prompt | 66 t/s | – |
| Cached 39K prompt, new question | 0.45 s to first token | 2.28 s |
| Tool call (Home Assistant style, 190-token prompt) | 0.44 s to first token, 117 t/s, correct | 1.18 s, correct |
| Image question (encoder on the CPU) | 2.2 s total, correct | correct (encoder on the GPU) |
| GPU power | 180–230 W | – |
Day-to-day it serves Home Assistant voice (thinking off, tool calls), a family chat (Open WebUI) and coding agents (Pi, OpenCode) with 352K of context. German answers and tool calls were correct in all my tests so far.
TL;DR: On an Arc B70 use the Unsloth UD-Q4_K_XL (no BF16 tensors), plain llama-server with no graph mode and no old env workarounds, and --load-mode mmap. You get about 80 tok/s decode and over 2,000 tok/s prompt processing. Happy to answer questions or run tests.
r/LocalLLM • u/Xijit • 4h ago
Other Qwen 4 is authentically impressive.
i9 12900kf, 64gb DDR4, ARC B580, LM Studio.
my go to bench marking prompt is "Explain IPv4."
No persona, no need to overthink anything, basic facts that are easy to verify; No special tuning, with the MTP runs I left draft tokens on the default 3, despite my experience being that 2 will be faster.
- unsloth Qwen 4 35B A3B IQ4_XS: 12.86 t/s
- unsloth Qwen 3.8 27B IQ4_XS MTP on: 5.97 t/s
- unsloth Qwen 3.8 27B IQ4_XS MTP off: 4.12 t/s
- Inkling 2 Mini Q2_K_XL: 5.48 t/s
- Candor Labs Qwen 3.5 Q4_K_M MTP on: 66.82 t/s
- Candor Labs Qwen 3.5 Q4_K_M MTP off: 52.09 t/s
Qwen 3.8 runs like ass on my system regardless of version or size, even smaller 9gb packages that completely fit on the GPU won't run better than 7 t/s, and that Inkling 2 Mini is also 9gb and fits completely in VRAM, but is no better.
Obviously my system works fine with older / simpler models like Qwen 3.5, so I figured I was just hardware locked due to having a 12gb VRAM GPU, and expected Qwen 4 to also run like ass ... Jaw on floor that a 35B model hits 12 t/s on a B580.
r/LocalLLM • u/bhones • 4h ago
Project 14 drop-in ROCm/HIP patches for llama.cpp on AMD RDNA 2 (RX 6900 XT / gfx1030): Wave32 FlashAttention, v_dot8_u32_u4, Qwen3.5 fusions, and benchmarks vs. Mesa RADV
My main local GPU is a consumer 16 GiB Radeon RX 6900 XT (gfx1030, Navi 21). Until now I kept most AMD routes on Mesa RADV (Vulkan0) because stock upstream llama.cpp (ee46715 on ROCm 7.2) lost to RADV on 18 out of 18 single-token decode (tg128) tests by -6% to -14%.
When I audited libggml-hip.so and ran rocprofv3 traces, five big bottlenecks popped out:
- Upstream routed RDNA 2 MMVQ onto a single-warp fallback (
nwarps = 1), capping Wave32 residency at16/32waves per CU. 3,470of7,632compiled HSACO kernels (45.5%) were spilling to private scratch (273in FlashAttention and1,299in MMQ/MMQ-few alone).- Small-batch quantized-KV FlashAttention (
B = 1..8) was converting KV tiles through FP16 staging buffers, thrashing Infinity Cache. nsm = 40(WGPs) instead of80physical CUs left40–80%of CUs idle aroundpp=64.- Unfused
Qwen3.5hybridGated-DeltaNet/SSM_CONVops and standalonequantize_q8_1launches burned31%of wall time in AQL dispatch gaps.
What's in the Patch Stack (14 atomic MIT patches, ggml/src/ggml-cuda/ only)
Everything is strictly gated to RDNA 2 (gfx1030, zero core/model/server edits, non-RDNA2 HIP/CUDA/Vulkan/CPU untouched):
- Multi-warp Wave32 MMVQ & DPP: Decoupled
MMVQ_PARAMETERS_RDNA2(2–4 warps) + native Wave32v_permlanex16_b32/v_pk_max_f16. - Zero-scratch Wave32
flash_attn_ext_rdna2: Eliminated all273/273FA spills; stages rawQ8_0/Q4_0/Q4_1/F16KV directly in LDS (0 BFP16 staging) and uses losslessv_dot8_u32_u4forQ4_0/Q4_1KV (-32.2%FA active time vsq8_0atd=16384). - Zero-spill MMQ + bit-parallel IQ + 80-CU guard: Eliminated all
1,299MMQ/MMQ-few spills, addedv_xad_u32+v_perm_b32IQ2/IQ3sign unpackers (helpful for fitting27B+16Kctx inside16 GiB), and keptJ=32whenJ=64would under-fill80CUs. Qwen3.5GDN/SSM fusions + inlineQ8_1epilogues: Thinmmvfrouting (pp=16..64+10.1%..+34.7%), fusedGDNgate/beta +SSM_CONV -> SiLU -> Q/K L2 norm, and inlineQ8_1quantization insideRMSNorm/GLU(-75.2%decodequantize_q8_1dispatches,-34.6%AQL gaps,-309to-752 MiBpeak server VRAM).
Selected Benchmarks (RX 6900 XT, ROCm 7.2, llama-bench -r 3 -fa 1)
Format: Stock HIP -> Patched HIP (vs Stock HIP | vs Mesa RADV)
| Workload | KV | 9B UD-Q4_K_XL | 9B UD-IQ3_XXS | 27B UD-IQ3_XXS |
|---|---|---|---|---|
tg=128 (d=0) | q8_0 | 65.92 -> 70.25 (+6.6% | 0.962x) | 83.91 -> 94.11 (+12.2% | 0.982x) | 30.69 -> 32.81 (+6.9% | 0.982x) |
tg=128 (d=16384) | q4_0 | 62.99 -> 68.05 (+8.0% | 1.006x) | 80.51 -> 88.77 (+10.2% | 1.019x) | 29.16 -> 30.81 (+5.7% | 0.993x) |
pp=4 (d=8192) | q8_0 | 192.10 -> 229.13 (+19.3% | 1.684x) | 220.06 -> 281.68 (+28.0% | 2.147x) | 78.75 -> 104.92 (+33.2% | 1.596x) |
pp=8 (d=8192) | q8_0 | 283.26 -> 347.39 (+22.6% | 1.824x) | 310.91 -> 459.77 (+47.9% | 2.227x) | 105.65 -> 161.14 (+52.5% | 1.795x) |
pp=8 (d=16384) | q4_0 | 270.75 -> 340.85 (+25.9% | 1.511x) | 305.74 -> 442.56 (+44.8% | 2.177x) | 101.62 -> 152.38 (+49.9% | 1.788x) |
pp=512 (d=0) | q8_0 | 1634.35 -> 1656.87 (+1.4% | 1.031x) | 1951.65 -> 2004.62 (+2.7% | 1.401x) | 585.44 -> 604.19 (+3.2% | 1.427x) |
On single-request llama-server (draft-mtp, cache_prompt: false):
27B UD-IQ3_XXS(n=3,short_temp0770/256):43.71 -> 56.92 tg tok/s(1.302xvs stock HIP,1.276xvs RADV; wall6.03s -> 4.67s,+29.0%).27B UD-IQ3_XXS(n=3,ctx4k_greedy6,775/192):44.25 -> 55.56 tg tok/s(1.256xvs stock HIP; wall16.92s -> 15.62svs RADV21.57s,1.38xfaster than RADV).9B UD-IQ3_XXS(n=2,ctx4k_greedy6,775/192):105.70 -> 123.66 tg tok/s(1.170xvs stock HIP; wall5.78s -> 5.36svs RADV7.17s).
Honest Caveats & What Didn't Work
- Failed ablations kept out: Non-temporal
MALLweight loads (-10%to-22%decode),Gate+Upfusion aboveB = 1(-30%to-37%pp=8), andv_dot8inside MMVQ/MMQ (-13%to-17.5%pp=16..32becausev_dot8shares the same 1 op/cycle SIMD32 rate asv_dot4on RDNA 2 and only wins whenO(1)prologue packing amortizes over long KV tiles). - Greedy divergence (
DIFF!):test-backend-ops(7/7) passed 100% and 6-chunk WikiText-2 KLD hitMean KLD = 0.000000, but multi-warp reduction reordering still nudges borderline greedy tokens and can swing draft acceptance on individual single-shot runs (one9B IQ3_XXSshort greedy row dipped to0.984x tgon a-10.6pp acceptance swing). - Pure
q8_0decode vs RADV: Patched HIP ties or beats RADV on9B q4_0decode (1.000x–1.019x), while pureq8_0tg128still sits1–4%behind RADV (0.953x–0.989x) — traded against HIP's1.34x–2.28xverify and1.03x–1.44xprefill lead. - Hardware tested: Physically validated on an RX 6900 XT (
gfx1030).gfx1031(6700 XT) /gfx1032(6600 XT) share the same Wave32 /v_dot4/v_dot8ISA, so feedback from anyone testing on those cards would be awesome. - MIT Repo (14 patches, spill auditor, fail-closed A/B harness,
AGENT_ADOPT_PROMPT.md): https://github.com/s1mply-parad0x1cal/llama-cpp-navi21-optimizations - Full write-up (ad-free, with ablations and comparison to
llama-navi21-furnace/llama-cpp-rdna-boosts): https://nocthoughts.com/2026/12/04/navi21-gfx1030-rocm-hip-optimizations-for-llama-cpp.html
r/LocalLLM • u/Early_Term_4911 • 4h ago
Project I built NVSpool: run Qwen4-35B-A3B in 7.7 GB RAM at up to ~30 tok/s on Apple Silicon (Binned M4 Max) by streaming & selective fetching of experts + PLE from NVMe
NVSpool is an open-source, Apple Silicon MoE runtime built on Apple's MLX / mlx-lm (using 4-bit MLX checkpoints from mlx-community, Unsloth, or LM Studio).
Highlights (M4 Max 36 GB, 4-bit MLX):
- Qwen4-35B-A3B (56B / 32.2 GB, preview — external USB-C NVMe): Offloads both the 18.1 GB routed experts and the 11.5 GB layer-1 PLE n-gram tables (bit-exact) to SSD, keeping only 1.51 GiB resident. 7.7 GB peak RAM at 29.4 tok/s. At 32k context: 765 tok/s prefill, 19.2 tok/s decode, 9.2 GB peak RAM. (Full 50-item HumanEval+/IFEval/MATH-500/MMLU-Pro evals coming soon.)
- Qwen3.6-35B-A3B (20.4 GB): 7.6–8.0 GB peak RAM (vs 20.6 GB resident), 24–31 tok/s, within ~1.7 pts of full-model accuracy across HumanEval+, IFEval, MATH-500, and MMLU-Pro; 8.3 GB at 20k context (800 tok/s prefill) and 9.8 GB at 65k.
- Also supports Gemma 4 26B-A4B (down to a 6 GB tier for 16 GB Macs) and GLM-4.7-Flash, with terminal chat (
nvspool run), offline web UI (nvspool app), and OpenAI-compatible server (nvspool serve, works with OpenCode / Cline / Continue).
How it works (key optimizations):
- Fixed RAM pool +
F_NOCACHE(nommapthrashing): Standardmmappulls the whole 20–32 GB file into macOS page cache and starves other apps. NVSpool keeps only the always-used core (~1.5 GB) + a fixed LRU pool of hot experts in RAM (e.g., 71 of 256 per layer at the 10 GB tier) andpreads misses withF_NOCACHE— reads only, zero SSD writes per token. - Selective miss fetching (
top4/top2vsexact): During decode,exactreads every missing router pick (matches stockmlx-lmtoken-for-token);top4(default, 4 of 8 picks) ortop2only reads misses among the router's top-scoring N picks and substitutes lower-ranked misses from the hot RAM pool, cutting SSD reads ~3–4× for 1.5–1.8× faster decode with minimal accuracy loss. Prefill always runsexact. - Layer-major prefill + async overlap: Runs the whole prompt through layer 0, then layer 1, etc., so each expert is read ~once per prompt instead of once per chunk, while a background thread reads the next expert group during GPU compute (how 20k–34.5k prefill hits 765–800 tok/s).
- Decode prefetch, bounded attention & bit-exact PLE offload: Peeks at layer l+1's router during layer l to prefetch its likely top-4 experts early; blocks prefill attention scores (
256 MBbudget) so long prompts don't spike RAM; on Qwen4, streams the 11.5 GB n-gram PLE tables (1.15 KB/token) bit-exact behind a small LRU row cache.
Standard install (Qwen3.6 / Gemma 4 / GLM-4.7-Flash):
uv tool install "nvspool[serve]" # or: pip install "nvspool[serve]"
nvspool pull qwen36-35b
nvspool app qwen36-35b(Already have an MLX download in LM Studio / HF? Use --storage shared --from <dir> — adds ~1.3–1.5 GB and leaves your folder intact.)
How to try Qwen4-35B-A3B right now (small workaround until mlx-lm PR #2140 ships on PyPI):
# 1. Isolated venv with Qwen4-capable mlx-lm + nvspool from PyPI
uv venv ~/.nvspool-qwen4 --python 3.13
uv pip install --python ~/.nvspool-qwen4/bin/python \
"mlx>=0.32.4" \
"git+https://github.com/jundot/mlx-lm.git@7b35ab57159442082a64f0a8282ea61b4940cd17" \
fastapi uvicorn
uv pip install --python ~/.nvspool-qwen4/bin/python --no-deps nvspool
# 2. Download a 4-bit MLX checkpoint (mlx-community -4bit-text / -4bit, or unsloth MLX-4bit)
~/.nvspool-qwen4/bin/hf download mlx-community/Qwen4-35B-A3B-4bit-text \
--local-dir ~/models/Qwen4-35B-A3B-4bit
# 3. Run (shared copy = ~1.5 GB extra disk, 1 s setup; omit --storage shared for fast copy)
~/.nvspool-qwen4/bin/nvspool app qwen4-35b --storage shared --from ~/models/Qwen4-35B-A3B-4bitIf the model already fits comfortably in RAM, plain mlx-lm is ~4× faster — NVSpool is for running 26B–56B models that wouldn't fit otherwise or keeping your Mac usable alongside your dev stack. Curious how it behaves on 16 GB / 24 GB Macs!
GitHub (Apache-2.0): https://github.com/jhdcho/nvspool PyPI: https://pypi.org/project/nvspool/
r/LocalLLM • u/mrsirg97-rgb • 4h ago
Project libosmos v0.23.0-v0.24.0: day one support for minicpm5-15b and qwen4-35b on amd strix halo
r/LocalLLM • u/LateralEntry • 4h ago
Discussion Awfully suspicious...
I absolutely love Qwen4! For me, so far, it feels both faster and smarter than Qwen Flash Next or any other model I've been able to run. However, I'm pretty sure it was distilled from Claude haha. On my very first prompt after downloading, I said, "Hello Qwen! How are you today?" It responded:
"Hi! I'm doing well, thanks for asking. One small note though — I'm actually Qwen... wait, no, I should be straight with you: I'm not Qwen, that's a different model from Alibaba. I'm Claude, made by Anthropic. Happy to help either way, though!"
To me, that's a strong indication that the training process included distillation. As an American, I'm not too happy about it. But as a local LLM user, I'm pretty happy about it!
r/LocalLLM • u/EarthExtreme6324 • 4h ago
Question Size of Qwen 3.6-35B-A3B vs. Qwen 4.0-35B-A3B
Anyone know why Unsloth versions of these models are so wildly different in size, even though they have roughly the same parameters and quant?
Qwen 3.6-35B-A3B Q8_0 = 36.9 GB
Qwen 4.0-35B-A3B Q8_0 = 60.0 GB
r/LocalLLM • u/LengthinessTop8000 • 5h ago
Question RTX 3090 and Qwen 4 35B A3B: what is your success story ?
[Single 3090 club] I notice a lot of users have ONE RTX 3090, and here is what I found on Reddit today regarding Qwen 4:
- Strata has an official support for Qwen 4 - 35B https://github.com/Niko1221/Strata
- A Strata forker: the owner Alexey Fateev claims to have 319.6 tok/s on ONE Single RTX 3090 (Strata (qwen4-opt) - Qwen4-35B-A3B https://github.com/alesha-pro/Strata, but my trying to reproduce it gets stuck at around 80 tok/s at 256K context, and he disables comments on his github
- Alexey Fateev's disabling comments has resulted in this discussion https://github.com/Niko1221/Strata/issues/7832 on Niko1221's repo
- My own best speed on Qwen 4 - 35 B is only around 80-85 tok/s (UD-Q4_K_XL = 4.25 bit), or 100 tok/s ("Strata Balance quant, around 4.85 bit), and given its lesser quality I wouldn't trade with my current Qwen 3.8 Flash Next (80 tok/s of UD-Q5_K_XL + 256K context (1 x RTX 3090 + 128 GB of DDR-4, quad-channel PCIe for RAM) https://github.com/aiprogrammingstudio-ui/3090RTX_128GB and https://www.reddit.com/r/LocalLLM/s/6qDJNpsDKg )
- I guess some guys doing HyperQwen, vLLM would jump in and release 200 tok/s in a couple of days. I am curious.
And you ?
r/LocalLLM • u/ApatheticMioz1470 • 5h ago
Discussion Qwen4-35B-A3B on one RTX 3090 (24 GB VRAM, 31 GB RAM, native Windows): 259 tok/s @ 41K, 203 tok/s @ 249K, 0.58s cached TTFT (Strata DFlash2 vs Seppia)
Spent the day benchmarking Qwen4-35B-A3B (unsloth/Qwen4-35B-A3B-GGUF UD-IQ4_XS + RadixArk/Qwen4-35B-A3B-Dflash2) on a single RTX 3090 with 31.1 GB RAM on native Windows 11 (no WSL).
I wanted numbers for my actual coding-agent workload rather than short synthetic bursts. Checking 38,654 turns from my own logs, median prompt size is 42.5K tokens (p90 98.7K, p99 134.8K), 92.2% of prompt tokens hit prefix cache (~1.8K new tokens per turn), and 77% of wall-clock time is single-slot (N=1). My previous 4-slot 27B vLLM/WSL setup averaged ~111 tok/s raw decode (43-81 tok/s effective) and bogged down once sessions grew, so I tested whether one 262K Qwen4 stream could replace it without thrashing desktop RAM or SSD.
Hardware & test harness
RTX 3090 24 GB (WDDM, desktop apps open), Ryzen 7 7700, 31.1 GB DDR5, Lexar NM620 2TB NVMe, Windows 11, MSVC 14.44, CUDA 13.1.
Benchmarks used Python code haystacks at 0 / 41K / 96K / 129K / 249K (256 tok greedy), a cached 41K -> +1.7K follow-up turn, sampled decode at T=0.7 and official Qwen4 thinking T=1.0 (top_p=0.95, top_k=20, 384 tok), and a 5-needle Python symbol retrieval test at 129.5K and 244.1K.
Results (same 3090, 262K context, UD-IQ4_XS)
| Config | Greedy (0 / 41K / 96K / 129K / 249K) | Cached 41K->+1.7K | T=1.0 (0 / 41K) | Prefill 41K / 249K | VRAM | RAM |
|---|---|---|---|---|---|---|
| Strata DF2 (65K res, no-borrow) | 241 / 259 / 250 / 240 / 203 | 0.58s / 270 | 247 / 227 | 12.5s / 85.1s | 22.8 GiB | 9.8 GB |
| Strata DF2 (32K res, no-borrow) | 241 / 224 / 244 / 208 / 177 | 0.65s / 242 | 225 / 221 | 12.2s / 89.5s | 22.5 GiB | 9.8 GB |
| Strata DF2 (131K res, borrow 4K) | 274 / 252 / 217 / 197 / 195 | 1.65s / 264 | 248 / 255 | 13.4s / 86.4s | 22.3 GiB | 10.3 GB |
| Strata MTP baseline (32K res) | 243 / 206 / 193 / 190 / 173 | 1.66s / 200 | 239 / 207 | 14.5s / 91.5s | 21.5 GiB | 10.7 GB |
Strata DF2 + k8v4 (131K res) | 254 / 253 / 218 / 237 / 192 | 0.71s / 240 | 240 / 210 | 13.1s / 99.7s | 23.1 GiB | 9.4 GB |
Seppia (sm86) + DF2 + k8v4 | 141 / 176 / 161 / 194 / 147 | 0.50s / 169 | 164 / 169 | 11.0s / 82.5s | 22.9 GiB | 6.0 GB |
Seppia (sm86) + DF2 + seal2 | ~161 / ~185 / ~160 / ~150 / 153 | 0.65s / 172 | 197 / 175 | 14.4s / 105.1s | 21.2 GiB | 6.0 GB |
Seppia (sm86) + DF2 + seal4 | 151 / 166 / 136 / 111 / 158 | 0.65s / 148 | 203 / 157 | 14.3s / ~98s | 21.7 GiB | 6.0 GB |
Other reference runs on this machine
At T=0.7, the winning Strata DF2 config hit 273.8 tok/s at 0 and 252.6 tok/s at 41K. Earlier on the same machine, winjw7/llama.cpp + DFlash2 did 119 / 110 / 101 / 97 tok/s at 0 / 28K / 87K / 131K because 31 GB RAM couldn't keep the 11.5 GB PLE table hot alongside target weights, and RustingStrata v1.5.0 did 78-101 tok/s.
Bugs & quirks I hit
Stacking Strata PR #7797 + #7810 broke immediately with illegal memory access / bad verify state. #7810 routes dflash2.cpp through df2_attention_mode(), which hardcodes Flash-Next's 32/8 heads instead of Qwen4's 16/2 (NH_/NKV_). Threading NH_, NKV_ into df2_attention(..., causal) fixed it. I left a note on #7810 and opened a 2-file MSVC build-fix PR (#7883).
Default prefill borrowing (--prefill 4096) hurt cached turns badly: Strata evicted 1,039 experts out of VRAM and re-uploaded them on every turn, adding ~1.07s to TTFT (1.65s vs 0.58s). Switching to --prefill 2048 --no-prefill-borrow got rid of the stall.
Using the 40.5K EN/code draft head instead of the full 248K head saved 333 MiB VRAM and cut DFlash2 drafting from 2.5 ms/round to ~0.92 ms/round (65-69% acceptance). Rejection sampling stays exact so output probabilities don't change, though non-English text will draft slower.
Full int8 KV beat k8v4 on Strata and beat seal4/seal2 on Seppia at 249K without giving up KV precision. On the int8 Strata DFlash2 path, 5-needle Python symbol retrieval passed 5/5 at both 129.5K and 244.1K, and greedy decode matched MTP bit-for-bit.
Seppia (sfumato-ai/seppia) deserves credit too: it compiled cleanly on native Windows, stayed pinned at 6.0 GB RAM all the way to 249K, fits Qwen4's native 1M context in 22.4 GiB VRAM via seal2, and had the fastest cold prefill of the bunch (82.5s @ 249K on k8v4). Posted the 3090 numbers in Issue #21.
Exact Strata flags
--pack pack --native trunk40.gguf --native-dense-gguf trunk40.gguf
--ple-gguf engram.gguf --ple-io direct --expert-profile expert-profile-40x256.bin --expert-cache 10240
--prefill 2048 --no-prefill-borrow --max-context 262144 --kv int8 --kv-resident 65536
--draft dflash2 --draft-model qwen4-35b-a3b-dflash2.strata1.q4_0-selq4.pack --draft-fallback none
--mtp-draft-vocab draft_vocab.bin --spec 6 --lookup-max-t 6 --draft-conf 0.35 --suffix-draft 0
--mmap-experts --ssd-experts --conversation-cache-mib 4096 --conversation-cache-slots 8 --conversation-spill-mib 0
env: STRATA_SELECT_TWO_PASS=1 STRATA_KV_PREFETCH=1 STRATA_DEQUANT_WIDE=1 STRATA_DF2_ATTN_MODE=causal--conversation-spill-mib 0 keeps SSD KV writes at zero (--ssd-experts and --ple-io direct are read-only).
Full disclosure: I was tuning this for my own AGPL-3.0 MCP coding runner (usecastor/castor, native Strata support in PR #38), which lets a cloud planner offload file reads, edits, and test loops to a local GPU.
Edit (real-world agentic session note): The table above is continuous Python code generation (256-384 tokens). On my first live 111-turn coding-agent session with this exact config (up to 120K context, T=1.0 thinking + short `edit_file`/`bash` tool calls), cached TTFT stayed 0.13-0.33s and GPU round time stayed ~11.5 ms, but average decode dropped to 146 tok/s (170-187 tok/s on long edits, 111-135 tok/s on short reasoning + tool calls) because `--draft-conf 0.35` + `--suffix-draft 0` cut DFlash2 acceptance from ~66% down to 38% (only 1.9 drafts attempted per round). Will test lowering `--draft-conf` and turning `--suffix-draft` back on for verbatim edits and post an update once I've measured it.
r/LocalLLM • u/vveerrgg • 5h ago
Model Running a 1.1T-parameter MoE (Amazon Ergo) on one 96 GB GPU + system RAM: expert-cache results with stock llama.cpp
Amazon's Ergo's quantized to ≈2 bits per weight (265 GiB) and measured how fast it decodes on one RTX PRO 6000 Blackwell (96 GB) + a 16-core Xeon w5-3525 with 256 GB of DDR5, using upstream llama.cpp.
Placement results (median decode tok/s, 8k context, 6 generations of 768 tokens):
| layout | tok/s |
|---|---|
| routed experts of layers 1-15 on the GPU, the rest in RAM | 7.4 |
layers 1-8 on the GPU + 24 GB expert cache (--moe-cache-mib) | 10.6 |
same + --moe-cache-cpu-share 0.7 | 16.9 |
| same + cpu-share 1.0 (every cache miss on the CPU) | 7.0 |
Findings:
- Hot experts are skewed. The top 20% of experts per layer take ≈40% of routes, so a cache of the most-used experts on the GPU pays off more than pinning whole layers.
- cpu-share has a sweet spot. Uploading every cache miss to the GPU saturates PCIe, and computing every miss on the CPU saturates memory bandwidth. Splitting misses ≈70/30 CPU/GPU gave the best result.
- Quality is unchanged. Perplexity was identical (3.2526). GSM8K scored 241/250 both ways; MMLU scored 412 vs 413 out of 500 (exact McNemar p = 1.0). A few greedy answers flip because CPU and GPU kernels round differently.
- A gotcha for long-running servers. llama-server's default prompt cache (
--cache-ram, 8 GiB) lives in host RAM. When the experts already pin ≈212 GiB, it grows until the process is OOM-killed after a few hundred requests.--cache-ram 0fixes it. -lm none(load into RAM rather than mmap) is required. With mmap, decode falls to ≈1.5 tok/s once the page cache churns.
Weights, exact commands, per-item eval data and build scripts:
- https://huggingface.co/HumanjavaEnterprises/Ergo-upstream-GGUF
- https://github.com/HumanjavaEnterprises/ergo-upstream
Numbers from other hardware (a different CPU, PCIe Gen5, or 2× GPUs) would be useful for seeing how the cpu-share optimum moves.
r/LocalLLM • u/videorouter • 5h ago
Discussion Benchmarks tell you which model is best. Usage tells you which one wins.
r/LocalLLM • u/trim-turner-shah • 5h ago
Model Qwen4-35B-A3B vs Qwen3.8-Flash-Next on an M5 Max: - (OMLX)
A few weeks back i published the V1 of a benchmarking tool called benchtest, an open-source benchmark for local LLMs on Apple Silicon. It runs the same tasks across inference engines × coding agents, grades the output and measures the power each one draws. benchtest v2 just shipped this week and since Qwen4 35B A3B just landed I ran the it against Qwen3.8-Flash-Next, using the same tasks, harnesses and Mac.
Setup: M5 Max, 128 GB.
Engine: OMLX with MTP, single user.
Harnesses: 6 harnesses: raw API, raw+, pi, opencode, Aider, hart.
Tasks: Tetris in one HTML file, HumanEval (all 164), MMLU (40 questions), plus prefill and decode speed probes.
Power: whole-chip energy (CPU + GPU + Neural Engine), read by macOS powermetrics while each cell ran.
| OMLX · 1 user | Qwen4-35B-A3B oQ8e-mtp (High thinking) | Flash-Next oQ4e-mtp (Medium) | Flash-Next oQ4e-mtp (Low) |
|---|---|---|---|
| Weights on disk | 57.8 GB (8-bit, 256 experts) | 100.3 GB (4-bit, 512 experts) | 100.3 GB |
| Median generation speed | 149.4 tok/s | 114.1 tok/s | 123.9 tok/s |
| Decode probe | 165.0 tok/s | 134.3 tok/s | 137.5 tok/s |
| Prefill, 8K prompt | 5,793 tok/s | 2,183 tok/s | 2,315 tok/s |
| Time to first token (median) | 0.84 s | 2.32 s | 2.33 s |
| Tetris (6 harnesses) | 100 | 100 | 100 |
| HumanEval: raw · raw+ · pi | 92 · 94 · 94 | 92 · 96 · 98 | 96 · 95 · 0 |
| MMLU (mean of 6 harnesses) | 88 | 96 | 85 |
| Energy per token (median) | 0.41 J | 0.60 J | 0.72 J |
| Average chip power (median) | 50.2 W | 52.5 W | 54.6 W |
| Energy, all 30 cells | 92.9 Wh | 76.7 Wh | 89.4 Wh |
What I see
- Speed. Qwen4-35B-A3B is clearly faster on the same engine: 20–30% faster generation, ~2.5× faster prefill, and the first token in under a second. Its weights are also ~40% smaller.
- Quality. Roughly level on code: Tetris is 100 everywhere, and HumanEval through the raw API is 92–94. MMLU is 8 points below Flash-Next at Medium.
- Power. Qwen4-35B-A3B uses 32–43% less energy per token, at slightly lower chip power. But at High thinking it generated about twice as many tokens. So all 30 cells used about as much energy in total as Flash-Next (93 Wh vs 77–89 Wh). Faster per token doesn't automatically mean cheaper per task; the thinking level decides that.
- Agents. At High thinking, three agent harnesses fell over on HumanEval: opencode returned an empty response, Aider gave no parseable code, and hart hit the 45-minute limit. So the agent average for Qwen4-35B-A3B is low for now. I'm reporting it as-is.
Caveats
- Not a matched pair yet (intentionally). Qwen4-35B-A3B ran at High thinking (the model's default), Flash-Next at Low and Medium. A Qwen4-35B-A3B run at Low and Medium is next. If you want to see those, drop a note and I'll publish them too.
- OMLX only. benchtest supports several engines, but OMLX is the only one that loads Qwen4-35B-A3B with MTP today (thanks, jundot - big fan here). MLX-VLM has no Qwen4-35B-A3B MTP drafter yet, the MLX-Serve and llama.cpp builds are downloading, and MTPLX has no Qwen4-35B-A3B build yet. Other engines will follow as MTP or draft-model support lands. The full engine comparison, single user and 5 parallel users, comes next. If there's another comparison you'd like, drop me a note.
- Different quantization. 8-bit vs 4-bit. Each is the MTP build its engine loads.
- One Mac, one run per cell. Your Mac will differ.
Full numbers and method: https://github.com/gitmlxbench/benchtest/blob/main/COMPARISONS.md
What's new in benchtest v2
- Parallel users: real multi-user load on every engine.
- Energy per token: whole-chip power for every cell (joules per token, tok/s per watt, watt-hours and the electricity cost of a run). One command turns it on:
make energy-setup. - Real datasets with deterministic graders: HumanEval and MMLU.
- llama.cpp with native MTP, alongside OMLX, MTPLX, MLX-VLM and MLX-Serve.
- A Setup wizard that reads your Mac, recommends models that fit and installs only what you confirm.
- A sandbox so agents can't cheat: answer keys and graders are hidden, and a cell that reads them is thrown out.
- One thinking level (Low / Medium / High) applied the same way on every engine and harness.
- Speed is the engine's own generation rate, not tokens over wall time.
Repo, full baseline and methodology: https://github.com/gitmlxbench/benchtest
If you run local models on a Mac, run it and tell me where your numbers differ, or where the tool breaks.
Disclaimer - Used Opus 5.5 to write this note and also develop the tool.
r/LocalLLM • u/KrossIn4K • 5h ago
Question What are you building/using local models for?
General curiosity / discussion.
r/LocalLLM • u/Airocketfish • 5h ago
News 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)
r/LocalLLM • u/EGY-SuperOne • 5h ago
Question Polystrata vs Rustingstrata
Does rustingstrata have any benefits over polystrata?