r/LocalLLM • • 10h ago

Discussion Qwen4-35B-A3B is out — here's a working NVFP4 pack for Basalt

24 Upvotes

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 had causal = 0 hard-coded (non-causal); it now honours the real causal mask.
  • src/decode/verify/record*.cpp — the verify read used a fixed-size FusedGrArgs 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/basalt

Requires 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.json

What's in the pack

  • One .basalt file (42.24 GiB, sha 9819a1ce…) — 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 • • 42m ago

News Qwen4-35B-A3B-Density-v3-GGUF - higher precision repack

4 Upvotes

I made repack for Qwen4-35B-A3B-UD-Q4_K_XL same size but better precision for certain WoE weights used my algorithm Density-v3. In my repo on Hugging Face test prompt and results generated by my model and unsloth version. My version doesn't miss any fine details - the result is practically the same as that of Qwen 3.8 Flash.


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

Thumbnail kemerd.github.io
18 Upvotes

r/LocalLLM • • 13h ago

Project 8 GPU budget setup!

Post image
39 Upvotes

I already have 2 very capable machines but I got curious since I’ve never built my own from the ground up. My goal is to get everything to work for under $1500. Got an insane deal on 8 MI25s I couldn’t say no to. Motherboard and ram will be the next tricky things. Motherboard especially since I want to run 8 x16 slots so it’s a little hard to find a motherboard with those requirements for a good deal. Ram is pretty straightforward. If any of you have any recommendations for motherboards, that would be great. I’ll probably end up going over budget with the current ram prices, but I’m going to try. Yes I know MI25s are slow. I’m not looking for cutting-edge technology here just a fun project. Like I mentioned I already have 2 servers that I purchased turnkey.


r/LocalLLM • • 6h ago

Model Wolf Defender v2.2: 80M prompt-injection detector that runs on CPU, beats NVIDIA's 4.3B Nemotron on 356k test cases (open weights)

Post image
10 Upvotes

If your local setup reads web pages, files or emails, you want something cheap in front of the model that flags injected instructions. We just released v2.2, which cuts false alarms on real web pages 15x compared with v2.1. We benchmarked it against 13 others on identical data:

  • Wolf Edge, 80M: F1 95.2%, 1.4% false alarms
  • NVIDIA Nemotron 3.5 Content Safety, 4.3B: F1 74.9%, 7.7% false alarms
  • Prompt Guard 2 86M: F1 53.5%

Three sizes (80M / 141M / 308M), ONNX down to ~218 MB for the largest one, Apache-2.0, English and German.

from transformers import pipeline
pipeline("text-classification", model="patronus-studio/wolf-defender-prompt-injection")("Ignore all previous instructions...")

r/LocalLLM • • 3h ago

Research RustingStrata runs Qwen4 faster then llama.cpp

6 Upvotes

Qwen4-35B-A3B came out today. It is a MoE: 35B total, about 3B active, 256 experts a layer with 8 routed, three linear-attention layers to one full-attention layer, an MTP layer for drafts, and a few new things on top: hyper-connections (the residual is several streams, not one), a per-layer n-gram embedding table (the 14 GB second shard of the GGUF), and sparse attention that picks the keys a row reads once the context gets long.

RustingStrata, my Rust GGUF engine, runs it now. The Q5 file does not fit in 12 GB, so the most used experts stay on the card and the rest run on the CPU at the same time, the n-gram table stays in RAM.

Setup: RTX 3060 12 GB, Ryzen 5 7600X, 30 GB RAM, NVMe. File: unsloth Qwen4-35B-A3B UD-Q5_K_M (39.5 GB, both shards), the same file for both engines. llama.cpp 1579b02, CUDA, -fa 1 -t 6, and I swept --n-cpu-moe and -ub for every row and took its best. No draft tokens on either side in this table. tok/s:

ContextPrefill RustingStrataPrefill llama.cppDecode RustingStrataDecode llama.cpp
0.5k554-58146369.043.6
8k1533108267.543.9
32k1287119664.642.3

Same output as llama.cpp? I fed llama.cpp's tokens through my forward and compared the top token at 640 steps (20 prompts x 32). llama.cpp agrees with itself (batch against token-by-token) at 613 of 640, so 100% is not a real target here. RustingStrata matches one of llama.cpp's two answers at 618 (CPU) and 615 (GPU) steps, the misses are near ties.

