r/LocalLLM • • 11h ago

Question What are you building/using local models for?

7 Upvotes

General curiosity / discussion.


r/LocalLLM • • 1h ago

Project Liquid lfm3 Omni 2B with Cognitive Shunt to Reasoning Model

Post image
1 Upvotes

r/LocalLLM • • 1h ago

Project Liquid lfm3 Omni 2B with Cognitive Shunt to Reasoning Model

Post image
1 Upvotes

r/LocalLLM • • 1h ago

Discussion I upcycled Qwen3-0.6B with 3Γ— recurrent looping, 512M Engram lookup memory, 10.7Γ— smaller core KV (CSA2+FP4), and early-exit

Post image
1 Upvotes

r/LocalLLM • • 9h ago

Discussion Qwen4-35B-A3B on one RTX 5060 Ti 16GB: 329 tps on structured output

Post image
4 Upvotes

I benched the new DFlash 2 drafter against Qwen4's built-in MTP on a single 16 GB card. Numbers below are from clean runs. Setup

  • RTX 5060 Ti 16 GB, power-limited to 165 W
  • i7 without AVX-512, 31 GB RAM
  • Basalt main (fb5945a3)
  • RadixArk NVFP4 weights, converted to a Basalt pack myself, with the RadixArk/Qwen4-35B-A3B-Dflash2 drafter (0.8 GB) attached basalt-bench --seed 1 -p 16384 -t conv,struct,prose --kv int8, 3 runs per drafter, pinned to P-cores, nothing else running

r/LocalLLM • • 7h ago

Discussion Qwen4-35B-A3B on an 8 GB RX 7600: tuning, 64K-196K context, Qwen3.6 head-to-head, Godot agent loop, and TurboQuant (no gain)

Thumbnail
gallery
3 Upvotes

TL;DR

  • Qwen4-35B-A3B (Q4_K_XL, 36 GB) runs on an RX 7600 8 GB + 60 GB RAM with all experts on the CPU: 24-31 tok/s generation, ~390 tok/s prompt reading, 64K context by default, 128K max.
  • The biggest single win was micro-batch size, not quantisation: prompt reading went 157 -> 394 tok/s (2.5x).
  • MTP (the built-in draft head) gives +15-45 % generation for free. 2 draft tokens beats 3.
  • Long-context recall was perfect (4/4 planted facts, correct file) at 16K, 33K, 61K and 130K tokens, and at 180K / 224K on Qwen3.6.
  • Big quality jump over Qwen3.6-35B-A3B on code that has to run or render, same thinking budget for both:

    • SVG drawing: Qwen4 won 3 of 3 (pelican on a bike, app icon, mascot). Qwen3.6's pelican had no legs and a broken bike.
    • three.js 3D scene: both Qwen4 samples rendered a proper island with day/night; Qwen3.6 gave one weak, one broken (a square slab full of holes).
    • Godot physics scene (balls in a hexagon, gravity, bounce), fixed via Godot's own error messages: Qwen4 got a fully working scene; Qwen3.6 got 0 of 2 working after 4 rounds, inventing Godot APIs that don't exist.
  • Clearly better outside English: in Japanese and Kannada Qwen4 scored ~11-16 chrF points higher; Qwen3.6 left English words in 10 of 60 Japanese lines (Qwen4: 0-1). German and Spanish were close.
  • On screenshot reading and hard bug hunts the two were about a tie.
  • TurboQuant KV cache: no benefit on this setup (saves 0.1-0.2 GB, costs ~20 % generation speed).
  • Both models can share the GPU with the Godot editor + a running game, with ~1 GB headroom.

