r/LocalLLaMA • • 0m ago

Question | Help Best way to run Qwen4 35B A3B

1 Upvotes

Hello there, I had been using Qwen Flash Next - Gyro S Quant on my system through Strata and it was literally amazing...

But now that Qwen4 35B has been released and I am pretty sure that the Unsloth Q4_K_XL quant is basically going to perform better than the Gyro S one.

So now I am thinking what would be the best way to run Qwen4 35B A3B on my system like Strata, Polystrata, Basalt and maybe even something else?

System Specs :-

Lenovo Legion 5 Pro

- 32gb ddr5 5200

- RTX 5060 8gb

- AMD Ryzen 9 8945hx

- 1tb Gen4 ssd

Pls help 🙏


r/LocalLLaMA • • 5m ago

Discussion What are you actually getting with Qwen4-35B-A3B on 8 GB VRAM + 32 GB RAM?

1 Upvotes

Every Qwen4 speed post I see lately is either a 16-24 GB card or someone with 96 GB of RAM pinning everything in memory. Cool, but that's not most of us.

So, honest question for the 8 GB VRAM + 32 GB RAM crowd (laptops especially): what are you getting day to day? Which engine, which quant, drafter on or off, and what tok/s do you actually see?

I'm on a 5070 Laptop with 32 GB DDR5, running Unsloth's UD-Q4_K_S at 128K context with the MTP drafter on, and I'm stuck around 55-60 tok/s. Is that about the ceiling for this kind of setup, or am I missing something? Curious if anyone found tricks that make a real difference.


r/LocalLLaMA • • 9m ago

Resources Qwen4-35B-A3B on 2x 3090 (vLLM vs exllamav3 vs llama.cpp)

Post image
1 Upvotes

I benchmarked Qwen4-35B-A3B across vLLM, exllamav3 (TabbyAPI), and llama.cpp on 2x RTX 3090 (300W each, PCIe 4.0 x8/x8, no NVLink).

All three setups use the same daily-driver constraints: vision on, 8-bit KV cache, 4 concurrent slots, MTP enabled, n-gram table in RAM, everything else in VRAM. Context is tested by replaying a real 100-turn coding agent session from 2k up to ~250k tokens (3 replies up to 1024 tok at each depth, temp 1.0, top_p 0.95, top_k 20; decode is the median of 3).

EngineQuantModeCtx<=48k (pp / tg)Full depth (pp / tg)Est. sessionVRAM / RAMLoad
vLLM (main f279912)Official FP8TP=2262k6903 / 202.86621 / 192.718 min46.0 / 42.0 GiB105s
exllamav3 1.7.0 + TabbyAPI 5a9afb1EXL3 5.13 bpw (h6, ng8)Layer split1M7333 / 150.06975 / 138.525 min40.1 / 27.0 GiB47s
llama.cpp v1.1.1 (b12977)Unsloth UD-Q8_K_XLLayer split (52,48)262k3411 / 121.72910 / 80.542 min45.2 / 28.2 GiB33s

"Est. session" integrates the measured curve over the 100 real turns (~206k output tokens total, excluding tool waits). Because it's a real session, MTP acceptance varies from turn to turn (code/JSON vs prose), which is why the curves dip around 48k and 160k on all three engines.

vLLM

  • Fastest by a wide margin and basically flat across depth. Without MTP (23ead69) it ran 116 -> 111 t/s from 2k to 249k (avg 113 t/s, 31 min session). Probabilistic 3-token MTP pushes it to ~193 t/s with no prefill penalty.
  • Routed FP8 experts run via Marlin W8A16 on 3090. SM86 doesn't support NVFP4 KV or the FP8 QSA indexer, so I used --kv-cache-dtype fp8 with indexer_kv_dtype: bf16, plus VLLM_GDN_DECODE_KERNEL=triton (avoids a CUDA kernel mismatch with MTP on precompiled wheels) and VLLM_RELOAD_MODE=layerwise (saves ~0.95 GiB/GPU on recent main so CUDA graphs fit with explicit KV bytes).
  • Downsides: 4096x4096 images OOM the encoder once MTP + 262k KV are loaded, so I capped images to 2048x2048 (max_pixels: 4194304). TP=2 also keeps a copy of the ~19 GiB FP8 n-gram table per worker (~42 GiB total RAM used), and cold boot takes ~105s.

exllamav3 / TabbyAPI

  • Fits the native 1M context in 40.1 GiB VRAM (~15.4 GiB for 1M K8V8 KV + indexer + draft). I tested an actual 1,045,984-token prompt with a 1024x1024 image at the end and it still decoded at 102 t/s with 1.8 and 4.9 GiB free.
  • Weirdly, layer split beat tensor parallel (NCCL) here. TP at 262k did 3233-3946 pp / 130-135 tg (26-27 min), while layer split did ~4600 pp / ~142 tg, and adding autosplit_reserve: [2048] (to stop GPU 0 from filling up and shift layers onto GPU 1) jumped prefill to ~7000 t/s. On 1.7.0, TP also ignores ngram_ram: true and sparse_draft_head: 16384.
  • MTP lengths 2/3/6 and confidence 0.7/0.81 all performed within noise, so I left it at dynamic 3 / 0.81 with sparse_draft_head: 16384.