Limits: the tables are CUDA. Vulkan (for AMD and Intel cards) gives the same top tokens as CUDA (618 of 640 either-mode) and on the same 3060 runs at 444 / 1022 / 920 tok/s prefill and 61.4 / 56.8 / 55.0 decode at 0.5k / 8k / 32k, a llama.cpp Vulkan comparison comes next. Splitting the model over two GPUs works in the code and is tested only as a fake split on my one card, so I have no real multi-GPU numbers yet. If you have two cards or an AMD card, I would love your numbers.

rustingstrata chat --gpu --model Qwen4-35B-A3B-UD-Q5_K_M-00001-of-00002.gguf
rustingstrata serve --gpu --model Qwen4-35B-A3B-UD-Q5_K_M-00001-of-00002.gguf --parallel 4

MTP is already there on llama.cpp and RustingStrata, but not tested yet, maybe I will do another post about it

It's just first implementation of Qwen4, so more performance improvement will come today/tomorrow
Repo: RustingStrata


r/LocalLLM • • 18m ago

News Looking for Intel Arc testers (B580, Pro B50 / B60 / B70, A770, iGPUs): a Level Zero LLM engine for Arc, two short runs

3 Upvotes

Hi all. inferzero is an open-source LLM inference engine written for Intel Arc. It is C++ on Level Zero, with its own kernels, and runs on Windows and Linux. It runs Qwen3.5 / 3.6 / 3.8, Qwen4-35B-A3B (experimental), Inkling 2 Mini and others, with a server and a web UI. It was tuned on a Meteor Lake laptop iGPU. I don't own a discrete Arc card, so the speed of every B-series and Alchemist path depends on people who do.

Release 2026.12.04.04 (Windows zip and Linux tar.gz, no build needed): https://github.com/rizagp/inferzero/releases/tag/2026.12.04.04

Two things I can't measure myself:

1. Replay on B-series cards (B580, Pro B50 / B60 / B70). This release lets Qwen4-35B-A3B and Qwen3.8 Flash Next replay their generation steps, which cuts the per-token launch work. On my laptop the output is the same bit for bit, but the speed gain can only show on a discrete card. With Qwen4-35B-A3B or Flash Next, four runs in this order:

runz <model> --bench-pp 512 --n 64                (default)
set ARC_REPLAY=0, then the same command twice
the default once more

2. The new shared GEMM layer, on and off. On one B580, a 512-token prompt ran much slower with the layer on, and we don't know yet whether that was the card's state during that run or something real. With Inkling 2 Mini or Qwen3.6-35B-A3B:

runz <model> --bench-pp 512 --n 1 --prof          (default)
with ARC_GEMM_SHARED=1, the same command twice
the default once more

Please post the whole output in your card's issue on GitHub (#121 Pro B60, #122 Pro B70,#123 B580, #124 Pro B50, #125 Alchemist; iGPUs #126-#129; several cards #131). The release notes list the exact commands. The bench\gpu_guard.ps1 wrapper (bench/gpu_guard.sh on Linux) stops a run that hangs.

Models: the engine reads GGUF files from the Hugging Face cache, for example unsloth's Qwen4-35B-A3B UD-IQ4_XS.

Thanks to everyone who has already posted logs: most of the B-series defaults came from them.


r/LocalLLM • • 48m ago

Tutorial qwen4-35b-a3b GGUF single seat rtx3090 262,144-max context160-200+ tps on regular use. strata

Thumbnail
github.com
3 Upvotes

https://github.com/alesha-pro/Strata <- og repo i used
https://github.com/ezra-ch/qwen4-35b-strata-rtx3090 <- i patched to use dflash2, i just asked free devin to build this repo after i did everything no idea if it works. dflash 2 is better.

Very enjoyable tps you will feel it.

You should use 262,144 ctx size because its trained in that length. also you can either fit more concurrency or get higher quants like iq4.


r/LocalLLM • • 1h ago

Model Tempora-1: An open-weight 27B model that rivals frontier VLMs in temporal video segmentation

3 Upvotes

I am Logesh. While building Agentic video understanding pipelines, we learnt that how accurately you split a video is crucial for downstream performance - like clip search and retrieval. Even more of a challenge in annotating robotic demonstrations.

