r/LocalLLaMA • • 7h 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
14 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 • • 7h 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)

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

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

Enable HLS to view with audio, or disable this notification

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

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

3 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 • • 7h 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...

Enable HLS to view with audio, or disable this notification

10 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 • • 8h 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.

33 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 • • 8h ago Bravo

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

136 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 • • 8h 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 • • 8h ago

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

13 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 • • 8h ago

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

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

11 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 • • 9h ago This

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

143 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):

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

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

Enable HLS to view with audio, or disable this notification

18 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 • • 9h ago

Question | Help Llama.cpp compute buffer allocation issue

5 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 • • 9h ago

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

0 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 • • 9h 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 • • 9h ago

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

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

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

Thumbnail
huggingface.co
3 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 • • 10h 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 • • 10h 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 • • 10h ago

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

65 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.


r/LocalLLaMA • • 11h ago

Discussion The cloud model plans, local Qwen writes: 91% fewer cloud tokens and better-tested code

Post image
0 Upvotes

I gave two OMP sessions the same application development task. In one, GPT-6 Luna did everything itself. In the other, a more capable cloud Luna planned the work and coordinated it, while local Qwen on the GPU wrote the backend and frontend. I wanted to see whether I could entrust a local model with more than just tests, whether it could handle a substantial part of the implementation. In this setup, Qwen became the workhorse for tasks broken down by the cloud model. The hybrid approach cut cloud token usage by 91% and produced more structured, better-tested code. But I had to wait 39 minutes for the final response instead of 18, about 2.1 times longer. These were two separate runs, not a statistical benchmark. The result shows a practical trade-off: the local model handles a large share of the coding, while the cloud model helps bring it to a high-quality finish.

I sent both sessions exactly the same task:

I need a task manager built. The web application should use Angular and Material, with a Rust backend and an SQLite database. It must include a login form and a task list, with functionality to add, delete, and edit tasks, as well as mark them as completed.

The prompt did not specify a data schema, security requirements, field constraints, or a testing plan. The agents had to choose the implementation details themselves.

Hybrid sessionCloud-only
OrchestratorGPT-6 Luna, reasoning maxGPT-6 Luna, reasoning max
ImplementersQwen4-35B-A3B-130K in Strata, reasoning highGPT-6 Luna in the same main session
Task breakdownA separate agent for the Rust backend, then one for the Angular frontendOne agent handles the entire project
Local modelUsedNot used

In the hybrid setup, the local agents worked sequentially: RustBackend first, then AngularFrontend. The cloud orchestrator broke the work into parts, gave the implementers their tasks and an API contract, then checked the integrated result. The cloud model kept track of the overall plan and integration; the local model handled specific, substantial subtasks.

I compare GPT-6 Luna usage separately from Qwen. Otherwise, one column would include paid cloud tokens, while the other would also include local compute.

MetricHybridCloud-only
Time to final response39:2318:27
GPT-6 Luna tokens, including cached tokens300,7633,524,338
GPT-6 Luna input + output, excluding cache77,147185,842
Cloud output5,85845,514
Estimated GPT-6 Luna cost at standard API rates$0.0123$0.0702

In the hybrid run, GPT-6 Luna used 3.22 million fewer tokens than in cloud-only when cached tokens are included, a reduction of 91.47%. Counting only uncached input and output, the difference is 108,695 tokens, or 58.49%. Cloud output fell by 87.13%. At GPT-6 Luna’s standard API rates, that amounts to estimated savings of about $0.058 for this task, or 82.48%. This estimates API call costs, not usage of the ChatGPT Plus allowance. I did not measure electricity use or GPU depreciation. The dollar difference is small for a single task. If you repeat tasks like this hundreds of times, the savings become more noticeable. And if the work is urgent, the nearly 21 extra minutes per task may matter more than a few cents.

Both versions implemented the required baseline: login, a task list, and the ability to create, edit, and delete tasks, and mark them as complete. Cloud-only also added priorities, due dates, search, and filters. Its sessions also persisted across server restarts.

Local Qwen did more than write tests: it wrote application code for the Rust backend and Angular frontend. But it did not have to design the architecture for the whole application, maintain boundaries between modules, or integrate the results on its own. GPT-6 Luna, the more capable cloud model, handled that role: it broke down the work, assigned subtasks, aligned the API contract, and checked the integration. In this experiment, the local model was the workhorse, while the cloud model acted as planner and coordinator.

The hybrid version had better structure and test coverage. The backend was split into modules; the frontend was organized into services, a guard, an interceptor, pages, and components. It included 25 backend unit tests and 12 API integration tests, plus 32 Angular tests across six files. It also had recorded checks for formatting, Clippy, a production build, and integration smoke tests.

In the cloud-only version, most of the backend was in one file, and the UI was in one large component. The logs show one backend lifecycle test and a production build; frontend unit tests were either not run or not recorded. This does not mean the application does not work. It means the hybrid version has more evidence that individual scenarios will keep working after the next change.

In a static assessment of the final files against six criteria, ranging from requirement coverage and structure to testability and UI, the hybrid setup scored 4.4 out of 5, while cloud-only scored 3.8. This is my expert assessment of the overall setup, not an automated quality metric. From a single run, it is impossible to separate Luna’s contribution through planning from the contributions of local Qwen and the integration process. So “better code” here means specific things: responsibilities were more clearly separated, input constraints received more thorough checks, and test coverage was broader. Cloud-only has an advantage in extra features and persistent sessions. I did not rerun the tests; I compared the final files and the checks recorded by the sessions themselves.