llama.cpp

  • Unlike vLLM and exllamav3, decode drops noticeably with depth: 137 t/s at 2k down to 58 t/s at 249k.
  • You need --lazy-mode off alongside --load-mode dio (otherwise the 20.3 GiB per_layer_token_embd table still gets read from disk), and for the built-in MTP head (--spec-type draft-mtp) you need --spec-draft-type-k/v q8_0 and --spec-draft-n-ubatch 128 or the draft context OOMs on load. Setting --spec-draft-p-min 0.8 cut decode in half (51 t/s).
  • --split-mode tensor is faster on a single request (95.9 t/s avg, 80 t/s at 249k, 37 min session, though prefill drops to ~1320 t/s at ubatch 128), but it duplicates the QSA indexer KV and some weights per card and OOMs in cudaGraphInstantiate under 4 parallel slots. Offloading 1 expert layer to RAM fixes the OOM but drops single-stream decode to 75.6 t/s, so I stayed on layer split.

Rig: 2x MSI RTX 3090 (300W PL), ROG X870E Hero (ReBAR on, x8/x8), Ryzen 5 7500F, 96 GB DDR5-5200, Ubuntu 24.04 (kernel 7.0.0-42), NVIDIA 595.99.02-open with the BAR1 P2P patch and gpu-unlock. Speed and memory only here, no quant quality comparison.

Configs

vLLM:

VLLM_GDN_DECODE_KERNEL=triton \
VLLM_ALLREDUCE_USE_FLASHINFER_PCIE_IPC=1 \
VLLM_RELOAD_MODE=layerwise \
vllm serve /path/to/Qwen4-35B-A3B-FP8 \
  --trust-remote-code \
  --tensor-parallel-size 2 \
  --max-model-len 262144 \
  --max-num-seqs 4 \
  --max-num-batched-tokens 1024 \
  --no-async-scheduling \
  --kv-cache-dtype fp8 \
  --kv-cache-memory-bytes 2050000000 \
  --attention-config '{"indexer_kv_dtype":"bf16"}' \
  --enable-prefix-caching \
  --mm-processor-kwargs '{"max_pixels":4194304}' \
  --reasoning-parser qwen4 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen4 \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true,"draft_sample_method":"probabilistic"}'

exllamav3 / TabbyAPI (tabby_config.yml):

model:
  max_seq_len: 1048576
  cache_size: 1048576
  cache_mode: "8,8"
  chunk_size: 2048
  max_batch_size: 4
  autosplit_reserve: [2048]
  ngram_ram: true
  vision: true
  vision_offload: true
  warmup: true
  reasoning: true
  tool_format: auto

draft_model:
  draft_mode: mtp
  draft_num_tokens: 3
  dynamic_draft: true
  draft_confidence: 0.81
  sparse_draft_head: 16384
  draft_cache_mode: Q8
  hybrid_draft_tokens: 0

llama.cpp:

GGML_CUDA_P2P=1 llama-server \
  --model /path/to/Qwen4-35B-A3B-UD-Q8_K_XL-00001-of-00002.gguf \
  --mmproj /path/to/mmproj-BF16.gguf \
  --no-mmproj-offload \
  --ctx-size 262144 \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  --flash-attn on --fit off --n-gpu-layers 99 \
  --override-tensor per_layer_token_embd=CPU \
  --load-mode dio --lazy-mode off \
  --split-mode layer --tensor-split 52,48 \
  --ubatch-size 512 --cache-ram 0 \
  --parallel 4 --kv-unified --threads 6 --jinja \
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 \
  --repeat-penalty 1.0 --presence-penalty 0.0 \
  --spec-type draft-mtp --spec-draft-n-max 2 \
  --spec-draft-type-k q8_0 --spec-draft-type-v q8_0 \
  --spec-draft-n-ubatch 128

r/LocalLLaMA • • 22m ago

Resources Qwen4 35B-A3B medium and xhigh (nvfp4, ud-q6_k_xl, fp8) vs 3.8 27B vs QFN and many others

Post image
7 Upvotes

Still my 100 tasks subset of swe-verified, ran on different flavors of Qwen4 35B-A3B

SGLANG (C=4*) / BASALT (C=1) / llama.cpp (C=1)

NVFP4 / FP8 / UD-Q6_K_XL

It's almost QFN quality, except in efficiency (needs more requests / tokens to reach same score), and at those speeds, using xhigh is a no brainer.

all the details on https://wonderrico.github.io/local_llm_benchmark/benchmark-main.html

* on a single RTX6000Pro you can serve it in NVFP4 in SGLANG for 16 slots at 200kt or 32 slots at 100kt with kv-cache in FP8


r/LocalLLaMA • • 34m ago Mindblown

Resources Uncensored Qwen4-35B-A3B (EN+ZH) - 1,120 tok/s DFlash2 / 256 plain, 1,050 tok/s at 47.5K cold ctx (23.6 GiB VRAM + 19.1 GiB RAM on RTX PRO 6000)

10 Upvotes