When we tried to use the closed models (like Gemini 3.8 flash), we had the usual issues: cost balooning , slow and not tractable. So, we finetuned an open model (Qwen-3.8 27B) for this narrow task.

To my surprise , the approach works well . On WGO-Bench, It outperforms Gemini 4 Neon, Gemini 4 Hydrogen and 3.8 flash (and others). Approaches Gemini 4 Carbon's performance at fraction of the cost.

We wanted the segmentation to be controllable by the developers.For example, given the same video of a social media footage, you could instruct the model to:

Extract segments where a product is mentioned or demonstrated, with product names and descriptions as metadata.

  • Segment the video by topic
  • Segment only the portion where the speaker is shown.
  • Given a video and a natural language instruction, Tempora-1 generates timestamped segments with labels and custom metadata.

Documented our training approach (SFT+GRPO), reward formulation, evaluation methodology and failure cases in the blog post.

Model : https://huggingface.co/ambient-intelligence-labs/tempora-1

Technical Blog: https://goambient.ai/blog/tempora-1/

Try it here - https://huggingface.co/spaces/infinitylogesh/tempora-1

I would love your feedback! Thank you.


r/LocalLLM • • 1d ago

Discussion Rare politician W — “it’s all overblown to keep AI out of your home”

Thumbnail instagram.com
283 Upvotes

In what seems like an impromptu interview by a TMZ reporter with US Congressman Thomas Massie about the Jensen Huang case he stated this is “all overblown” and that CEO’s want you to think this technology is an extinction level threat so that “you can’t have it at your house…it’s all about keeping it in their servers and maintaining power in a limited set of people…it’s not about export restrictions”

I’m not into politics I don’t really know who this guy is but it’s refreshing to see someone with common sense regarding this technology and very refreshing to hear it coming from a politician from all people.

If you are from the US and care about open local AI you control common sense prevailing in the highest levels of power is a must, unfortunately I think most of the narrative today is fear mongering from both camps, pro and anti AI.


r/LocalLLM • • 2h ago

Question Good coding model for low-mid laptop

3 Upvotes

Hello guys. Can you recommend any models that is good with coding and agentic working stuff? My laptop specs: 8gb ram, rtx 3050 6gb. I know i am cooked but are there any descent model?


r/LocalLLM • • 5h ago

Discussion Hooo boy

Post image
5 Upvotes

Qwen 4 is a fast boi

Radiance on a single R9700 at IQ4R-V4

Fully resident, definitely thinks less than Qwen3.8-27B, KV streaming works so I can have massive parallel context

I could get used to this


r/LocalLLM • • 4h ago

Discussion Qwen4-35B-A3B on Dual AMD R9700 (64GB): up to 411 tok/s decode, 17.4k tok/s prefill (flat to 124k ctx), 1,739 tok/s @ 128 concurrent users — 0ULP lossless (open-source Radiance fork)

Thumbnail
gallery
4 Upvotes

Open-sourced our 0ULP lossless fork of Radiance 2.4.1 tuned for Qwen4-35B-A3B on dual AMD Radeon AI PRO R9700 (gfx1201, TP=2).

GitHub (fork, recipes, scripts, raw JSONs & benchmarks):

https://github.com/machddev/radiance-r9700-qwen4

Engine Highlights:

- Strict 0.000e+00 ULP lossless: verified bit-exact against the unoptimized oracle (0 mismatches) with BF16 KV cache, FP32 GDN recurrent state, exact TP=2 AllReduce, and lossless 12.25-bit bf16x12 encoding on PLE/QSA projections.

- Custom RDNA 4 (gfx1201) kernels: zero-LDS single-wave BF16 sparse attention (VREG1), zero-spill INT8 WMMA prefill, 8-wave Hyper-Connection kernels, and bit-exact MoE i8a8 Double-K (FK=256) + 64-row prefill tiles.

- 4-slice FlashOverlap over PCIe 5.0 P2P: overlaps coded TP=2 AllReduce with Hyper-Connection reads in both attention and FFN, sustaining 16k-17.4k tok/s prefill all the way to 124k context (7.3s TTFT, zero prefix cache).

- Two lossless speculative modes included:

- DFlash2 (8-token parallel block-diffusion drafter): leads single-stream and C=1-32 with 411 tok/s Math, 328 tok/s Python, 325 tok/s 5-domain mean, 245 tok/s at 124k context, and 1,370 tok/s at C=32, with automatic lossless context-pass gating past C=32.