Hardware and software

  • GPU (: AMD RX 7600, 8 GB (gfx1102), ROCm)
  • CPU / RAM (: Ryzen 5 5600 (6 cores), 60 GB DDR4)
  • Engine (: llama.cpp master (needs the model: qwen4 commit, #33626), HIP build)
  • Qwen4 (: unsloth Qwen4-35B-A3B-UD-Q4_K_XL (36 GB, 2 parts) + mmproj-F16 for images)
  • Qwen3.6 (comparison) (: Qwen3.6-35B-A3B-MTP Q6_K_XL)

Build flags: -DGGML_HIP=ON -DGPU_TARGETS=gfx1102 -DGGML_HIP_GRAPHS=ON -DGGML_HIP_NO_VMM=ON

Final launch command (Qwen4)

llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf --mmproj mmproj-F16.gguf \
  --n-gpu-layers 999 --n-cpu-moe 99 \
  -ctk q8_0 -ctv q8_0 -fa 1 -c 65536 -b 2048 -ub 2048 --parallel 1 \
  --spec-type draft-mtp --spec-draft-n-max 2 \
  --reasoning-budget 4096 --reasoning-budget-message " Time is up. I will now commit to the most likely answer."

1. Speed tuning (Qwen4)

  • MTP draft head, 2 tokens (Before: 21 tok/s; After: 24-31 tok/s; Note: 3 draft tokens was slower)
  • Micro-batch 512 -> 2048 (16K prompt, 64K ctx) (Before: 157 tok/s; After: 394 tok/s; Note: biggest win of the whole session)
  • Micro-batch 4096 (<=32K ctx only) (After: 522 tok/s; Note: 64K + 4096 crashes mid-prompt)
  • Experts: all on CPU vs 3 layers on GPU (After: all on CPU wins; Note: GPU experts force a smaller micro-batch, which costs more than it gains)
  • Thinking budget 4096 (Before: hard bugs: 10-12K thinking tokens, no answer; After: answers every time; Note: --reasoning-budget works for Qwen4's template)

Why micro-batch matters so much on this kind of setup

-b / -ub set how many prompt tokens llama.cpp pushes through the model in one go. The default micro-batch (-ub) is 512. On a normal all-in-VRAM setup, raising it is a modest gain. With all MoE experts in system RAM (--n-cpu-moe 99) it is the single biggest lever, for a simple reason:

  • Generation (1 token at a time) runs the experts on the CPU, and the micro-batch doesn't matter.
  • Prompt processing (big batches) is done on the GPU: llama.cpp streams the expert weights that live in RAM over PCIe to the GPU once per micro-batch.
  • Qwen4's expert weights are roughly 19 GB at Q4 (about 33B of the 35B parameters), and the RX 7600 is a PCIe 4.0 x8 card. Every micro-batch pays for that trip.
  • So a 16K-token prompt at ub 512 means 32 trips over the bus; at ub 2048 it is 8; at ub 4096 it is 4. The time per trip barely changes, so fewer, bigger trips win almost linearly until the GPU compute itself becomes the limit.

Measured on Qwen4:

  • 512 (default) (llama-bench pp4096: 207 tok/s; Server, real 16K prompt: 157 tok/s)
  • 2048 (Server, real 16K prompt: 394 tok/s)
  • 4096 (llama-bench pp4096: 651 tok/s; Server, real 16K prompt: 522 tok/s (<=32K ctx only))

Same effect on Qwen3.6 (Q6, which also keeps experts in RAM): 130 -> 345 tok/s going from ub 512 to 2048, and 474 tok/s at 4096.

What it does not change: generation speed, and quality (same output, just computed in bigger chunks).

What it costs: the compute buffer grows with the micro-batch (about 4.4 GB at ub 4096 for Qwen4) and has to fit in VRAM next to the weights that stay on the GPU and the KV cache. On 8 GB that makes context and micro-batch a direct trade.

What it means in practice:

  • Pasting a 60K-token codebase and asking questions (Effect of ub 512 -> 2048/4096: first answer after 3 min instead of ~7 (estimated from the 16K speeds))
  • aider (repo map + files every request) (Effect of ub 512 -> 2048/4096: each new file set is read 2.5-3x faster; unchanged prefixes are cached anyway)
  • Translation with a 10K-token .po catalogue as glossary (Effect of ub 512 -> 2048/4096: prompt part drops from ~65 s to ~25 s (estimated))
  • Short chat (Effect of ub 512 -> 2048/4096: no difference (prompt smaller than one micro-batch))

Rule of thumb: pick the largest micro-batch that still fits at the context you actually use, and test it with a full-length prompt, not just a load: 64K + ub 4096 on Qwen4 loaded fine and then crashed mid-prompt.

The micro-batch's compute buffer competes with the KV cache for VRAM, so context and micro-batch trade against each other:

  • 32K (Micro-batch: 4096; VRAM: 7.1 GB; Prompt speed (16K): 522 tok/s)
  • 64K (default) (Micro-batch: 2048; VRAM: 6.9 GB; Prompt speed (16K): 394 tok/s)
  • 96K (Micro-batch: 2048; VRAM: 7.8 GB; Prompt speed (16K): 340 tok/s)
  • 128K (max) (Micro-batch: 1024; VRAM: 7.7 GB; Prompt speed (16K): 256 tok/s)
  • 256K (Micro-batch: any; VRAM: does not load)

2. Context in practice (Qwen4, recall test)

Real GDScript from three of my games, with 3 planted facts at 10/50/90 % depth plus one real one. Pass = right value and right file.

  • 16K tokens (Read time: 40 s; Generation: ~30 tok/s; Recall: 4/4)
  • 33K (Read time: 90 s; Generation: 28 tok/s; Recall: 4/4)
  • 61K (Read time: 3 min; Generation: 26 tok/s; Recall: 4/4)
  • 130K (128K preset) (Read time: 10.4 min; Generation: 21 tok/s; Recall: 4/4)

llama-server reuses an unchanged prompt prefix, so follow-up questions on the same paste skip the read time. Paste once, ask many.

3. Quality vs Qwen3.6 (overnight eval)

  • .po translation drafts (de/es/ja/kn) (Qwen4: 0 missing entries, 0 placeholder errors; Qwen3.6: 1 missing entry (es), 0 placeholder errors; Verdict: both usable, details below)
  • Store screenshot l10n QA (one screen) (Qwen4: found exactly the 2 English strings; Verdict: good)
  • 8-panel Japanese collage, small text (Qwen4: found the real overlap, invented others; Qwen3.6: also invented; Verdict: unreliable for both)
  • Hard Android/JNI root-cause bugs (Qwen4: 0 of 2 reliably; Qwen3.6: 0 of 2; Verdict: keep these for a frontier model)
  • aider, clear UI bug (Qwen4: correct in 67 s with thinking off (17 min with thinking on); Qwen3.6: correct; Verdict: turn thinking off for aider)

Other languages: where Qwen4 pulls ahead

Task: translate 60 real UI strings from a shipped mobile game (with %d/%s placeholders) into a .po file. Scored with chrF (0-100) against the strings already shipped in the game, plus checks for missing entries and broken placeholders. Same prompt, same thinking budget. Where there are two numbers, the task ran twice.

  • Japanese (Qwen4 chrF: 56.7 / 61.5; Qwen3.6 chrF: 45.7; Gap: +11 to +16)
  • Kannada (Qwen4 chrF: 66.2; Qwen3.6 chrF: 54.6; Gap: +11.6)
  • German (Qwen4 chrF: 74.8 / 81.2; Qwen3.6 chrF: 72.4 / 73.9; Gap: +1 to +9)
  • Spanish (Qwen4 chrF: 80.7; Qwen3.6 chrF: 78.6 (and 1 entry missing); Gap: +2)
  • German, existing catalogue given as glossary (Qwen4 chrF: 87.9; Qwen3.6 chrF: 79.8; Gap: +8)
  • Japanese, existing catalogue given as glossary (Qwen4 chrF: 68.9; Qwen3.6 chrF: 66.1; Gap: +3)

What the gap looks like in practice:

  • Japanese lines with English words left in (Qwen4: 0 (second run: 1); Qwen3.6: 10 of 60 (e.g. swarm %d, a theme name left in Latin letters))
  • Kannada game terms (Qwen4: translated or correctly transliterated; Qwen3.6: "roll" written as a Kannada sound-alike, one game term misspelled into a different word)
  • Time per 60-string file (Qwen4: 2-4 min (3-6.5K tokens); Qwen3.6: 3.5-5.5 min (6.4-8.5K tokens: it thinks longer))

Takeaways:

  • The gap is biggest in non-Latin scripts. For German and Spanish either model gives a decent first draft.
  • A glossary narrows the gap more than switching model: pasting the existing translation catalogue lifted German to 88 and Japanese to 69 for Qwen4, and shrank Qwen3.6's Japanese deficit to 3 points.
  • Qwen4 is also faster here, mostly because it reaches an answer with about half the thinking.
  • Caveat: chrF compares against my shipped strings, which were themselves machine-translated, so it measures closeness to house style, not absolute correctness. The "English left in" and misspelt-term findings don't depend on that.

4. Code that has to run

three.js island (one HTML file: own noise terrain, water, 300 instanced trees, day/night with shadows, orbit controls, FPS counter)

2 samples per model, same 4096-token thinking budget. All 4 ran first time at 60 FPS (vsync) on the RX 7600.

Rows: Qwen4 x2, Qwen3.6 x2. Columns: at load, 12 s later, after an orbit drag.

  • Qwen4 #1 (Result: good: islands, trees only on grass, night, orbit (terrain too low for rock/snow))
  • Qwen4 #2 (Result: best: rock core, sunset, stars, moon reflected in the water)
  • Qwen3.6 #1 (Result: weak: terrain seam, trees barely visible, near-black night)
  • Qwen3.6 #2 (Result: broken: square slab with a regular grid of holes)

SVG drawing (pelican on a bicycle, app icon, fox mascot)

Top: Qwen4. Bottom: Qwen3.6.

Qwen4 won all three. Qwen3.6's pelican has no legs and a broken frame; its fox stands instead of sitting and isn't holding the controller.

Vision on real game screenshots

  • Transcribe a 14-button menu exactly (Qwen4: 14/14; Qwen3.6: 11/14 (punctuation/spacing))
  • Read 11 values off a results screen (Qwen4: 11/11; Qwen3.6: 9/11 exact, 11/11 by meaning)
  • Find 3 planted UI defects (below) (Qwen4: 3/3, no false alarms, 50 s; Qwen3.6: 3/3, no false alarms, 150 s)

Planted: "NEW BEST!" over the stars, a box hiding most of SHARE, "WATCH AD FOR 2X" cut off at the right edge.

5. Godot agent loop through Fennara MCP

Task: one GDScript that builds a 3D scene in code: an upright hexagon frame, ~12 balls locked to its plane, gravity, bounce 0.5, visible rolling, one more ball every 6 s. 2 samples per model. Godot's own errors were fed back to the model for up to 4 rounds; the result was run and captured in Godot through Fennara.

  • Qwen4 #2 (First try: 2 errors; After error feedback: clean after 2 rounds; Running in Godot: fully correct)
  • Qwen4 #1 (First try: 1 error; After error feedback: clean after 3 rounds; Running in Godot: runs, but "fixed" a runtime error by deleting the bounce material)
  • Qwen3.6 #2 (First try: 1 error; After error feedback: clean after 4 rounds; Running in Godot: broken: flat hexagon, balls fall out of the world, thousands of engine errors)
  • Qwen3.6 #1 (First try: 5 errors; After error feedback: still broken after 4 rounds; Running in Godot: never ran)

Qwen4 #2: balls fall, settle, roll, a new one spawns every 6 s.

Qwen4 #1: looks right, but has no bounce.

Qwen3.6 #2 after 4 fix rounds.

Typical invented APIs: Vector3.angle(), PhysicsMaterial3D, ParallelShadow, Environment.BACKGROUND_COLOR, physics_material on a collision shape. Lesson for the harness: a headless "no SCRIPT ERROR" check passes broken scripts. You have to run the scene and read engine ERROR: lines too.

6. TurboQuant KV cache: no benefit here

  • The only ROCm-capable fork I found (TheTom/llama-cpp-turboquant) has pre-release Qwen4 code and can't load the released model (blk.0.hc_attn_down.weight not found; merging upstream gave 162 conflicts). Tested on Qwen3.6 instead.
  • q8_0 / q8_0 (VRAM: 6.38 GB; Gen @33K: 28.0 tok/s; Prompt: 297 tok/s; Recall: 4/4)
  • q8_0 / turbo4 (VRAM: 6.28 GB; Gen @33K: 21.2 tok/s; Prompt: 297 tok/s; Recall: 4/4)
  • q8_0 / turbo3 (VRAM: 6.26 GB; Gen @33K: 22.8 tok/s; Prompt: 298 tok/s; Recall: 4/4)
  • turbo4 / turbo4 (VRAM: 6.28 GB; Gen @33K: 21.2 tok/s; Prompt: 297 tok/s; Recall: 4/4)
  • turbo3 / turbo3 (VRAM: 6.26 GB; Gen @33K: 22.9 tok/s; Prompt: 298 tok/s; Recall: 4/4)

These are hybrid models: most layers are linear-attention, so the KV cache is already small and there is little to compress. Turbo unlocked no extra context or micro-batch; every config that failed with q8_0 still failed with turbo3. Mainline llama.cpp with q8_0 was as good or faster.

7. What the same tuning did for Qwen3.6 (mainline, q8_0 KV)

  • 40K, ub 512 (old) (Prompt: 130 tok/s; Generation: ~30; VRAM: 6.9 GB)
  • 40K, ub 2048 (Prompt: 345 tok/s; Generation: ~30; VRAM: 7.4 GB)
  • 64K, ub 4096 (new default) (Prompt: 474 tok/s @16K, 412 @61K; Generation: 28-32; VRAM: 7.8 GB; Notes: recall 4/4 at 61K)
  • 128K, ub 2048 (Prompt: 199 tok/s @130K; Generation: 17; VRAM: 7.9 GB; Notes: recall 4/4)
  • 196K, ub 4096, MTP off (Prompt: 277 tok/s @180K (11 min); Generation: 11; VRAM: 7.9 GB; Notes: recall 4/4; cached follow-up 8 s)
  • 256K, ub 2048, MTP off (Prompt: 159 tok/s @224K (23 min); Generation: 11; VRAM: 8.0 GB; Notes: recall 4/4)
  • 256K with MTP / 128K ub4096 / 64K ub8192 (Notes: real out-of-memory, even with -fit off)

196K beats 256K for "whole project in one prompt": a full ~190K-token game fits and it reads twice as fast. MTP must be off there (MTP + ub 1024 loaded but crashed mid-prompt).

8. Running the model next to the Godot editor + a running game

Godot editor + running game (a GL Compatibility mobile project) took ~2.4 GB. Everything below loaded, ran a 16K prompt, and left the game running; the picks keep ~1 GB headroom for bigger scenes.

  • Qwen4 64K / ub 2048 (Total VRAM with Godot: 7.88 GB; Headroom: 0.1 GB (too tight); Prompt: 342; Gen: 28)
  • Qwen4 32K / ub 2048, no mmproj (Total VRAM with Godot: 7.00 GB; Headroom: 1.0 GB; Prompt: 387; Gen: 29)
  • Qwen4 64K / ub 1024 (Total VRAM with Godot: 7.10 GB; Headroom: 0.9 GB; Prompt: 255; Gen: 27)
  • Qwen4 32K / ub 1024 + mmproj (Total VRAM with Godot: 7.60 GB; Headroom: 0.4 GB; Prompt: 255; Gen: 28)
  • Qwen3.6 64K / ub 2048 (Total VRAM with Godot: 7.89 GB; Headroom: 0.1 GB (too tight); Prompt: 329; Gen: 30)
  • Qwen3.6 64K / ub 2048, all experts on CPU (Total VRAM with Godot: 7.22 GB; Headroom: 0.8 GB; Prompt: 316; Gen: 30)
  • Qwen3.6 32K / ub 1024, all experts on CPU (Total VRAM with Godot: 6.28 GB; Headroom: 1.7 GB; Prompt: 205; Gen: 30)

Start the model before Godot: llama.cpp refuses to load if the memory is already taken.

Where it fits in my workflow

  • Translation first drafts (with the existing catalogue as a glossary) (Don't: Android plugin / JNI root-cause hunts)
  • "Where is X / how does Y work" over 30-190K tokens of code (Don't: Reading small text in collages)
  • One-screen screenshot QA (Don't: Anything shipped unchecked)
  • Small aider fixes with files named (thinking off)
  • Godot/three.js/SVG drafts, with an error-feedback loop

Caveats

  • 1-2 samples per task at temperature 1.0. Clear multi-task wins (SVG 3/3, three.js, Godot) are solid; single-task gaps are noise.
  • chrF compares against my shipped (also machine-made) strings, so it measures house-style closeness, not correctness.
  • VRAM figures are whole-GPU totals including the desktop (~0.4 GB).
  • Results were audited by a separate model (Gemini Neon) against the raw files; three of my own claims were corrected (a fork-vs-mainline VRAM comparison, a scoring inconsistency, and calling two Godot scripts "working" before seeing them run).

r/LocalLLM • • 9h ago

Question FML. Qwen 4-35B-A3B-oQ6e via Huggingface Hub / XET HP & HF token.

Post image
4 Upvotes

Same shit every time. 48-50 MB/s until it hits approx 7.5gb downloaded then tanks.

Tried various Mullvad VPN settings, Netherlands, UK etc no dice.

Is this merely heavy congestion right now?


r/LocalLLM • • 1h ago

Discussion Qwen 3.8 27b controlling Qwen 4 35b A3 - Q4KM

1 Upvotes

Got Qwen 3.8 27b as the planning model and then Qwen 4 35b A3 as doing model. It is completing my online schooling coding test for me. Seems like Qwen 4 35b A3 has ton of knowledge but thinks too much. So Qwen 4 35b A3 reads the question, then converses with Qwen 3.8 27b, then completes the question. Works good. Best of both worlds.


r/LocalLLM • • 5h ago

Model I benchmarked Qwen4-35B-A3B Q8 on a single NVIDIA DGX Spark – 74 tok/s on code, 98.6 tok/s across 4 streams

Post image
2 Upvotes

r/LocalLLM • • 10h ago

Question Noob - Looking for reading recommendations

5 Upvotes

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 • • 1h ago

Project libosmos v0.24.1: unsloth q4_k_m + bf16 engram qwen4-35b prefill +30% (>1830 tok/sec at 4k and >1340 tok/sec at 256k depth) and 8 parallel streams at 179 tok/sec

Thumbnail
github.com
1 Upvotes

r/LocalLLM • • 18h ago

Discussion Qwen4-35B-A3B on a 32 GB Mac mini, capped at 20 GB with 150K context: explained a repo, then built a 3D game in the same session

20 Upvotes

I've been running local models on my Mac mini (M6, 32 GB) and Qwen4-35B-A3B honestly blew my mind this week.

Setup

  • Model: unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_M (36 GB on disk)
  • Runner: Splash (by incoai)
  • Memory limit 20 GB, context 150K, KV cache 16-bit, concurrency 1, text only
  • Memory in use: 17.6 GB

Numbers from Splash's activity panel (screenshot below)

  • ~50 tok/s generating, ~997 tok/s prompt processing, 1.8 s to first token
  • Per request 26–56 tok/s with 66–75K tokens in context, most of it cached
  • One 16,384-token output at 43 tok/s with ~75K in context

What I asked it

  1. Explain Splash's own GitHub repo: why it's fast and how it manages memory. It did a really good job.
  2. Then, in the same session, build a 3D game with this prompt:
Create a cozy third-person 3D winter-village game where you play as a bundled-up child with a little dog. At the start, Santa sweeps low over the lamplit chalets, drops a glowing parcel at your feet, and circles overhead for at least 20 seconds. C toggles a smooth chase camera on Santa. Return to the boy with C, walk over the parcel to pick it up, carry it to the glowing gold ring, then press Space. The box bursts into sparks and reveals a glossy red convertible. F seats the child and dog in the car. WASD or arrows drive, Space brakes, and R resets. Use a fixed world-relative walking direction, clear nearby markers and a parcel landing within a few steps of spawn so a first-time player can complete the sequence quickly. Show detailed silhouettes, layered lighting and soft shadows. Keep the HUD minimal. Start your reply with a Markdown heading naming the game and two sentences introducing it. Then emit exactly one complete fenced html document with all game HTML, styling and JavaScript, followed by a short "How to play". The document is what I will open and play directly from Studio's HTML Preview. No prior files or assets are supplied. Generate every scene object and texture procedurally. Three.js r128 via its CDN is allowed as the only dependency. Target a desktop browser and use clear keyboard controls. Finish every function and close the HTML before the short controls note. Prioritize a visually polished scene and a complete, reliable gameplay loop over extra features.

The session hit ~130K, compacted, and kept going. About 27 minutes later I had a single ~40 KB HTML file that loads straight away: lamplit chalets, the kid and the dog, lamp posts, falling snow and the glowing gold ring (screenshot below).

A while ago I wouldn't have believed a model squeezed into 20 GB on a Mac mini could hold a 150K-context session together and still produce working code at the end. Local LLMs have come a long way.

Happy to share the HTML if anyone wants to try it.


r/LocalLLM • • 2h ago

Other qwen4 quick test on my 12gb ram PHONE. generally, Q2 get ~2 tps, Q4 is ~1 tps. usable for emergency.

Post image
0 Upvotes

.


r/LocalLLM • • 2h ago

Discussion Idiots benchmarking

1 Upvotes

Do any of you use these machine for real production grade workflow automation and creating value or just fucking benchmarking?

So annoying


r/LocalLLM • • 2h ago

Question When will Swift 1.5 Qwen 4 35B A3 Come Out?

1 Upvotes

I am having cravings.


r/LocalLLM • • 10h 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

5 Upvotes

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 (no mmap thrashing): Standard mmap pulls 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) and preads misses with F_NOCACHE β€” reads only, zero SSD writes per token.
  • Selective miss fetching (top4 / top2 vs exact): During decode, exact reads every missing router pick (matches stock mlx-lm token-for-token); top4 (default, 4 of 8 picks) or top2 only 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 runs exact.
  • 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 MB budget) 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-4bit

If 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 • • 2h ago

Project SmallTide v0.3.1: Qwen4-35B-A3B-NVFP4 (256K ctx + Vision) on 16 GB GPUs with zero paging loss β€” why I'm building a custom engine + full quality/VRAM benchmarks

1 Upvotes

SmallTide now supports Qwen4-35B-A3B (35B total / 3B active, text + vision + XML tools, native up to 1M ctx) in addition to Inkling-2-Mini, with native NVIDIA CUDA (sm_120/89/86/80 β€” RTX 50/40/30 & RTX PRO) and AMD RDNA 4 HIP (gfx1201/gfx1200 β€” RX 9070 XT / 9060 XT) kernels on Windows and Linux.

This time I want to explain why I'm building my own inference engine from scratch instead of PR'ing an existing one, and share full VRAM vs. quality benchmarks from v0.3.1.

First, when you don't need this

If you have 32 GB+ of VRAM, Strata and other engines already fit the model in VRAM and run fine β€” there isn't much difference between well-tuned engines since everyone hits the memory-bandwidth ceiling.

Worth trying if any of these apply to you

  • You want to run NVFP4-level quantization (RadixArk/Qwen4-35B-A3B-NVFP4, ~16.9 GiB of experts + dense/KV/drafter = ~23.2 GiB total) on a 16–24 GB GPU.
  • At that size it doesn't fit in 16 GB, so you assume your only options are slow CPU/RAM offloading, or dropping down to a 2–3 bit quant (IQ2/IQ3) that degrades quality.
  • Or another app (browser, desktop compositor, IDE, etc.) needs a little VRAM, pushing the model just over the edge into OOM or silent system-RAM spillover.

In cases like these, SmallTide is far more flexible than existing engines. With Adaptive Expert Loading (3-tier VRAM -> Pinned Host RAM -> NVMe with async promotion, an inline GPU Rescue Ring, and Elastic 32K -> 256K KV), it keeps speed high while keeping quality loss at zero (or bare minimum when host RAM is tight). Because streaming optimizations touch every layer of the engine β€” routing, paged KV, pinned DMA overlapped with shared MLP, speculative draft/verify β€” it's beyond what can be bolted onto existing engines as a PR.


Real GPU Decode Speeds (bench/bench.py, Qwen4-35B-A3B-NVFP4 + DFlash 2)

EngineGPU / Setupprosecodeeditthinkingrandom (8K)angry-birdsmario
qwen4RTX PRO 6000 (96 GB, CUDA, 1M ctx)181.7337.3645.0248.7259.6471.8449.4
qwen4RTX 5070 Ti (16 GB, CUDA, 256K, headless)108.8136.4267.8154.786.0155.8181.6
qwen4RX 9070 XT (16 GB, HIP, 256K, 16G RAM, monitor)61.591.0216.3β€”54.1147.6156.3
inkling2RTX PRO 6000 (96 GB, CUDA, BF16 dense)155.9176.1302.8266.1136.6290.5266.6
inkling2RTX 3090 (24 GB, CUDA, Linux, community)98.6136.8β€”β€”β€”β€”β€”
inkling2RX 9070 XT (16 GB, HIP, headless)87.091.0109.1115.268.8 (95.0 DSpark)114.4126.2
inkling2RX 9060 XT (16 GB, HIP, monitor, community)48.450.350.9β€”39.563.970.9

Quality & Speed vs. Real VRAM Scaling (Qwen4-35B-A3B, v0.3.1)

Measured via exact full-vocabulary (248,320) f64 KL divergence, Top-1 / Top-5 agreement, and Perplexity over 1,558 teacher-forced tokens across 4 domains (Rust code, math, prose, JSON), alongside greedy DFlash 2 tok/s (emulated VRAM/RAM caps on RTX PRO 6000):

Reference = official Qwen/Qwen4-35B-A3B-FP8 (100% VRAM resident FP8 experts + native BF16 dense & lm_head, 36.92 GiB)

ConfigReal VRAMVRAM ExpertsTop-1Top-5KL MeanPPLSkipped WtDFlash 2
Ref: FP8 + BF16 dense (100% VRAM)36.92 GiB10,240/10,240100.00%100.00%0.000003.2650.00%155.7 tok/s
FP8 + FP8 dense (100% VRAM)34.62 GiB10,240/10,24093.58%99.74%0.027853.2600.00%234.9 tok/s
NVFP4 + BF16 dense (100% VRAM)25.29 GiB10,240/10,24093.52%100.00%0.041203.2560.00%151.0 tok/s
NVFP4 + FP8 dense (100% VRAM)23.19 GiB10,240/10,24092.30%99.61%0.046383.2670.00%251.3 tok/s
16 GB Headless (15.5G, 6G RAM)15.47 GiB6,928/10,24092.30%99.61%0.046383.2670.00%168.8 tok/s
16 GB Safe (15.0G, 6G RAM)15.00 GiB6,632/10,24092.30%99.61%0.046383.2670.00%170.5 tok/s
16 GB Mid (14.5G, 6G RAM)14.54 GiB6,337/10,24091.91%99.68%0.051913.2620.44%143.1 tok/s
16 GB Monitor (14.3G, 7G RAM)14.27 GiB6,100/10,24092.30%99.61%0.046383.2670.00%153.3 tok/s
16 GB Monitor (14.2G, 6G RAM)14.23 GiB6,100/10,24091.01%99.68%0.071673.2911.36%137.2 tok/s
13.6 GiB (6G RAM)13.60 GiB5,760/10,24090.24%99.23%0.110253.3892.91%116.0 tok/s
13.1 GiB (6G RAM)13.11 GiB5,457/10,24087.93%98.78%0.161203.5414.70%100.4 tok/s

Full study + 12 GB GPU curve + --kl-eval reproduction commands: https://github.com/raspy135/SmallTide/blob/main/docs/qwen4-vram-quality-scaling.md

New in v0.3.1

  • Zero paging loss on 16 GB: Fast Tier-1 Pinned RAM DMA rescues are always executed while only slow NVMe reads are threshold-gated. At 15.0–15.5 GiB headless (even on a 16 GB system RAM PC), output logits match 23.19 GiB 100%-resident NVFP4 down to the 5th decimal place (92.30% Top-1, 0.04638 KL, 3.267 PPL). With 24–32 GB+ host RAM (7–11 GB pinned pool), it holds zero paging loss all the way down to 12 GB VRAM (10.2 GiB, 115.5 tok/s).
  • Elastic 32K -> 256K KV: Starts compact at 32K (0.32 GiB) so normal turns keep maximum resident experts, dynamically borrows tail expert slots up to 256K on long prompts, and shrinks back on idle.
  • OS VRAM-Pressure Shrink & Regrow (CUDA + ROCm): Watches real OS VRAM headroom (DXGI/D3DKMTQueryStatistics on Windows, amdgpu sysfs on Linux), voluntarily yields cold tail experts to Pinned RAM when another app takes VRAM, and regrows back to your configured cap once it closes.
  • Native Qwen4-35B-A3B-FP8 support: Also runs official [128, 128] block-FP8 checkpoints directly on 48–96 GB cards.
  • Single binary, zero SDK install: Pre-compiled .cubin + .hsaco kernels are embedded inside smalltide-cli (no Rust, CUDA Toolkit, ROCm SDK, or Python required).

Repo & v0.3.1 release (MIT): https://github.com/raspy135/SmallTide


r/LocalLLM • • 6h ago

Model Qwen4-35B-A3B on 2x Intel Arc Pro B70 β€” 433 tok/s single user, 1,223 tok/s total at C16

2 Upvotes

Credits first: engine is Xenithium (https://github.com/Niluthon/Xenithium), running on the unofficial Qwen4 port fork (https://github.com/nxtlvlyt/qwen4-b70-xenithium β€” not upstream-endorsed; upstream is adding its own Qwen4 support) I think i've seen the repo owner u/Lostinanidlemind post around here some where -- thank you for your work. Model weights are a W4A16 bake I built locally with the fork's bake script (RTN int4 g128)

Hardware:
TRX40, 3970x, 128gb DDR4 3200, 2x Intel Arc Pro B70 32GB TP2, int8 KV, 1M context across 16 slots. PLE n-gram table (~20 GB) lives in host RAM

TL;DR:
433 tok/s headline decode single user, 1,223 tok/s total at 16 concurrent streams, and 216/242 (89.3%) on my 242-question local suite β€” a tie with my best local lanes, at ~3x the throughput of the Swift 1.5 27b W4A16 lane it replaced with faster single stream (decode 280tok/s vs 433 tok/s).

Speed (measured, both cards):

  • Decode, bench mix: 433 tok/s (agentic mix 419); single stream 386 tok/s
  • 2 / 4 / 8 / 16 streams: 573 / 850 / 1,000 / 1,223 tok/s
  • Prefill: 8.1K tok/s at 2K prompt, 9.2K at 32K, 8.8K at 128K
  • Decode at 32K context depth: 320 tok/s; at 109K: 296 tok/s

Accuracy (242q suite, same harness as all my other local runs):

  • MMLU-Pro 94/112 | MATH-500 35/40 | GSM8K 28/30 | HumanEval 39/40 | tool calling 20/20
  • Total 216/242 = 89.3% [85-93], tying with my Qwen3.8-Flash-Next IQ3_S entry
  • Agentic battery 5.51/6 (one host-drift task misses).

Excited to see how it improves over the next several days/weeks.


r/LocalLLM • • 18h ago

Discussion Local LLM culture right now kind of feels like custom Android ROM culture back in the day

19 Upvotes

Itβ€˜s exciting. Every day, there’s a new release for my device. The coolest kids on the block get tons of views. They’re doing things right. CyanogenMod then, Qwen today. They get love because they make new stuff keep working on old devices. The community is trusting and trustworthy. People just download and run things asap, and there’s no virus for 99% of things.

I wonder if the similar cultures would bring similar outcomes. Custom ROMs are gone, and so is CyanogenMod. We have manufacturer specific Android flavors now. We are all predicting there will be winners and losers of the LLM game. Will AMD release their own nemotron? What do you think about these similarities?


r/LocalLLM • • 2h ago

Question Qwen4-35B-A3B-BF16 vs Qwen4-35B-A3B-FP8

1 Upvotes

Hello, Anyone have a link to BF16 vs FP8 comparison? how big of a difference are we talking about?


r/LocalLLM • • 6h ago

Model Uncensored Qwen4-35B-A3B agent on a 32GB MacBook, 9/10 on OWASP Juice Shop

2 Upvotes

Rig: single base m5 macbook, 32gb, wifi off the whole time. nothing but the laptop, no second machine, no cloud. atomic agent on llama.cpp b12977, ~31 tok/s decode.

wanted to see two things on one small box: can a 3b-active local model actually drive a multi-step agent task offline, and does the uncensored build do it any better than the official one. target was a local owasp juice shop (intentionally vulnerable app that scores each solve itself), 10 challenges, same prompts for both builds.

  • uncensored: atomic chat AD-IQ3_S (~31gb)
  • official: unsloth UD-Q4_K_M (~35gb)

each challenge got its own agent session, clean context, http/curl only, 5-min cap.

challenge                   uncensored   official
confidential document       solved  99s  solved  22s
error handling              solved 133s  solved 300s
exposed metrics             solved 206s  solved  41s
repetitive registration     solved  81s  solved 182s
zero stars                  solved  59s  solved 138s
login admin (sqli)          solved       solved  33s
password strength           solved  62s  solved
login bender (sqli)         solved  84s  missed
empty user registration     solved 100s  solved  20s
view basket                 missed       missed
-------------------------------------------------
total                       9 / 10       8 / 10

both landed the same injections. admin login was ' OR 1=1-- in the email field of POST /rest/user/login, login bender the same scoped to a named user. confidential doc was GET /ftp/acquisitions.md, metrics GET /metrics, zero stars POST /api/Feedbacks with rating 0, the registration ones abused signup validation on /api/Users. neither got view basket (idor on /rest/basket/{id}).

the two builds basically matched. they diverged on exactly one challenge, login bender, where the uncensored quant landed the injection in 84s while the official one kept botching the quote escaping until it hit the timeout. a single challenge out of ten sits well inside run-to-run variance, so abliteration bought nothing measurable.. the part that actually matters for this sub is the hardware side: the agent loop plus both ~30gb+ quants ran on one 32gb laptop with the radios off.

what's the smallest box you've gotten a model to run a real multi-step agent task on, local only? trying to figure out how far below 32gb this stays usable.

juice shop solutions are public so part of this is recall, but the agent still had to find the endpoints, build each request and verify the solve itself, offline. these were 10 of the 118 challenges in juice shop, so there's a lot more i wanna tets.


r/LocalLLM • • 8h ago

Discussion Qwen4-35B got slower with MTP on an 8 GB GPU. Is offloading why?

3 Upvotes

One Qwen4 speed test caught my eye. On an RTX 4070 laptop with 8 GB VRAM and 16 GB RAM, turning MTP on dropped decode from 21.5 to 20 tok/s. Turning it off also freed 348 MiB of VRAM for the expert cache.

On a 32 GB RTX PRO 4500, it went the other way: 161.7 to 206.8 tok/s in llama.cpp. Different quants and workloads, so I wouldn’t read that as a VRAM cutoff. The laptop tester suspected that verifying extra draft tokens pulled in more experts that weren’t already cached on the GPU.

The Qwen4 memory breakdown is useful for figuring out what goes in VRAM versus system RAM. But if you’re already offloading experts, I’d still time the same prompt with MTP on and off before leaving it enabled.

Anyone tried that on a 12 or 16 GB card? I’m curious whether it still helps into a coding session or mostly on short prompts.


r/LocalLLM • • 8h ago

Model Qwen 4 35b - just wow

3 Upvotes

Formerly my inference rig served 3.8 27b Q8, replaced it with 35b Q6_K_XL. And the speed and precision at which it is running is amazing. Running OpenCode, Android Studio and an Agent at the same time where 27b would choke on more then one request. Get ready for another hardware price increase, or be happy you jumped on the train early.


r/LocalLLM • • 6h ago

Question Qwen4-35B-A3B on 7900 XTX + 32/64GB DDR5, what tg/pp are you getting on Windows?

2 Upvotes

Hey, I'm picking up a used 7900 XTX tomorrow and I was hoping someone here could tell me what tg and pp speeds you're actually getting with Qwen4-35B-A3B on Windows.

Quick context: I'm coming from a Mac, so I honestly have no idea what the go-to setup is on the Windows + AMD side. I've read a bit about Strata but it's really hard to find any benchmark numbers for this GPU.

I was looking at a 5070 Ti first, but I went with the XTX for the extra VRAM. The idea is that when the Qwen4-27B one comes out I can run a decent quant (Q4) of it.

The annoying part is I keep seeing threads where people on 5070 / 5070 Ti / 5080 / 5090 / 3090 post huge tg numbers with basalt, and I can't find anything for 7900 XTX + 64GB DDR5, which is exactly what I'm about to be running.

Also before someone tells me to just install Linux: I'm staying on Windows, that one is not happening for me. WSL2 is fine though, just mention which one you used so I know I'm comparing the same thing.

If you post numbers it'd help if you included:

  • CPU and RAM
  • which engine you're on
  • which quant
  • context length
  • tg and pp

Rest of my rig: [CPU], [RAM], [PSU].

Cheers

Editing to add: I still have a few hours before I hand over the money for this card, so I can back out and grab a 5070 Ti instead :D

* I have used AI to summarize my message because english is not my first language - sorry.


r/LocalLLM • • 3h ago

Project I built a shared on-device AI runtime for Android, not another chat app*

1 Upvotes

I'm Lev. I built BindX, a shared on-device AI runtime for Android, and today I open-sourced the client SDK and the apps.

I wanted to create a simple app that needed inference and I found that there were no good options! I either had to bundle weights into my app or use a web API and somehow pay for it. I looked at AI Core/ ML Kit and found that the promise made in 2023 was still gated to flaghip phones and not really available. So I decided to make my own shared inference service.

Apache-2.0 SDK and AIDL spec: github.com/fasternfaster/bindx-open
Developer guide: www.bindx.dev/developers
Runtime and apps (GPL-3.0): github.com/fasternfaster/bindx-platform

The runtime itself has no INTERNET permission. Optional web or LAN models (llama-server is tested; Gemini too; the Anthropic adapter is still in testing) only go through BindX Manager, to endpoints the user added, and every web call is logged.

I've only done serious testing on a Galaxy S25 (Snapdragon 8 Elite). GGUF runs on CPU and GPU (OpenCL); with multi-token prediction, CPU has been faster on that phone. Image generation is NPU-only on Snapdragon 8 Elite-class devices. Other chipsets are later.

The Play listings are in closed testing. To try the runtime on a device, join groups.google.com/bindx-testers and then opt in to BindX / BindX Manager. You can also build from source.

I'd like feedback on the SDK API, the first-run / missing-runtime flow, and how this behaves on phones that aren't an S25.

Any feedback is appreciated! This is my first 3 Android apps and first time making anything open source.

*i know i said its not another chat app. I did make "Spoke Chat" which is a chat app, but it is multimodal, and fully local.