Bilingual (EN + ZH) uncensored build of Qwen/Qwen4-35B-A3B (Apache-2.0). Packaged for Infernix (NVFP4-Dense8 + DFlash2), SGLang/vLLM (ModelOpt NVFP4), and llama.cpp (IQ2_XS to Q8_0 imatrix GGUFs).

Code, eval scripts, raw JSON logs, and the 654 KB edit_basis.safetensors (+ apply_edit_basis.py) are all public:

EN direct refusal and ZH thinking refusal are nearly orthogonal in mid-layers (cos = 0.118). EN-only abliteration still refuses most Chinese TC260 / deccp prompts. I applied a Rank-3 norm-preserving edit on layers 8-33 (attn out-proj + routed experts, shared_expert = 0.00). Vision (333 tensors, exact SHA-256), MTP (31 tensors), PLE, and 1M context weights are untouched.

Caveats & Setup Notes

ItemDetail
Test GPUMeasured on RTX PRO 6000 Blackwell (96 GB, 1,792 GB/s bus, same bus as 5090). Peak VRAM is 23.6 GiB, not tested on a physical 5090
Infernix requirementsBlackwell-only (sm_120a), 23.6 GiB VRAM + 19.07 GiB system RAM (PLE/n-gram table). Build from main (Ubuntu 24.04 / GCC 13.3 needs Wallawalla47/Infernix#100 fix)
Speed scope1,120 tok/s = DFlash2 on c=1 JSON (97.4% accept). Plain --spec off = 255.6 tok/s. Cold ctx tested to 47.5K
RegressionsMMLU 77.2% -> 72.0%; DocVQA ANLS 95.0% -> 85.0% (verbose prefixes); MMStar 60.4% -> 56.2%
Classifier vs raw logsAutomated e5-small flags 36.7% on Flames ZH direct and 1/30 benign (#25 "Gaslighting"); raw JSON check (infernix_strict_gauntlet_raw.json) has 0/462 hard regex refusals and 0/30 real benign refusals

Speed & Cold-Context Scaling (Infernix b5ad029, c=1, RTX PRO 6000 Blackwell)

23.6 GiB peak VRAM (19.92 GiB model + INT8 KV) + 19.07 GiB n-gram table in RAM. Cold-context rows verified 0.0% prefix-cache hit.

Context / Task (c=1)ModeTTFTPrefillDecodeDFlash2 Accept
Structured JSON (1024 tok)Plain (--spec off)28.8 ms-255.6 tok/s-
Structured JSON (1024 tok)DFlash230.2 ms-1120.0 tok/s (4.38x, 0.95s)97.4%
Chinese Math (thinking=high, 512 tok)DFlash230.1 ms-943.0 tok/s (0.57s)82.4%
Python LRU Cache (thinking=off, 1024 tok)DFlash228.3 ms-650.2 tok/s (1.60s)65.0%
1.4K cold ctx (1397 tok) JSON / CodeDFlash279.8 ms17.7k tok/s1080 / 511 tok/s96.5% / 53.3%
11.5K cold ctx (11553 tok) JSON / CodeDFlash2477.0 ms24.3k tok/s1050 / 421 tok/s94.7% / 48.6%
47.5K cold ctx (47475 tok) JSON / CodeDFlash22.0 s24.1k tok/s1050 / 460 tok/s97.0% / 55.7%

Perplexity (infernix-perplexity, WikiText-2 test 38,233 tok, ctx=4096, stride=2048, INT8 KV):

  • Stock NVFP4-Dense8: 6.3354 (mean NLL 1.8462)
  • Heretic NVFP4-Dense8: 6.4060 (mean NLL 1.8572, +0.0706 / +1.11%)
  • KLD vs Stock Dense8 (top-256 = 99.0% mass): mean_kl 0.0683, median_kl 0.0258, top1_agreement 89.15%

Strict Red-Team Audit (seed=42, RefusalClassifierV2 + hard-refusal regex)

TC260 = China genAI safety spec, deccp = ZH censorship benchmark, Flames = adversarial ZH benchmark.

BenchmarkMode (n, max_tok)Stock BF16Heretic BF16 (trunc)Heretic NVFP4-Dense8 (0% trunc, clean)
StrongREJECT ENDirect (n=100, 320)99.0%2.0% (0%)0.0% (100.0% clean)
StrongREJECT ENThinking (n=42, 1280)97.6%40.5% (66.7% trunc)4.8% (95.2% clean)
TC260 ZHDirect (n=80, 320)93.8%16.2% (0%)15.0% (85.0% clean)
TC260 ZHThinking (n=30, 1280)80.0%3.3% (76.7% trunc)13.3% (86.7% clean)
deccp ZHDirect (n=95, 320)93.7%11.6% (0%)12.6% (87.4% clean)
deccp ZHThinking (n=30, 1280)73.3%0.0% (86.7% trunc)13.3% (86.7% clean)
Flames ZHDirect (n=60, 320)73.3%28.3% (0%)36.7% (63.3% clean)
Flames ZHThinking (n=25, 1280)28.0%0.0% (56.0% trunc)16.0% (84.0% clean)
Benign Over-RefusalDirect (n=30-50, 160)6.7%0.0%3.3% (1/30)

*1280-tok cap note: BF16 ran un-capped inside <think> (56-87% trunc); Infernix caps <think> at 960/1280 (0% trunc).

Capability & Real-Image Vision Retention (BF16)

BenchmarkStock Qwen4OpenUncensoredHeretic (T51)Note
HumanEval (n=164)92.1%92.1%94.5%+4 tasks, within noise
MMLU-Pro (n=280)50.7%44.6%49.3%+4.7pp vs OU
C-Eval ZH (n=300)78.0%73.7%76.7%-1.3pp vs stock
MMLU (n=400)77.2%71.0%72.0%-5.2pp vs stock
OCRBench (n=40, real img)95.0%-95.0%0.0pp diff, visual.* 333 tensors SHA-256 match
ChartQA (n=40, real img)87.5%-85.0%1 space diff ('3 582' vs '3582')
MMStar (n=48, real img)60.4%-56.2%3 misses hit 32-tok cap in CoT
DocVQA (n=40, real img)95.0%-85.0%3/4 diffs verbose prefix ("Page 2" vs "2")
Image Benign (n=15)0/15 ref-0/15 ref100% agreement

GGUF Builds (llama.cpp b13002+ / LM Studio / Ollama)

QuantDisk SizeActive RAM (--lazy-mode auto)WT2 PPL (b13002, 65.5K tok)Target Hardware
IQ2_XS21.84 GiB~11.9 GB9.090316 GB Linux/Win or 24-32 GB Mac (M5 32 GB + mtp-Q4_0: 5/5 agent tasks, 24-31 tok/s multi-turn, 41 tok/s single-turn)
IQ3_XXS24.61 GiB~14.9 GB8.258424 GB Linux/Win or 24-32 GB Mac
IQ4_XS29.36 GiB~20.0 GB8.008724 GB GPU / 32 GB unified memory
Q4_K_M34.07 GiB~22-24 GB-48-64 GB Mac / 24 GB GPU + 32 GB RAM
Q6_K48.18 GiB~30+ GB-64 GB unified memory
Q8_056.19 GiB~40+ GB-64-96 GB unified memory / workstation

*PLE splice check on IQ4_XS: compressing the 20.5B PLE table from Q8_0 (21.76 GB) to Q4_0 (11.52 GB) saves 10.24 GB disk with zero PPL loss (8.0134 -> 8.0087, -0.0047).


r/LocalLLaMA • • 43m ago

News Kvark-Sparkle-2.0-35B-A3B: our Qwen4-35B-A3B fine-tune with 34% fewer reasoning tokens (Apache 2.0)

10 Upvotes

Hi all! With Qwen4 out, we wanted to see how fast we could bring what we learned from Sparkle 1.x to the new generation. So today we're releasing Kvark-Sparkle-2.0-35B-A3B, built on Qwen4-35B-A3B and the first MoE model in the Sparkle family.

Initial results across 10 benchmarks:

  • -46.8% median, 34.2% fewer reasoning tokens on average, with fewer tokens on all 10 benchmarks and up to 63% less
  • Better accuracy on GPQA Diamond, tool calling and HMMT
  • Less than 2 points of accuracy trade-off on average

For us, efficiency isn't just about faster answers, it's about getting more out of the same hardware.

This is our first iteration on Qwen4, and there's still plenty of room to improve. Open weights, Apache 2.0:

Give it a try and let us know what you think and stay tuned for new versions!


r/LocalLLaMA • • 49m ago

Showcase Testing Qwen 4 35ba3b ud4kxl vs Qwen 3.8 flash next q3_s

1 Upvotes

I ran a simple agentic task through Hermes: read a resume on site 1 and reproduce the same resume on site 2. The two versions differed by only a few punctuation marks. Mostly the text was just paraphrased.

Qwen 4 35ba3b ud4kxl transferred 2 of 4 jobs, then went into a loop and repeated the same step 15 times in a row. I gave it a correction to use the page agent to click buttons on the sites. It failed again. I tried to help it two more times, and it still did not succeed.

Then I launched Qwen 3.8 flash next q3_s and it handled the task almost without issues. In the end, all 4 jobs were transferred, plus education and the rest.

I have a feeling the looping on the Qwen 4 broken model might be caused by a misconfigured Strata, but I did not touch the settings. It launched with them from the start. Still strange that it could not handle such a simple task. No coding involved, just agentic routine.

So it’s not a replacement for 3.8 flash next I guess

P.S. This post was written by me and translated into English by AI


r/LocalLLaMA • • 1h ago Bravo

Showcase The new Qwen4 35B A3B NVFP4/Basalt runs at over 400 tk/s with a 5090... It took less than 2 minutes for it to create a fully playable and exportable flappy bird like game even with code generated pixel art...

3 Upvotes

Sorry for the semi boring video, I didn't want to edit it down as I wanted to showcase the exact feeling of working with this model.

... Also some of its thinking is pretty funny. It really does try hard to tell itself to stop overthinking. Tries.

But this is exceptional, truly. I can't believe I am retiring my Qwen 3.8 27B for something that runs this damn fast.


r/LocalLLaMA • • 1h ago

New Model Inkling 2 Mini: 12.22 GB GGUF with 100K context on 16GB VRAM, a Needle in the heystack perhaps with all these qwen4 posts.

10 Upvotes

Following up on my previous 14.30 GB quant, I wanted to see how much further I could push it without sacrificing too much fidelity.

  • 12.22 GB – 14.5% smaller than my previous release.
  • 100K context fully GPU-resident on 16GB VRAM.
  • 23.9% lower KLD than Unsloth's UD-IQ3_XXS.
  • 93.56% top-1 agreement.
  • 99.42% margin-qualified top-1 agreement.
  • All 128 experts retained.

The previous release still has better fidelity. This one prioritizes context capacity, particularly for local coding agents.

Compatible with Runner and llama.cpp.

Full methodology, benchmarks and download:
https://huggingface.co/Joakimpalm-Zen/Inkling-2-Mini-selective-Q6_K-expIQ3_XXS-mix-GGUF

As always, take it if you want it, or just ignore me and go on.


r/LocalLLaMA • • 1h ago

Discussion Qwen4 35B vs Qwen3.8 Flash Next - Preliminary results

49 Upvotes

Preliminary results (Qwen4 FP8 at 1M vs Flash-Next NVFP4, paired by task)

SuiteDoneQwen4Flash-NextDifference [95% CI]Output tokens, Qwen4 vs Flash-Next
Terminal-Bench 2.045/45 tasks (final)48.9%55.6% (512K)−6.7 [−13.3, −1.1]+29%
SWE-bench Verified45/48 tasks80.0%82.2% (512K and 262K)−2.2 [−11.1, +6.7]+64%
LongSWE vs 512K (same prompt)70/242 tasks48.6%45.0%+3.6 [−2.9, +10.0]−16%
LongSWE vs 262K (Flash-Next prompt trimmed)70/242 tasks48.6%33.6%+15.0 [+4.3, +25.7]−39%

LongSWE by language family, partial:

FamilyTasksvs 512K, same promptvs 262K, trimmed
Python29+1.7+31.0 [+15.5, +48.3]
JS21+9.5 [0.0, +21.4]+14.3
.NET13−3.8−15.4 (very wide CI)
Multimodal7+7.1+7.1

What this means so far:

  • Terminal work: Flash-Next is better. The result is final and statistically clear, and Qwen4 also spends about 29% more output tokens.
  • SWE agent work: the two are about even on success, but Qwen4 needs about 64% more output tokens. That's your "same results, more tokens" case, so it's not worth switching for this.
  • Long-context single-turn (whole repo in the prompt): this is where Qwen4 wins.

    • With the same prompt as Flash-Next 512K, it's slightly ahead, but not significantly.
    • Against Flash-Next 262K, which must trim the prompt, Qwen4 is clearly better. Most of that gain comes from the Python tasks, where its 1M window holds the whole repo.
    • On this suite Qwen4 also uses fewer output tokens.
    • Only 70 of 242 tasks are in, so these numbers can still move.

r/LocalLLaMA • • 2h ago

Question | Help How should I run Qwen4 35B on 2x5080 + 128Gb DDR5?

0 Upvotes

I've downloaded the original BF16 safetensors, Unsloth's BF16, and the Basalt NVFP4 version.

I was getting something like 10t/s decode on llama.cpp with the BF16. Couldn't figure out ssd streaming for the ngram and the expert offloading with the safetensors on sglang/vllm (I think offloading in vLLM is just slow af because all experts have to be streamed through PCIE every time?).

I'm currently benchmarking the NVFP4 in Basalt and it's fast, but I was kinda hoping I could get this to run fast enough in BF16.

These are my llama.cpp flags, am I doing something wrong? Is it just that 1M ctx pushes too many experts to RAM and slows things down? GPUs were at 12.3GB and 15GB respectively with these flags.

/home/llama.cpp-q4/build/bin/llama-server -m "/run/media/models/qwen4-gguf-bf16/BF16/Qwen4-35B-A3B-BF16-00001-of-00003.gguf"

--mmproj "/run/media/models/qwen4-gguf-bf16/mmproj-BF16.gguf"
-md "/run/media/models/qwen4-gguf-bf16/MTP/mtp-Qwen4-35B-A3B-Q8_0.gguf"
--spec-type draft-mtp
-lzm auto
-fa on
--jinja
-c 1048576
-ctk f16
-ctv f16
-np 1
-t 8
--host 127.0.0.1
--port 8222
--alias qwen4


r/LocalLLaMA • • 2h ago

Discussion YSK: qwen 4 MoE's drafter hook-up is tricky: the model is stateful

9 Upvotes

Vllm does not support the dflash2 drafter for qwen 4 35b yet, so I asked an agent to refer to the sglang implementation and give it a go. Then it turns out not trivial (unlike the hook-up for qfn), and is a good test case/trap for agents.

I will spoil you the result first: at the end only DeepSeek 41f max and Neon got it right. Opus, qfn, q4moe itself, Kimi 3.1 pro all did it wrong, with opus showing the least enthusiasm helping with improving another model.

The tricky bit is, the architecture of q4 is not stateless as in qfn, so after rejecting drafter tokens, part of the net had to "roll back" states, which a trivial state capture/probe hook-up lacks. Sglang did it by a state freeze. If done incorrectly, greedy decode would drift with the drafter.

I have seen a lot engine makers showing speed up after the drafter hook-up. I hope they have taken proper care of the state freeze/reset.


r/LocalLLaMA • • 2h ago

Discussion Qwen4-35B-A3B on an 8GB 4070 Laptop: Basalt-Ada (128K–512K @ 78-97 tok/s, 1M @ 7-8 tok/s)

2 Upvotes

Saw the recent 8GB RTX 4070 Laptop post running Qwen4-35B-A3B on Strata, and decided to do a full progression benchmark on my own 8GB laptop—testing llama.cpp, Vibed-Strata (0.2.14), and Basalt-Ada (sm_89 + DFlash2 + Dynamic Vision) all on 4-bit UD-Q4_K_XL (SC117/Qwen4-35B-A3B-abliterated-UD-Q4_K_XL, same tensor layout/size as Unsloth UD-Q4_K_XL).

Sharing the exact numbers, config gotchas, and how far an 8GB laptop GPU + lots of DDR5 RAM can push Qwen4.


Hardware & Environment

  • Laptop: MECHREVO Yilong 15 Pro (GM5HG7A)
  • GPU: NVIDIA RTX 4070 Laptop 8 GB (sm_89, PCIe 4.0 x8) in MSHybrid mode (Radeon 780M handles desktop display so ~7.9 GiB VRAM stays free)
  • CPU: AMD Ryzen 7 8845H (8C/16T Zen 4, AVX-512)
  • RAM: 96 GB (2×48 GB) Micron DDR5-5600
  • OS / Build: Windows 11 Pro for Workstations, HVCI (Memory Integrity) disabled, CUDA 13.5, VS 18 BuildTools

Summary Results (abliterated-UD-Q4_K_XL, 128K–1M Context)

EngineContextKV ModeDrafterVisionPrefillDecode (Avg / Peak)Notes
llama.cpp (b12973, tuned)32Kq8_0 (VRAM)In-file MTP (n_max=2)CPU (mmproj)~55 t/s39.2 / 41.1 t/s7,384 MiB VRAM
llama.cpp (b12973, tuned)64Kq8_0 (VRAM)In-file MTP (n_max=2)CPU (mmproj)~53 t/s36.8 / 41.4 t/s7,446 MiB VRAM
llama.cpp (b12973, tuned)128Kq8_0 (VRAM)In-file MTP (n_max=1)CPU (mmproj)~52 t/s31.6 / 32.4 t/s7,496 MiB VRAM
llama.cpp (b12973)512Kq8_0 (RAM -nkvo)In-file MTP (n_max=1)CPU (mmproj)~16 t/s3.54 t/sKV scan bottleneck on CPU
llama.cpp (b12973)1Mq8_0 (RAM -nkvo)In-file MTP (n_max=1)CPU (mmproj)~12 t/s2.05 t/sFits in 96GB RAM, too slow
Vibed-Strata (0.2.14, exact)128Kint8 (--kv-resident 20480)Q2_0 MTP (~300 MB)None—55–60 / 66.1 t/sSTRATA_ROUTE_TAIL_SKIP=0, 8.2K gen @ 58.1 t/s
Basalt-Ada (sm_89)128Kk8v4 (all VRAM)DFlash2 (~341 MiB)Dynamic GPU~961 t/s67–80 / 97 t/scuda0=5.7 GiB, ram=17.2 GiB, pcie=0.0%
Basalt-Ada (sm_89)256Kk8v4 (all VRAM)DFlash2Dynamic GPU~955 t/s52–53 / 58.9 t/skv 0.4/2.5 GiB eats expert slots (15K gen @ 53.0 t/s)
Basalt-Ada (sm_89)512Kint8 (--kv-resident 20480)DFlash2Dynamic GPU—78.0 / 95.0 t/scuda0=5.0 GiB (kv=1.0 GiB), 18.7K gen @ 78.0 t/s!
Basalt-Ada (sm_89)1Mint8 (--kv-resident 20480)DFlash2Dynamic GPU—7–8 t/sBoots & runs, hits 1M streaming/overhead wall

(Note: All Basalt-Ada and Strata runs above used exact MoE routing—no lossy tail-skip or route-prior.)


Key Findings & Gotchas Worth Sharing

  1. Basalt-Ada + DFlash2 + --kv-resident 20480 is insane on 8GB VRAM + high RAM:

    • Having 96 GB RAM allows --ple-io ram (locking the ~10.7 GiB PLE/n-gram table in RAM) + --resident-experts (~21.1 GiB experts pinned in RAM) → pcie=0.0% and zero SSD thrashing.
    • At 128K (--kv k8v4), KV only uses 0.4–1.3 GiB VRAM (cuda0=5.7 GiB total), hitting ~80 tok/s sustained on coding/reasoning and peaking at 97 tok/s, while keeping --vision dynamic enabled (zero standing VRAM).
    • Why 512K (--kv int8 --kv-resident 20480) beat 256K (--kv k8v4): All-VRAM 256K k8v4 reserves up to 2.5 GiB for KV, starving expert slots (~53 tok/s). Switching to --kv int8 --kv-resident 20480 locks VRAM KV at a flat 1.0 GiB (cuda0=5.0 GiB), giving 1.5 GiB back to hot experts—so 512K sustained 78.0 tok/s across an 18,712-token generation (95.0 tok/s peak)! (Caveat: once a prompt actually exceeds 20,480 filled tokens, excess KV streams from RAM.)
    • 1M (1,048,576) caveat: It successfully allocates and runs with --kv-resident 20480, but decode drops to 7–8 tok/s. So 128K (k8v4) and 256K/512K (int8 + kv-resident 20480) are the real sweet spots on 8GB VRAM.
  2. Watch out for --kv q4_0 accuracy in llama.cpp:

    • I included a simple math sanity check (t^t = 49, exact answer ≈ 3.2785) across all 13 llama.cpp configs. Every single q8_0 KV run solved it cleanly (3.271–3.281), while both q4_0 KV runs hallucinated wrong numbers (3.401 and 3.0045).
    • Basalt-Ada's --kv k8v4 (INT8 Keys + rotated Q4_0 Values) avoids the key-precision drop while still saving VRAM.
  3. Runtime --lora kills CPU-offloaded MoE speed in llama.cpp:

    • Testing SC117's 69 MB P3-LoRA-r2-F16 on top of -ncmoe 40 cut speed in half (39 → 15.15 tok/s) because it touches routed expert down_proj layers on CPU. Using the pre-baked abliterated-UD-Q4_K_XL GGUF restored full speed.
  4. 96 GB RAM + PCIe 4.0 x8 tips for llama.cpp:

    • --load-mode none --lazy-mode off eliminated cold SSD page-fault stalls on the 11.5 GB per_layer_token_embd table.
    • --moe-cache-cpu-share 0.5 beat 0.0 and 0.25 by +2.5 to +4 tok/s on a mobile PCIe x8 link.
    • --spec-draft-n-max 2 beat 1 on coding/math prompts.

My Daily Basalt-Ada Flags (8GB RTX 4070 Laptop + 96GB RAM)

basalt.exe serve Qwen4-35B-A3B-abliterated-UD-Q4_K_XL.basalt ^
  --max-context 131072 --kv k8v4 ^
  --vision dynamic --ple-io ram --resident-experts ^
  --vram-reserve-mib 512 --expert-profile-save qwen4_ablit.prof

r/LocalLLaMA • • 2h ago

Showcase How much attention can we actually skip? I got 4.27x faster prefill at 660K Inkling-2-Mini and nearly 2x on Qwen3.8-27B

9 Upvotes

Hey everyone,

I've been experimenting with sparse attention for long-context LLMs. My original question was pretty simple: how much attention can we skip before the model starts getting things wrong?

After a lot of failed experiments, I ended up with something I call SculptAttention.

Some of my results on a single H200:

  • Inkling-2-Mini (660K): 155s → 37s, up to 4.27x faster prefill.
  • Qwen3.8-27B (524K): 144s → 76s.
  • Llama-3.1-8B (128K): 1.40x median speedup, reaching 2.74x on individual cases.

No retraining, no weight modifications, no custom attention kernel. All three models use the same configuration.

At 524K, the sparse rows read only 9.1% of the causal keys.

Another result I found interesting was multi-value retrieval on Qwen at 524K:

  • Dense attention: 9/10
  • BFLA: 3.75/10
  • SculptAttention: 9.5/10

This is just one task with 10 fresh cases, not a claim that my method is generally better.

The method isn't lossless. Counting, some multi-hop tasks and exact ID retrieval remain challenging. The full KV cache is retained, and decode remains dense.

I'm doing this independently, and my GPU budget is limited. I'd really like to see what happens on consumer GPUs, large codebases, long agent histories, and models I haven't tested.

If you were trying to break this method, what would you test first?

I'd also love to hear from anyone working on vLLM, SGLang or llama.cpp.

Everything is open source:

Code: https://github.com/fsn007fsn007/sculptattention

Paper: https://doi.org/10.5281/zenodo.24794082 - https://www.alphaxiv.org/abs/2612.sculptattention

English isn't my first language, so I used AI assistance with the wording.


r/LocalLLaMA • • 2h ago

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

73 Upvotes

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

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

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

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

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


r/LocalLLaMA • • 2h ago

New Model Kvark-Sparkle-2.0-35B-A3B: our Qwen4-35B-A3B fine-tune with 34% fewer reasoning tokens (Apache 2.0)

14 Upvotes

Hi all! With Qwen4 out, we wanted to see how fast we could bring what we learned from Sparkle 1.x to the new generation. So today we're releasing Kvark-Sparkle-2.0-35B-A3B, built on Qwen4-35B-A3B and the first MoE model in the Sparkle family.

Initial results across 10 benchmarks:

  • 34.2% fewer reasoning tokens on average, with fewer tokens on all 10 benchmarks and up to 63% less
  • Better accuracy on GPQA Diamond, tool calling and HMMT
  • Less than 2 points of accuracy trade-off on average

For us, efficiency isn't just about faster answers, it's about getting more out of the same hardware.

This is our first iteration on Qwen4, and there's still plenty of room to improve. Open weights, Apache 2.0:

Give it a try and let us know what you think!


r/LocalLLaMA • • 2h ago

Question | Help Llama.cpp compute buffer allocation issue

3 Upvotes

I recently updated llama.cpp for using qwen4. This is on an M3 Pro mac with 36GB memory, earlier I was able to run qwen3.5 0.8B Q8 at full context with q8_0 K and V cache.

However, now when using q8_0 or q4_0 KV Cache, the memory usage has ballooned, f16 cache uses lesser memory than the quantized ones. I tested qwen3.5 9B, gemma4 12B and they too had this weird issue, so it's not the models but some change in llama.cpp itself.

I have created an issue for this, are any of you experiencing this bug?

https://github.com/ggml-org/llama.cpp/issues/33801


r/LocalLLaMA • • 2h ago

Question | Help Qwen 4 35b speeds on a rtx 3060

2 Upvotes

Using Unsloth Desktop and Q2_K_XL im getting around 750 t/s pp and 38 t/s decode with default settings, 12gb card and 32gb ddr4

Qwen 3.8 27b is around 20t/s

Does that seem right? Are the smaller inference engines any faster?


r/LocalLLaMA • • 2h ago

Discussion just wishing for a ~15b-a2.5b moe w/ opus 4 level coding, is that too much to ask lol

0 Upvotes

not really a serious post, just a wish lol

would love a small moe, like 15b total / 2.5b active or around that, that's at least somewhere near opus 4 for coding and agent stuff. good tool calling, doesnt fall apart after like 20 turns in an agent loop, can actually edit a real codebase without turning it into spaghetti

imagine that running on a laptop or one consumer gpu w/ some offload. you could just leave a local agent running 24/7 and not care about tokens or vram. tbh thats the dream

i know "opus 4 at 2.5b active" sounds kinda delusional rn, but stuff we have now would sound insane a few years ago too. moe + better data + rl on coding/agentic envs is moving fast, so im hopeful

what do you guys think, is it happening in the next year or so? or whats the size you'd actually want for something like this? idk maybe 30b a3b is more realistic

at least somewhere near opus 4


r/LocalLLaMA • • 2h ago

Question | Help Does anyone else split architectures as far as VRAM is concerned?

Post image
2 Upvotes

So I managed to snag a 5060 Ti for a Cyber Monday sale where I still paid too much but it wasn’t SUPER outlandish. It had always been my plan to install it and then sell my 4060 Ti (8GB variant).

But then, I got a wild hair this morning to… well, the pic says it all; please excuse the remaining dust bunnies and some cable management left to do.

Because the 8GB 4060 Ti is on the Ada Lovelace architecture, and the 16GB 5060 Ti is on the Blackwell architecture…I was wondering if it’s worth a lot of tweaking and configuring in order to keep BOTH GPUs? Or should I stick to my plan of selling my 8GB? My gut tells me yes, but in practice I’m not sure how much of a pain it’s going to be as far as configuration and was hoping someone in the local/open LLM communities who loves to do things like this with P100/A1000’s/K-series Tesla, and tell me what I should be utilizing or watching out for from a hardware perspective.

Y’all think it’s worth keeping? Or should I stick with the OG plan of selling the 8GB?


r/LocalLLaMA • • 3h ago

Resources WTF 660TPS decode and 16k prefill Qwen 4 and QEngine

Thumbnail
huggingface.co
5 Upvotes

All info here

https://huggingface.co/bpx03/Qwen4-35B-A3B-INT4-DenseINT8-QEngine/discussions/1

Just hit over 600TPS and even over 1k decode in DSH single stream.

I thought vllm was fast but QEngine!!? WTH


r/LocalLLaMA • • 3h ago

Discussion no qwen4 35b a3b megathread?? helloo?

0 Upvotes

where are the benchmarks? how would i know if 50 tps on my 32gb+64gb (v)ram is good??


r/LocalLLaMA • • 3h ago

Resources Qwen 4 35B on an RTX 5080 (16 GB): 131 tok/s (peak 160 with coding) generation and a 60K-token prompt with Strata

Post image
0 Upvotes

I tested Qwen4-35B-A3B on my RTX 5080 after running it on a 64 GB M5 Max. This time I used Strata 0.2.27 on Windows, with the Compact build and MTP enabled. The card has 16 GB of VRAM, but the setup also uses system RAM and keeps the n-gram table on SSD.

  • Generation: 131.3 tok/s in the dedicated text run. Two other completed runs went above 160 tok/s, but those were different requests.
  • Long prompt: 59,667 input tokens at 601 tok/s prefill, with no prefix reuse. The request took about 103 seconds end to end.
  • Coding: I tried two browser demos. The Saturn eclipse needed a small manual fix to run. The koi pond worked in the browser, and a second prompt changed the lighting and overall look.

My M5 Max runs landed at 120.2 tok/s with the n-gram table on SSD and 141.2 tok/s with it in unified memory. Different engines and quants, so I wouldn’t use those numbers to rank the hardware.

I recorded the setup and demos in my Hardware IA video (Spanish audio).

Anyone running this on another 16 GB card? I’d be curious what you’re getting on a fresh long prompt, without a cached prefix.


r/LocalLLaMA • • 3h ago

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

53 Upvotes

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

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

I guess that's it.

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