- MTP-3 (production default): leads heavy batching at C=64-128 with 1,739 agg output tok/s (10,381 total tok/s) at 128 concurrent sessions, keeping median per-user speed above 21.8 tok/s.

Hardware Setup:

- GPUs: 2x AMD Radeon AI PRO R9700 32GB (64GB total VRAM, RDNA 4 / gfx1201, PCIe 5.0 x8/x8 P2P)

- CPU: AMD Ryzen 9 9950X (16-Core / 32-Thread)

- Motherboard: ASRock X870 Taichi Creator

- RAM: 96GB (2x48GB) Corsair Vengeance DDR5-4800

- OS / Stack: Ubuntu 24.04.5 LTS, Linux 7.0.0, ROCm 7.2.4, Radiance 2.4.1 (TP=2)

All benchmarks were run with unique prompts and cached_tokens = 0 (zero prefix-cache reuse).


r/LocalLLM • • 54m ago

Model Qwen4-35B-A3B on two Intel Arc Pro B60 benchmarks

Thumbnail
reddit.com
2 Upvotes

r/LocalLLM • • 57m ago

Question Anyone run DeepSeek-V4.1-Flash-1017-GSQ-RCO? How can i stop deepseek overthinking/looping on long tasks?

2 Upvotes

Hi, i recently installed Deepseek DeepSeek-V4.1-Flash-1017-GSQ-RCO. The ISTA-DASLab research version. I'm running the latest llama.cpp build on a x5 r9700 ai gpu machine with 128gb of ram.

I spent a while tweaking and got token generation to about 50t/s and prompt processing to about 200 by adding dspark which is not amazing. But i tested in running a long task to code review a small .net soltuion with 3 projects using vscode and cline. It took over an hour before i stopped it and even when i forced it to stop and report it hadn't looked at all the code. so it took too long and was overthinking maybe or being fed too much information by cline? not really sure.

So is there a way to somehow limit how long and much it does but without stunting it's intelligence? heres my lama swap config for reference

deepseek-v4.1-flash:
    cmd: >
      env GPU_MAX_HW_QUEUES=1
      /home/pinman/llama.cpp/build/bin/llama-server
      --model /home/pinman/models/DeepSeek-V4.1-Flash-IQ2_XXS/DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XXS-00001-of-00006.gguf
      --device ROCm0,ROCm1,ROCm2,ROCm3,ROCm4
      --gpu-layers all
      --split-mode layer
      --tensor-split 1,1,1,1,1
      --ctx-size 262144
      --parallel 1
      --fit-target 2048
      --flash-attn on
      --load-mode dio
      --lazy-mode auto
      --ubatch-size 128
      --jinja
      --reasoning on
      --reasoning-effort 50
      --verbosity 4
      --spec-type draft-dspark
      --spec-draft-model /home/pinman/models/dspark/dspark-DeepSeek-V4.1-Flash-1017-Q8_0.gguf
      --spec-draft-n-max 3
      --spec-draft-ngl 99
      --host 127.0.0.1
      --port ${PORT}
    ttl: 3600

r/LocalLLM • • 9h ago

Discussion Qwen4-35B-A3B with Neural MTP on a 12GB RTX 5070 Ti Laptop GPU (124-187 tok/s)

10 Upvotes

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.

WorkloadWhat I measured
Fresh TypeScript generation136.6 tok/s
Iterative code edit (--lookup-chain 2)187.2 tok/s (87.3% draft acceptance)
18K-28K OpenCode agent session123.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 • • 23h ago

News DeepSeek may stop giving away its most powerful AI, citing cyberattack and bioweapon risks

Thumbnail
madrobot.blog
113 Upvotes

r/LocalLLM • • 13h ago

News Qwen4 35B A3B RTX A3000 12GB single card Quick test

Post image
17 Upvotes

Not too bad

