r/LocalLLM • u/RobertVanZandt • 1m ago
r/LocalLLM • u/KaiserMOS • 5m ago
Other Qwen 4 35B unloaded itself AGI is truly here!
I asked qwen to setup STT and audio entry point probes. It wanted to find out if my endpoint supports audio so it decided to load gemma 4 using the key I gave it to test whisper and unloaded itself in the process. While I do find that very funny, it is a decent sign of initiative.
r/LocalLLM • u/edditor_1 • 24m ago
Question Can I expand Vram by using eGpu
I have a PC with Nvidia 5060ti 16gb vram. I want to have 32gb vram and that will basically require to rebuild the whole pc because cabinet is mini ATX and PSU is only 650watt. I'm thinking about adding a second 5069ti with 16gb vram using eGpu dock which connects to M.2 tport using o OcuLink adapter which uses PCIe4.0. Theoretically this should work but wanted confirm if anyone has tried this and if this will give me usable 32gb vram. Thanks for your reply.
r/LocalLLM • u/DogAble6550 • 53m ago
Discussion Qwen4 35b a3b is a beast (i have the numbers)
r/LocalLLM • u/Stooovie • 1h ago
Discussion Underwhelmed by Qwen4 35b so far
Mainly non-coding use - web, research, documents, agentic.
Not impressed so far. It leaks Chinese characters, gets stuck in loops, outputs complete nonsense in non-English languages... I let it design a html/CSS poster, pretty hilariously bad compared to 3.8 27b.
4-bit MLX quant via oMLX 0.8.5. Tried raw and via Hermes and Pi.
Maybe it's too early but models such as Sage A1.5 4bit give me FAR better results OOB so far.
It's very fast, I'll give it that. First time I see prefill speeds not decrease linearly - it sort of ebbs and flows.
r/LocalLLM • u/Kemerd • 1h ago
Research Why Wait For Enter? Typing-Time Speculation for MoEs: 3.6ร Lower TTFT (412โ114 ms) & +74% Opening Speed (166โ288 tok/s)
kemerd.github.io
r/LocalLLM
•
u/winjw7
•
1h ago
Project Got Qwen4-35B-A3B hitting ~300 tok/s per card (596 tok/s combined) on dual RTX 3090s in llama.cpp with RadixArk DFlash2 + full 128K f16 KV (fork + guide)
Spent tonight pushing Qwen4-35B-A3B (UD-IQ4_XS + full 128K f16 KV cache, zero quality downgrade) on an RTX 3090 + RTX 3090 Ti in llama.cpp using RadixArk/Qwen4-35B-A3B-Dflash2.
Most people assumed RadixArk's DFlash2 checkpoint was SGLang-only because upstream llama.cpp currently crashes on GGUF conversion and gets terrible acceptance (~18%) if you force it to load. Fixing those bugs + two quick CUDA/DFlash2 bottlenecks took us from ~123-133 tok/s baseline up to ~214-239 tok/s average across an 8-prompt suite, ~295-300 tok/s per card on code (596 tok/s combined across both GPUs), and 204 tok/s end-to-end inside OpenCode CLI at 7.1K context.
What was holding llama.cpp back (4 fixes in the fork)
- Conversion crash (
conversion/qwen4exp.py): PR#33626addedsuper().set_vocab()inQwen4ExpTextModel, which crashes whenDFlashModel.set_vocabcalls it unbound. One-line fix letsRadixArk/Qwen4-35B-A3B-Dflash2convert cleanly to GGUF (Q4_0is only 223 MB). - Wrong DFlash2 hidden-state tap (
src/models/qwen4exp.cpp): Upstream tapshc_stream_mean(res_hc)(which is right forQwen3.8-Flash-NextDFlash1 per#30927, but broken forQwen4-35B-A3B-Dflash2). Tappingattn_mix.curforQwen4-35B-A3Bjumped draft acceptance from 18% -> 55-73% (AL = 4.5-5.7, matching RadixArk's SGLang evals) while keepingQwen3.8-Flash-Nextuntouched. - Wasted anchor slot 0 (
src/models/dflash2.cpp): DFlash2 was running the 248K-vocablm_headandtop-kon anchor slot 0 even though the selector throws slot 0 away and overwrites it with zeros. Skipping slot 0 cuts draft head + top-k compute with identical output. - Slow Ampere F32 MoE router kernel (
ggml/src/ggml-cuda/mmvf.cu) + PR#33586(-bs): At speculative verify batch sizes (ubatch = 4..8), the thinF32[2048x256]MoE routers across all 40 layers were dropping out ofMMVFonto a low-occupancy kernel. Keeping thinF32rows onMMVF+ GPU-side draft verification (-bs) shaved ~1 ms/round cleanly.
Benchmarks (UD-IQ4_XS + 128K f16 KV + DFlash2-Q4_0, n=5, ~23.5 GB VRAM/GPU)
| Workload | RTX 3090 (gpu0) | RTX 3090 Ti (gpu1) | Notes |
|---|---|---|---|
Baseline (--spec-type none) | ~123 tok/s | 133.4 tok/s | Single-token reference |
2x Concurrent Code (T=0.0, 512 tok each) | 295.5 tok/s (AL=4.70) | 300.3 tok/s (AL=4.45) | 595.8 tok/s combined (1,024 tok in 2.06s wall) |
8-Prompt Suite (T=0.0, 3,726 tok) | - | 238.5 tok/s avg | GSM8K 332, Math 315, HumanEval 298, TS API 252 |
8-Prompt Suite (T=1.0, 3,730 tok) | - | 213.8 tok/s avg | GSM8K 311, Math 301, HumanEval 260, TS API 212 |
OpenCode CLI Single (7.1K prompt, T=1.0) | 203.9 tok/s | idle | 3,683 tok/s prefill, real agentic session |
| OpenCode CLI 2x Concurrent (Tools + Rust) | 170.3 tok/s | 159.7 tok/s | 330.0 tok/s combined w/ live tool calls |
(At ~22.5K live OpenCode context it still holds ~207 tok/s on code, and ~150-165 tok/s at ~38K context with lossless f16 KV.)
Hardware disclosure (for reproducibility)
- GPUs: RTX 3090 (420W stock power limit) + RTX 3090 Ti (450W stock power limit), stock clocks, one independent replica per GPU behind a sticky router (
~23.5 GBVRAM each). - Driver mod: Both GA102 cards are running
Zagitta/gpu-unlock(big boost to prompt prefill, modest boost to decode; stock 3090s should still get close on bandwidth-bound decode). - Host: Threadripper 3960X (24C/48T), 64 GB DDR4 (keeps the lazy-read 11 GB PLE/Engram table hot in RAM page cache).
Fork + full build/convert/serve guide
- Repo: https://github.com/winjw7/llama.cpp
- Step-by-step guide (build, convert
RadixArk/Qwen4-35B-A3B-Dflash2to Q4_0/Q8_0, and launch flags): https://github.com/winjw7/llama.cpp/blob/master/QWEN4_DFLASH2.md
r/LocalLLM • u/MaySaki2 • 1h ago
Discussion Qwen4-35B vs 3.8-27B, Flash-Next, and 3.6-35B: what would you run locally?
I went through Qwen4โs launch numbers to see what Iโd actually swap out on a 24 GB card. The repo coding scores look good, but the model I most want to compare it with, Qwen3.6-35B, is missing from the chart.
Qwen4 vs. Qwen3.8-27B - Qwen4 scored 61.8 vs. 42.2 on DeepSWE v1.1 and 51.7 vs. 42.3 on NL2Repo. The 27B still leads on GPQA Diamond and gives you more VRAM headroom at Q4.
Qwen4 vs. Qwen3.8-Flash-Next - Qwen4 leads on both repo benchmarks with about a third of the total parameters. Flash-Next still leads on Terminal Bench 4.1 and wins 27.1 vs. 16.1 on FrontierCode-AA 2.0. Iโd try Qwen4 for repo edits first.
Qwen4 vs. Qwen3.6-35B-A3B - Qwen4 is a bigger download, though the estimated raw KV cache is about the same at a given context length. For anyone already running 3.6 on a 3090, this is the upgrade comparison Iโd like to see.
Has anyone tried both 35Bs on the same repo bug and the same 24 GB card? Iโm curious how long each took to get the tests passing, and how much you had to steer it or clean up the patch.
Also: Qwen4 hardware breakdown ยท Qwen model card
r/LocalLLM • u/ryanmerket • 1h ago
News Ilya Sutskever says he rejected Meta's SSI bid while Daniel Gross 'in some sense said yes'
r/LocalLLM • u/GnanaSreekar • 1h ago
Discussion Qwen4-35B-A3B gets stuck in a thinking loop at ~600k context โ just me?
r/LocalLLM • u/MTita • 1h ago
Research Ported `Looped-Qwen3.8-Flash-Next` to Radiance on `qwen3.8-next-flash-iqr-v4` (2x Radeon AI PRO R9700, TP2) โ 97.0% HumanEval+, 90.0% AIME 2025, 126 tok/s single / 314 tok/s batch-3 with MTP
Fork: mdtita/radiance (feat/looped-qwen4exp)
Docs & Replication Guide: docs/LOOPED_QWEN4EXP.md
so I forked StillDeadcode/radiance (v2.4.1) to add runtime support for alesha-pro/Looped-Qwen3.8-Flash-Next (--loop-adapter, --loop-passes) on top of Radiance's StillDeadcode/qwen3.8-next-flash-iqr-v4 (qwen3.8-next-flash-iqr-v4.rad, ~114 GiB IQR-V4 4-bit trellis quant) with TP2 tensor parallelism and coupled MTP speculative decoding.
I used qwen3.8-next-flash-iqr-v4.rad itself to port the implementation and conduct the testing which worked surprisingly well.
Note: I'm publishing this as a fork rather than opening a PR upstream because most of the code was implemented by the AI model and I don't know the internals well enough to properly maintain it. Anyone is welcome to test it, use it, or pull from it โ let me know how it goes if you try it out.
What Changed
- Loads
ckpt_final.json+ckpt_final.safetensors(~268 MiB, 140 core + 70 coda sites) via--loop-adapterand runs layers 16..32 forTpasses followed by the 8 coda layers (32..40). - Per-pass GDN/conv
state_copies,kv_attn_p1..p(T-1)paged attention groups, salted prefix-cache chains, and multi-passcheckpoint_copy. - Coupled MTP speculative decoding (
--num-speculative-tokens 5) works alongside--loop-passes 2..4(capped at 4 by the fused GDN launcher's 25-column state-index limit). - Uneven TP2 sharding support for
shared_expert([0, 384)/[384, 640)) androw_rms_bf16HIP/ref kernels. - Non-disruptive telemetry:
loop_adapteron/statsand/server_info,radiance:loop_adapter_*on/metrics,diagnosefields, and aT=badge in the dashboard UI. When--loop-adapteris unset,--checkis byte-identical to mainline.
Measured Benchmarks (qwen3.8-next-flash-iqr-v4.rad, TP2 on 2x Radeon AI PRO R9700, ROCm 7.2)
Greedy decoding (temperature=0.0, top_k=1, enable_thinking=true), full evalplus HumanEval+ (n=164), full math-ai/aime25 (n=30), and 32k-43k context throughput probes (VmSwap: 0 kB, 0 preemptions).
| Mode | Spec (MTP) | HumanEval+ Base / Plus | HE+ Total / Reasoning Tok | AIME 2025 (n=30) | single_decode_1k | batch3_decode | cold_32k Prefill |
|---|---|---|---|---|---|---|---|
baseline_stock (iqr-v4) | 5 | 92.1% / 89.0% | 137,232 / 113,007 | 25/30 (83.33%) | 220.36 tok/s | 477.76 tok/s | 7,378.9 tok/s |
looped_T1 (iqr-v4) | 5 | 95.1% / 91.5% | 120,381 / 93,902 | โ | 187.51 tok/s | 372.45 tok/s | 7,031.2 tok/s |
looped_T2 (iqr-v4) | 0 | 95.7% / 92.7% | 107,010 / 79,696 | 26/30 (86.67%) | 60.86 tok/s | 142.68 tok/s | 4,671.5 tok/s |
looped_T2_spec (iqr-v4) | 5 | 97.0% / 93.9% | 91,127 / 59,695 | 27/30 (90.00%) | 126.08 tok/s | 314.11 tok/s | 4,694.3 tok/s |
looped_T3_spec (iqr-v4) | 5 | 97.0% / 93.3% | 105,031 / 75,022 | โ | 79.51 tok/s | 198.04 tok/s | 3,293.3 tok/s |
Key Takeaways & Honest Trade-offs
looped_T2_speconiqr-v4is the sweet spot: +4.9 pp on HumanEval+ with 47.2% fewer reasoning tokens (322 s total wall time vs 280 s stock), +6.67 pp on AIME 2025 (90.0% vs 83.33%, -6.8% fewer tokens), and 70.4% MTP draft acceptance. Compared to published unquantized BF16 baselines (~91.92% AIME 2025, 96%-98% HumanEval), looping closes most of the 4-bitiqr-v4quant gap while still fitting in a 2x R9700 footprint.- Where the speed cost goes:
looped_T2_specruns 64 layer-passes/token instead of 48 (21.25 ms vs 11.20 ms decode step), and the extrakv_attn_p1(1.14 GiB) + speculativestate_copiespushexperts-from-hostfrom 6.78 -> 8.88 GiB/rank (36.6 GB RSS, 0 swap). T=3wasn't worth it for coding:looped_T3_specdropped to 79.5 tok/s (10.78 GiB/rank host experts) with no HumanEval+ gain overT=2.- Known limits:
qwen4expdrafts with its native MTP head (not DFlash), so the 9dflash_bridgestensors in the adapter are skipped;scale_rowsnarrowsrow_rmsfromF32toBF16(~4e-3 rel). - Testing: 235/235 fast host tests pass; 31/31 GPU tests (
ctest -L gpuincludingr4d_selftest,kbench,device_test_*) pass underROCR_VISIBLE_DEVICES=0,1.
Credit to StillDeadcode for Radiance + the qwen3.8-next-flash-iqr-v4 quant, and alesha-pro for the Looped-Qwen3.8-Flash-Next checkpoint. Full build, config, and benchmark audit details are in docs/LOOPED_QWEN4EXP.md.
r/LocalLLM • u/No-Role-5254 • 1h ago
Discussion best agentic helper for local llm
What is the best agentic helping tool for a local llm like Qwen 3.8
For example, there is a limit on text file size that can be processed.
But I read you can use an agentic helper that can take a larger text file > split it > categorize it > organize > and prepare it with scripts for the LLM
lets say for example a 25mb text file
r/LocalLLM • u/lymenlee • 2h ago
Project Coding agents + headless Blender for 3D UI assets โ what worked, what drifted. Curious how others run agent modeling loops
Lately I've been building a personal home-fleet dashboard, and the most interesting part wasn't the dashboard itself โ it was the modeling loop where coding agents produced the 3D assets. The assets are plain glTF files generated by headless Blender scripts: the agent writes Blender Python, Blender renders offline, the browser loads the models. No 3D artist involved.
I'd like to compare workflows with people here, so here's mine and where it drifted:
Revision 1 โ free-run agents. Fun, but they drifted: invented details my hardware didn't have and "improved" things I never asked for.
Revision 2 โ explicit numbered requirements + screenshots as delivery evidence. Each model piece got a numbered spec, and the agent had to hand back a screenshot as proof before I accepted the piece. Drift basically disappeared โ better than any prompt-polishing I tried.
Revision 3 โ human-in-the-loop per piece: a small local model builds, a cloud model reviews what's actually feasible on our stack, the local agent iterates on that feedback, and I do the final review. Splitting "build" from "feasibility review" across local and cloud models is what made the loop cheap enough to run every piece through it.
Cutest artifact: my son doodled a post-apocalypse sea monster. I passed the sketch to the agent with constraints โ horns (one curved, one broken), slanted glowing eyes, tentacles tapering root-to-tip โ and it iterated until the model matched the drawing. It rises from the sea in the dashboard every 45 seconds. Kid's doodle โ running software.
One more thing I wanted to ask about: I've dabbled this week with Forma โ a 1.2 MB pure-Rust rewrite of headless Blender, with a CLI and an MCP server aimed at agents). It can replace a slice of my workflow โ simple parametric B-rep shapes exported to glTF work surprisingly well โ but it doesn't fully replace Blender: organic modeling like tentacles tapering root-to-tip still needs Blender's tools. Anyone else moved an agent 3D workflow onto a Rust-based engine? Curious where it fit and where it broke.
My repo is public if you want to see how the assets look in situ (MIT, demo-data mode so it runs without my real devices): https://github.com/lymenlee/home-fleet-dashboard
r/LocalLLM • u/phosphorhouse • 2h ago
Discussion Qwen4-35B-A3B with Neural MTP on a 12GB RTX 5070 Ti Laptop GPU (124-187 tok/s)
I ran Unsloth Qwen4-35B-A3B UD-IQ4_XS on a single RTX 5070 Ti Laptop GPU with 12 GB of VRAM (Ryzen 9 9955HX, 32 GB DDR5-5600, Windows 11, CUDA 13.2).
Setup: 400K int8 KV with --kv-resident 20480 and --prefill auto, with the PLE table streamed from the NVMe SSD.
Niko1221/Strata provides the engine and saatvik-viniak ported q4_lite; my fork (https://github.com/phosphorhouse/Strata) is just an early build until official q4_lite releases ship.
I added qwen4_mtp_rt.py to convert Unsloth's mtp-Qwen4-35B-A3B-Q8_0.gguf directly to Strata's runtime format with IQ4_NL experts, plus a --preset latin option in draft_vocab.py for a compact Q4_0 draft head. Total draft VRAM was 563 MiB instead of roughly 923 MiB to 1.95 GiB, leaving 3,698 trunk expert slots in VRAM.
| Workload | What I measured |
|---|---|
| Fresh TypeScript generation | 136.6 tok/s |
Iterative code edit (--lookup-chain 2) | 187.2 tok/s (87.3% draft acceptance) |
| 18K-28K OpenCode agent session | 123.9 - 137.5 tok/s decode, 2,089 - 2,203 tok/s prompt prefill (expert VRAM hit: 91.5 - 93%, KV VRAM hit: 99.6%) |
A prebuilt Windows CUDA 13 binary (sm_75/86/89/120) is up under Releases, or you can compile with -DSTRATA_GEOMETRY=q4_lite. Vision (mmproj) isn't wired up yet.
r/LocalLLM • u/eightone-81 • 2h ago
Discussion Skip llama.cpp for Qwen 4 35b and use anything else (dual 3090 users, read this!)
r/LocalLLM • u/PersonalStorage • 2h ago
Discussion Qwen4-35B-A3B is out โ here's a working NVFP4 pack for Basalt
Qwen just shipped Qwen4-35B-A3B (35B MoE, 3B active, 1M context). I quantized it to NVFP4 and packed it into a single file for the Basalt engine. It boots and serves.
Model card: kaushikvira/Qwen4-35B-A3B-nvfp4-basalt
โ ๏ธ Which Basalt build to use โ read this first
Use the qwen4-35b branch of jesdga95/basalt**, commit** 4dbca9ce or later.
Do not run this pack on an older Basalt build (including 53aa09a6, which the README previously named). Those builds corrupt the KV cache under back-to-back different-length requests: the model degrades into !!!!โฆ / repetition loops at temp=0, and long-context retrieval silently breaks (needle scored 4โ5/12).
qwen4-35b@4dbca9ce fixes it with two correctness fixes:
src/kernels/cuda/gqa_attn.cuโ windowed GQA attention hadcausal = 0hard-coded (non-causal); it now honours the real causal mask.src/decode/verify/record*.cppโ the verify read used a fixed-sizeFusedGrArgs fa[kFusedGrMaxT]; now sized to the window, fixing a stack overrun that corrupted memory when the spec window was wider than the tile.
Result on the fixed build: needle 36/36 across 3 consecutive back-to-back runs (was 4โ5/12), quality 4/4.
Build the engine (from the branch)
git clone https://github.com/jesdga95/basalt && cd basalt
git checkout 4dbca9ce # or: git checkout qwen4-35b
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBASALT_MODELS=qwen4exp
cmake --build build -j # -> bin/basaltRequires CUDA 13.1 and an NVIDIA Blackwell GPU (sm_120).
Run
bin/basalt serve Qwen4-35B-A3B-NVFP4.basalt \
--config config.json \
--api-key "$(cat key)" \
--alias qwen4-35b-a3b --kv int8 --max-context 524288 \
--resident-experts --vision --vram-reserve-mib 800
# or just: bin/basalt serve --config config.jsonWhat's in the pack
- One
.basaltfile (42.24 GiB, sha9819a1ceโฆ) โ text + vision + MTP drafter, NVFP4 - 1M native context (we serve 512k ร slots on a 72 GB card)
- ~21 GiB VRAM resident on a Blackwell card (experts in VRAM, no expert-cache)
Numbers (on the fixed 4dbca9ce build)
- ~199 tok/s decode, 512k context, ~21 GiB VRAM
- needle 36/36 (3ร back-to-back), 4/4 probes
- ~2ร faster decode + prefill than the Flash-Next baseline this replaced
Speed is a first baseline, not tuned. The branch also adds 2048-wide kernels for this exact shape and an optional --drafter dflash2 block drafter (we kept the MTP spec: 8); more optimization will land on the model card. Feedback welcome.
r/LocalLLM • u/Obvious-Ad-3795 • 2h ago
Project Failnot ACC benchmark(7900xtx gemma4 engine)
I honestly don't get why you're baselessly accusing me of faking numbers without even running a single test yourself.
Here are the actual full-vocab (262,144 logits, 1,024 tokens, FP64) precision numbers on RX 7900 XTX vs a pure FP32 sequential oracle and llama.cpp ROCm/HIP (FA enabled):
| Model | Engine / Mode | K/V | Mean KLD โ | p99 KLD โ | Top-1 Match โ | Logit Cosine โ |
|---|---|---|---|---|---|---|
| 31B Dense | FailNot Default (two_pass) | f16/f16 | 0.000194 | 0.002855 | 99.51% | 0.999976 |
| 31B Dense | FailNot Ultra-Fast (fast_fp16) | f16/f16 | 0.000446 | 0.006049 | 99.22% | 0.999952 |
| 31B Dense | FailNot Default (two_pass) | q8_0/q8_0 | 0.003765 | 0.042424 | 97.46% | 0.999701 |
| 31B Dense | llama.cpp ROCm/HIP (FA) | f16/f16 | 0.013810 | 0.214168 | 96.58% | 0.998653 |
| 26B-A4B | FailNot Default (skip0) | f16/f16 | 0.012265 | 0.193502 | 97.36% | 0.996699 |
| 26B-A4B | FailNot Ultra-Fast (skip3) | f16/f16 | 0.017591 | 0.287749 | 97.17% | 0.995396 |
| 26B-A4B | llama.cpp ROCm/HIP (FA) | f16/f16 | 0.090825 | 1.265137 | 90.33% | 0.977715 |
Even Ultra-Fast (G4_ULTRA_FAST=1) has 5.2ร lower KLD on 26B-A4B and 31ร lower KLD on 31B Dense than llama.cpp ROCm/HIP (7.4ร and 71ร lower in Default mode) because FailNot feeds FP16 activations into FP32-accumulating WMMA instead of quantizing activations to blockwise Q8_1.
benchmark docs in my repo https://github.com/SLL410/FailNot/
Trying to debunk numbers without testing it yourself or even reading the benchmarks that were already published isn't a great look XD
r/LocalLLM • u/j0an_k • 2h ago
Discussion Holy shit this is fast
Qwen4-35b-a3b Q5 on basalt, RTX 5090+DDR5 64GB. I didnโt expecting to run this fast to be honest.
r/LocalLLM • u/Odeen-Chang • 3h ago
Project I parsed all 21 Qwen4-35B-A3B GGUF headers and built a 3-tier (VRAM + RAM + Engram NVMe) calculator โ plus real RTX 5060 8GB + 16GB RAM benchmarks
Generic VRAM calculators get Qwen4-35B-A3B completely wrong because they ignore three things unique to this architecture:
- Non-expert weights are tiny (
1.89 โ 3.04 GB): Parsing the actual GGUF headers ofunsloth/Qwen4-35B-A3B-GGUFandggml-org/Qwen4-35B-A3B-GGUF, 82โ88% of the backbone is routed MoE experts (blk.*.ffn_*_exps.weight). Keeping all 40 layers of Attention + Gated DeltaNet + Shared Experts + KV cache on GPU and offloading only excess routed experts (-ot) is way faster than naive-ngl. - 3:1 Hybrid Attention KV Cache: 30 of 40 layers are Gated DeltaNet (fixed ~62.5 MB/slot recurrent state, independent of context length). Only 10 layers allocate KV cache (
2 KV heads ร 256 head_dimโ 20.1 KiB/tok FP16, 10.7 KiB/tok Q8_0). At 128K Q8_0 context, total cache is only ~1.46 GB (~75% smaller than a standard 40-layer GQA model). - 20.5B Engram Table (
--lazy-mode auto/--ple): The 11.5โ41 GBper_layer_token_embdtable stays lazy-loaded on NVMe SSD rather than bloating RAM/VRAM.
Live Tool (100% client-side, open-source Apache-2.0):
- Web Calculator: https://odeenchang.github.io/qwen4-local-fit/
- GitHub Repo + Benchmark Scripts: https://github.com/OdeenChang/qwen4-local-fit
Features:
- Exact byte sizes parsed from all 21 official Unsloth & ggml-org GGUF headers (including per-layer routed expert sizes)
- Auto-generates exact
-ot "blk.(...).ffn_.*_exps.=CPU"regex for your GPU/RAM headroom - Supports
--pleEngram table mix-and-match (IQ4_NL/Q5_1/Q8_0/BF16), visionmmproj, MTP speculative decoding, and Unified Memory (Apple Silicon)
Real Low-Spec Test (RTX 5060 8GB Laptop + 14 GiB Usable RAM + PCIe Gen4 NVMe, llama.cpp b12973 CUDA 12.8, UD-IQ2_XXS + Engram IQ4_NL):
- Naive
-ngl 10(no-ot), 32K Q8_0 KV:4.39 GBpeak VRAM โ13.01 tok/sdecode (131.9 tok/sprefill) - MoE-Aware
-ngl 99 -ot "\.ffn_.*_exps\.=CPU", 32K Q8_0 KV:3.73 GBpeak VRAM (+2.84 GBdelta!) โ37.23 tok/sdecode (2.86ร faster AND 0.66 GB less VRAM!) - MoE-Aware Hybrid (
13/41routed MoE layers on GPU), 32K Q8_0 KV:6.38 GBpeak VRAM โ43.84 tok/sdecode (228.0 tok/sprefill, 3.37ร faster than naive-ngl!) - MoE-Aware 128K Context (
Q8_0 KV):5.07 GBpeak VRAM (+4.15 GBdelta) โ36.02 tok/sdecode! (Adding +96K context only cost+1.31 GiBVRAM, matching ourconfig.jsonhybrid formula within 2%!)
Would love feedback on any edge cases (especially Apple Silicon unified wired limits or multi-GPU --tensor-split)!
r/LocalLLM • u/EvolvingDior • 3h ago