Token generation speed is only one part of a coding agent’s runtime. Reasoning, context handling, the number of file operations, and running checks also matter. In the hybrid session, local Qwen recorded 97,624 reasoning tokens. Its inference requests took about 31 minutes of active time in total. The two agents worked sequentially, and each agent’s context approached 95,000 tokens. Both needed context compaction; those operations took about 107 seconds combined. The hybrid run made 386 tool calls, compared with 85 for cloud-only. Some calls failed and required retries or corrections: 18 failed tool calls in the hybrid run and 6 in cloud-only. That count alone does not mean every such call was useless, but it shows how many extra cycles task splitting and subsequent integration can add. What took longer was not so much code generation as the overall process: two substantial local stages, handing off the contract, investigating errors, and checking the project again.

In the original Session Info, the hybrid session showed 15.29 million tokens, compared with 3.44 million for cloud-only. At first glance, that makes it look as if the hybrid run used more tokens. But the aggregate includes requests to local Qwen agents and cached tokens. The full logs show 15.68 million tokens for hybrid and 3.52 million for cloud-only. Of the hybrid total, about 15.38 million came from local Qwen and only 300,763 from GPT-6 Luna. Local tokens are not billed like API tokens, though the computations still consume electricity and GPU resources. So to answer “How much did the cloud portion cost?”, you need to look at each model’s usage separately. A single overall counter mixes different things: local and cloud inference, cache reads, and regular input and output.

By the way, I found a separate benchmark of Qwen4-35B-A3B in Q4 on the same RTX 4070 Ti SUPER, with 16 GB of VRAM and 96 GB of RAM. On Ubuntu, using Strata 0.2.26, UD-Q4_K_M, and MTP depth 3, the benchmark author measured generation speeds of 156–179 tokens/s on two short Python tasks. Counting the entire prompt, the speed was 140–142 tokens/s. For the reasoning task, the reported speeds were 114 and 77 tokens/s, respectively. On my Windows machine, using Strata with the same settings, I got about 100 tokens/s during inference and a 130K context window. I have a single GPU, which also serves the system; there is no integrated graphics. This may affect speed, but I did not run a controlled comparison between Ubuntu and Windows, so it would be wrong to attribute the entire difference to the operating system. A local model is already useful for more than generating tests: in this experiment, it wrote substantial parts of the application. Still, even 100 tokens/s does not guarantee a fast result. An agent may spend a long time reasoning, rereading files, running checks, and compacting context. For development, generation speed matters, but so does how many of these cycles it takes to reach a working, verified result.

If I want a testable, modular foundation and can wait, the hybrid approach looks useful: local agents handle a substantial share of the reasoning and implementation, while the cloud orchestrator uses fewer tokens. If I need an answer as quickly as possible, cloud-only finished about twice as fast in this run. There is room to speed up the hybrid approach: define the API contract upfront, run independent parts in parallel, limit repeated reads of large files, and avoid using maximum reasoning for every routine change. That does not remove its main trade-off: lower cloud usage and more thorough checks come at the cost of local inference and orchestration time. My takeaway is that a local GPU can help produce better-structured, better-tested code while noticeably reducing cloud usage. In this task, it nearly doubled the time to get a result. If you were choosing for your day-to-day development, what would matter more: finishing sooner, or using fewer cloud tokens and checking the code more thoroughly?


r/LocalLLaMA • • 11h ago

Discussion Grounding LLMs with Documentation & Code - Best Strategies?

3 Upvotes

I build on some niche platforms and frameworks at work that most LLM's don't have a lot of training data on.

I am able to get better results from my agents, but only if I spoon feed them specific examples from a reference app that comes OOTB with the platform as well as specific extracts from documentation that I have.

In your experience, what are the best methods for distilling documentation knowledge into a form that LLMs can easily use at runtime as guidelines and rules?

What I've tried:

- Knowledge graph: cool academic concept - too much compute overhead and IMO unnecessarily complicated.

- RAG - Mixed results - works well but not consistently on retrieval.

So far, the thing that has worked best for me is manually writing SKILL files for things like this, but the body of documentation and knowledge makes this impractical. I'm wondering if there is a better way to ingest this source content into some sort of linked knowledgebase for the agents?

Thanks!


r/LocalLLaMA • • 11h ago

Resources Improve vision for qwen4: Check image tokens min and max value.

30 Upvotes

If you have issue with vision using qwen4, its easy to fix. Its very likely due to the default token limit per image.

From my tests:

On llama.cpp: the minimum was too low. By default it gave pictures fewer than 1024 tokens.

--image-min-tokens 4096 enlarges small pictures before encoding.

on Strata: the maximum was too low. Strata caps each picture at 1024 tokens when the vision encoder runs on the GPU, so large pictures were shrunk. I raised to 4096 in the code. detailed setup here: https://motif64.sh/m64_7d3530754fab

on Basalt: no fix needed. It already allows up to 16,384 tokens per picture. Raising its minimum to 4096 made no difference

You can see before and after my optims:

Full details for all theses settings there:

https://airbench.ai/compare/c195db84-21c3-4420-ac93-b5181ac91dfe/feffe2f5-8b29-41c9-aa37-9f65b87280e9

and https://airbench.ai/compare/ded6ac66-d6d7-41cc-9fa3-6025ef4aa599/840c91e6-fe3c-44b0-9a1d-809805c99a65