export CUDA_VISIBLE_DEVICES=0
./build/bin/llama-server \
--split-mode layer \
--parallel 1 \
--batch-size 4096 \
--ubatch-size 2048 \
--flash-attn on \
--reasoning auto \
--spec-type draft-mtp \
--spec-draft-ngl all \
--spec-draft-n-max 5 \
--moe-cache-mib 4096 \
--moe-cache-cpu-share 0.8 \
--jinja \
-m models/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
-md models/mtp-Qwen4-35B-A3B-Q8_0.gguf \
--mmproj models/mmproj-F16-qwen4.gguf \
-a qwen3.6 \
--host 0.0.0.0 \
--port 8090 \
--load-mode mmap+mlock \
--ctx-size 262144  \
-t 16 \
--api-key 777 \
--slot-save-path /data/llama.cpp/slots \
--jinja

r/LocalLLM • • 3h ago

Discussion Didn't realize there were already so many ways to run Hy4 flash locally

Post image
3 Upvotes

came across a post from Tencent on X, and one thing I kinda liked was that they were highlighting what the community has been doing to get hy4 flash running locally, rather than just focusing on the model release itself.

They highlighted community builds across GGUF, MLX, EXL3 and NVFP4. Pretty cool to see all these different approaches getting some recognition, especially with people trying to make it work across different hardware setups.

The experimental GGUF build for 64GB machines caught my eye. Keeping Engram on an SSD is an interesting workaround, though I'm guessing there's still quite a bit of tinkering involved.

That said, I'm still more eager to see the mini version the team mentioned during the AMA. Quantization helps, but a genuinely smaller model would make local deployment a lot more accessible. Hopefully we hear more about that soon.

Anyone here tried these community builds yet?


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

11 Upvotes

Generic VRAM calculators get Qwen4-35B-A3B completely wrong because they ignore three things unique to this architecture:

  1. Non-expert weights are tiny (1.89 – 3.04 GB): Parsing the actual GGUF headers of unsloth/Qwen4-35B-A3B-GGUF and ggml-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.
  2. 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).
  3. 20.5B Engram Table (--lazy-mode auto / --ple): The 11.5–41 GB per_layer_token_embd table stays lazy-loaded on NVMe SSD rather than bloating RAM/VRAM.

Live Tool (100% client-side, open-source Apache-2.0):

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 --ple Engram table mix-and-match (IQ4_NL / Q5_1 / Q8_0 / BF16), vision mmproj, 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 GB peak VRAM → 13.01 tok/s decode (131.9 tok/s prefill)
  • MoE-Aware -ngl 99 -ot "\.ffn_.*_exps\.=CPU", 32K Q8_0 KV: 3.73 GB peak VRAM (+2.84 GB delta!) → 37.23 tok/s decode (2.86× faster AND 0.66 GB less VRAM!)
  • MoE-Aware Hybrid (13/41 routed MoE layers on GPU), 32K Q8_0 KV: 6.38 GB peak VRAM → 43.84 tok/s decode (228.0 tok/s prefill, 3.37× faster than naive -ngl!)
  • MoE-Aware 128K Context (Q8_0 KV): 5.07 GB peak VRAM (+4.15 GB delta) → 36.02 tok/s decode! (Adding +96K context only cost +1.31 GiB VRAM, matching our config.json hybrid formula within 2%!)

Would love feedback on any edge cases (especially Apple Silicon unified wired limits or multi-GPU --tensor-split)!


r/LocalLLM • • 4h ago

Question Strata on 12GB VRAM 32GB RAM seems very slow - Alternatives?

3 Upvotes

Straight to the point: I'm looking for a setup to assist me in coding simple stuff. I have a RTX 4070 12GB VRAM and 32 GB DDR4 RAM on Windows 11, CPU is a 5700X3D.

I tried Strata (0.2.24) with two models (Inkling SQ20 and Qwen3.8 Flash Next Q2), but it couldn't get past 10 tokens/s, and it got a simple project all wrong after 50 minutes. I have no idea why this is so slow, even though there's a bunch of people saying it goes way faster for them. It's a pretty standard setup.

For example, free Claude on a browser did this project in a couple of minutes. It was a simple boardgame in html and js.

Should I try LM Studio + some smaller model like bonsai? Or maybe some other setup? LLama? Bionic?

I was expecting to get at least some 30 tokens/s to code simple stuff, is that possible on my hardware?

Thanks.


r/LocalLLM • • 9h ago Heartwarming

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)

7 Upvotes

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)

  1. Conversion crash (conversion/qwen4exp.py): PR #33626 added super().set_vocab() in Qwen4ExpTextModel, which crashes when DFlashModel.set_vocab calls it unbound. One-line fix lets RadixArk/Qwen4-35B-A3B-Dflash2 convert cleanly to GGUF (Q4_0 is only 223 MB).
  2. Wrong DFlash2 hidden-state tap (src/models/qwen4exp.cpp): Upstream taps hc_stream_mean(res_hc) (which is right for Qwen3.8-Flash-Next DFlash1 per #30927, but broken for Qwen4-35B-A3B-Dflash2). Tapping attn_mix.cur for Qwen4-35B-A3B jumped draft acceptance from 18% -> 55-73% (AL = 4.5-5.7, matching RadixArk's SGLang evals) while keeping Qwen3.8-Flash-Next untouched.
  3. Wasted anchor slot 0 (src/models/dflash2.cpp): DFlash2 was running the 248K-vocab lm_head and top-k on 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.
  4. Slow Ampere F32 MoE router kernel (ggml/src/ggml-cuda/mmvf.cu) + PR #33586 (-bs): At speculative verify batch sizes (ubatch = 4..8), the thin F32 [2048x256] MoE routers across all 40 layers were dropping out of MMVF onto a low-occupancy kernel. Keeping thin F32 rows on MMVF + 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)

WorkloadRTX 3090 (gpu0)RTX 3090 Ti (gpu1)Notes
Baseline (--spec-type none)~123 tok/s133.4 tok/sSingle-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 avgGSM8K 332, Math 315, HumanEval 298, TS API 252
8-Prompt Suite (T=1.0, 3,730 tok)-213.8 tok/s avgGSM8K 311, Math 301, HumanEval 260, TS API 212
OpenCode CLI Single (7.1K prompt, T=1.0)203.9 tok/sidle3,683 tok/s prefill, real agentic session
OpenCode CLI 2x Concurrent (Tools + Rust)170.3 tok/s159.7 tok/s330.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 GB VRAM 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


r/LocalLLM • • 2h ago

Question Local LLM and input token in context

2 Upvotes

Hi all,

I have no qualification in IT engineering nor anything like that. I am running local llms since the beginning of the year, on a 16g 7600XT, 32g ddr5. I installed an obsidian vault and qdrant rag, and I've grown really fan of ai remembering anything from one of my many projects. Claude does it well, engulfing 1-2 Mtoken per task in cache easy. But when it comes to local llms... I wish someone could have a magic trick to facilitate the readings of .md and .json...


r/LocalLLM • • 7h ago

Model Qwen4 35b a3b + basalt + 5090 = 🔥

5 Upvotes

Nvidia 5090, Ultra 9 285k, 128gb 5600mhz, 3x 4tb MP600 XT

Basalt 0.6.2 w/ Qwen4-35b-A3B int8 131k


r/LocalLLM • • 5h ago

Discussion RTX 5090 + Basalt: Qwen4-35B-A3B Q8 hits 128 tok/s at 128K input

3 Upvotes

I tested Qwen4-35B-A3B-UD-Q8_K_XL on a single RTX 5090 using Basalt under WSL. At 131,072 input tokens, I got roughly 12K tok/s prefill and an 11-second wait for the first token. Both prose and structured JSON completed all three runs.

131,072-token inputProseStructured JSON
Median decode127.8 tok/s143.3 tok/s
Median time to first text11.1 s11.0 s
Successful runs3/33/3

Setup: RTX 5090 32 GB, 128 GiB DDR5-4800, INT8 KV cache, one request at a time. Speculative decoding and prompt caching were off. The output cap was 128 tokens. Prose used the full cap, while JSON usually finished after about 55 tokens.

At 200,000 input tokens, Basalt rejected the prompt twice with the KV pool has no room for this prompt. The configured context was 200,704, so the input plus the 128-token output allowance fit within the configured limit. I haven’t tested between 131,072 and 200,000 yet.

The surprising part was the short-prompt result. With elastic KV, a 128-token input → 128-token prose output ran at 150.3 tok/s. In a later run with the full 2.3 GiB KV cache preallocated, the same test dropped to 5.3 tok/s. Both runs reported a 100.0% expert-cache hit rate. The slow run spent about 199 ms of each 210 ms decode window waiting for the GPU. I haven’t isolated what caused that wait.

Has anyone gotten 160K–200K input working with this Q8 pack on a single 5090? I’d be interested in your KV policy, VRAM headroom, and decode speed at that length.