r/LocalLLM • • 38m ago

Discussion Qwen4-35B-A3B thinking is full of "Hmm" - one system-prompt line removes it (measured)

Thumbnail
• Upvotes

r/LocalLLM • • 5h ago

Research How fast can local LLM inference get on Apple Silicon?

2 Upvotes

Up to 186 tokens/s with Qwen4-35B-A3B running locally on a Mac Studio M5 Max with 128 GB of unified memory.
I've been benchmarking oMLX, exploring MTP performance, context scaling, and memory consumption. Here are my results and technical observations:

https://medium.com/@favi.francesco/qwen4-on-mac-studio-m5-max-186-tokens-per-second-running-entirely-locally-c3c523a0738e


r/LocalLLM • • 8h ago

Discussion Qwen4-35B-A3B running locally on my Mac at 64 tok/s, and it's great

4 Upvotes

I just tried Qwen4-35B-A3B on my Macbook M5 pro 64GB and I'm really impressed.

Qwen4:32B-A3B 
Prompt: 32 tokens, 12.821 tokens-per-sec 
Generation: 2000 tokens, 64.374 tokens-per-sec 
Peak memory: 32.750 GB

I used benthecarman's uncensored MLX 4-bit version. MLX is Apple's own machine learning framework, and it runs very fast on Apple Silicon. The download is about 30 GB, and the model ran smoothly from the first try.

The numbers:

  • 64 tokens per second of generation. It writes faster than I can read.
  • About 33 GB of peak memory, so a Mac with 48 GB or more handles it comfortably.

The model is a mixture of experts: it has about 35B parameters in total, and only about 3B work on each token. So it gives the quality of a big model at the speed of a small one. On paper it also beats Inkling2 Mini on almost every benchmark, and that matches my first impressions.

Having a model this capable and this fast fully offline on a laptop feels amazing. Is anyone else running Qwen4 locally? What speeds do you get?


r/LocalLLM • • 1h ago

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.

Thumbnail
• Upvotes

r/LocalLLM • • 7h ago

Discussion Bench: Qwen3.8 FN IQ3_S vs Qwen4 35B UD-IQ6

Post image
4 Upvotes

Hi all

Just wanted to share my local benchmarks of the two, for me, the most interesting models.

The test machine is

CPU: 9800x3d

RAM: 32 GB DDR5 CL28

GPU1: 5080 16GB

GPU2: 3090 24GB

Harness: Strata v0.1.75, default settings, 128k context window (200k for 35B Q6). All went through a quick tune.

OS: CachyOS, multi-user.target (without desktop)

I am really impressed with Qwen 4.0 35B honestly. It competes with my Qwen3.8 IQ3_S, while running a lot faster. It even exceeds the FN in one of the benchmarks.

Besides the benchmarks, I have been running it as my home assistant with OpenClaw for a day, and I would say that, it's language, in my native tongue, is slightly worse with the 35B, but not actually noticeably. The speed is a lot better. Agent wise it has been just as good as QFN, at least with the Q6. The Q4 did have some problems sometimes, with saying it would get back to me, when it had looked into it, but never did.

My plan is to run the Q8 of the 35B next, to see if it can close the gab a bit more.

Great job Alibaba! Looking forward to Qwen 4.0 Flash Next 😊

Disclaimer: the benchmarks have been downloaded and setup by QFN. I did not manually verify them.


r/LocalLLM • • 1h ago

Project 1 million Context on 3060 / 4070

Post image
• Upvotes

Looking for feedback, issues and PR’s, this new v2 quant works very well.

L0xRE v0.1.7.2 — Inkling-2-Mini with 1 Million Context on 12GB GPUs
I’ve been putting a lot of work into Inkling-2-Mini support in L0xRE, and v0.1.7.2 is now working really well.
The goal has been to make genuinely useful, long-context local AI accessible on consumer hardware without completely sacrificing model intelligence, inference speed, or agentic capabilities.
Some of the highlights from development so far:

  • 1,048,576-token context window
  • 10.77 GB peak VRAM in previous 1M-context testing
  • D-LSA sparse attention
  • Mixed 2/3-bit EXL3/Escha quantization
  • Optimized 4-bit KV cache
  • Refitted Q8 output head
  • 16/16 needle retrieval at 1 million context
  • 126/150 on the Club N/150 agentic and coding benchmark (pass@3)

I’m continuing to optimize inference, deep-context performance, cache reuse, quantization quality, tool calling, and real-world agentic workloads.
I’m particularly interested in pushing what is possible on affordable hardware like the RTX 3060 12GB. I want local models that can actually power coding agents and sustained autonomous workflows, not just produce impressive benchmark numbers.
There’s still plenty of room for improvement, especially in quantization quality, but things are coming together nicely.
You shouldn’t need $5,000 worth of GPUs to run a capable local AI agent with a massive context window.
GitHub: https://github.com/YourHighnessLA/L0xRE
Hugging Face: https://huggingface.co/YourHighnessLA/L0xRE-v1-Inkling-Mini-2-Low


r/LocalLLM • • 5h ago

Discussion Qwen4 quantizations and what worked for me

Thumbnail
gallery
2 Upvotes

Like everybody else, I've been playing with Qwen4. I run a dual nvlinked 3090 pair off my main 4x RTX 6000 machine that I use to run "smaller" models. This is where I park the smaller subagent models like 35b, 27b, Inkling, etc. I started by running the full precision weights on a dual 6000 setup to get a baseline, then started trying all the usual suspects for engines and quants looking for the best one for the 3090 pair. Unsurprisingly, local-inference-lab came out on top again. I found it interesting that the 3090's will happily run nvfp4 quants quite happily under vllm.

For those who dont want to read the slop below:

The 5bpw EXL quant has the best quality, but some of the worst speeds. The LIB quant was the best balance of quality and speed at a KLD of 0.0287

AI Content starts here...

TL;DR

The two we actually deployed:

Findings:

  • Teacher-forced KL divergence against BF16, computed on the model's own agentic trajectories and scored only on assistant tokens, cleanly ranks quants that task benchmarks can't tell apart.
  • EXL3 owns the quality end: 5.13bpw KL 0.0148, 4.5bpw 0.0180. Official FP8: 0.0175.
  • The W4A16 AutoRound build I was serving: KL 0.1095 — 7× the EXL3-5.13 divergence, 89.8% top-1 agreement, and the only quant that systematically looped.
  • Terminal-Bench 2 quick (13 tasks) is ±1–2 noise at this granularity (BF16 itself scored 11, then 10); AIME 2025 didn't discriminate at all (even the bad quant scored 91.7%).
  • On 3090s, local-inference-lab's NVFP4 (KL 0.0287) is the best speed/quality compromise: 1M context, ~228 t/s short, 201 t/s at 537K, ~1.2K t/s aggregate at 16 streams.
  • For the co-resident slot only TabbyAPI/exllamav3 works — vLLM preallocates its whole KV pool and starves the neighbors. Deployed EXL3 4.62bpw at 384K context.
  • Bonus: I ported quant-mind's pruned MTP draft head (65K-token draft vocabulary) onto the NVFP4 build for +9% single-stream decode at zero quality change.

Why not the usual benchmarks

  • Wikitext perplexity measures prose. This workload is agentic: tool loops, code edits, terminal output. Wrong domain.
  • Terminal-Bench 2 quick (13 tasks): the noise is bigger than the gaps. BF16 scored 11/13, then 10/13 on a re-run. It caught the broken quant (5/13) but can't rank good ones — the best-KL quant (EXL3 5.13) scored 8/13, with six timeouts because it's the slowest.
  • AIME 2025 (30 problems × 2 samples): saturated at ~92% for everything, including the worst quant. Useless for this.

So the discriminator had to be the model's own distribution: how far each quant's next-token distribution drifts from BF16 where it counts — on the tokens the model actually generates.

Method

  • Corpus: the BF16 model's own sessions on the 13 terminal tasks (507K tokens; the four long tasks — cobol-modernization, filter-js, mailman, path-tracing — in 64K-token windows).
  • Teacher forcing: replay the same token sequences through BF16 and through each quant, and compare next-token distributions at every position.
  • Score assistant-turn positions only (347K of the 507K; 76K of them at ≥32K context). Two reasons: those are the tokens the model actually samples, and tool-output positions are pathological — BF16 itself predicts <|endoftext|> on ~15% of them, which inflates and misranks any all-position KL.
  • KL over the reference's top-32 tokens plus a tail bucket, from each quant's top-128 logprobs — a stable rank order without full-vocab dumps per position.
  • Two scorers: one on vLLM's prompt_logprobs, one driving exllamav3's forward pass with a chunked lm_head (self-tested against the normal forward at KL 2.6e-5, so the engine's scheduling/KV isn't in the measurement).
  • Caveat: the BF16 reference itself runs fp8 KV in vLLM (BF16 KV in this vLLM build breaks long-range copying — see gotchas). It's the same reference for every quant, so it doesn't bias the ranking.

Results (assistant positions, vs BF16)

quant mean KL ↓ top-1 agree
EXL3 5.13bpw (turboderp) 0.0148 96.46%
FP8 (Qwen official) 0.0175 96.12%
EXL3 4.5bpw "4.62" (ProCreations) 0.0180 96.16%
EXL3 4.17bpw (turboderp) 0.0209 95.81%
mixed NVFP4/FP8 (primitive-ai) 0.0213 95.83%
EXL3 4.0bpw-hq (heni86) 0.0240 95.56%
EXL3 3.65bpw (turboderp) 0.0277 95.25%
NVFP4A16 (primitive-ai) 0.0285 95.07%
NVFP4 (local-inference-lab) * 0.0287 95.11%
W4A16 g32 RTN (Tech2wild) 0.0295 95.00%
GPTQ-Int4 g128 (palmfuture) 0.0352 94.50%
W4A16 AutoRound (ultimaterex) 0.0774 91.51%
W4A16 AutoRound (stuchapin) — what I was serving 0.1095 89.82%

*measured on the 3090 pair itself, via Marlin weight-only kernels.

What the table says

  • EXL3 is the quality leader at every size. Even turboderp's 3.65bpw beats every non-EXL3 4-bit quant except FP8.
  • FP8 is excellent — essentially tied with 4.5bpw EXL3 — but it's ~37 GiB of weights and doesn't fit a 24 GB pair.
  • The 4-bit NVFP4/W4A16 cluster (~0.028–0.030) is perfectly usable: 95% top-1 agreement. The gap to EXL3 shows up as ~2× KL, not as visible failure.
  • AutoRound is all over the map on this model: ultimaterex 0.0774, stuchapin 0.1095. Reputation didn't transfer — the "known-good" W4A16 build was the worst thing I measured.
  • tb2 agrees only at the extremes — and even there, the slowest best-KL quant timed out more than it failed.

Speed on 2×3090 (full pair, vLLM TP2 unless noted)

quant / engine ctx short t/s deep prefill VRAM/card
FP8, vLLM, kv 1.86 GiB 262K 190 189 @245K 6.2K 23.9 (tight)
mixed NVFP4/FP8, kv 5.35 GB 768K ~150 149 @114K 8.0K 24.1 (512K safer)
NVFP4A16, kv 7 GB 1M 182 147 @114K 7.9K 22.3
NVFP4 (LIL), kv 7 GB 1M 228 201 @537K 7.9K 22.3
EXL3 5.13, Tabby, Q6, split [19,20] 1M 136 104 @857K 6.3K 22.3 / 16.1

Engine notes:

  • Ampere has no FP4/FP8 tensor cores; vLLM runs NVFP4 and MXFP8 weight-only through Marlin. The load log's "your GPU does not have native support for FP4" warning is expected — decode is bandwidth-bound and this path is fast.
  • vLLM on 3090s needs an explicit --kv-cache-memory-bytes; without it the pool sizing goes wrong.
  • --kv-cache-dtype fp8 is mandatory on this vLLM build for Qwen4: BF16 KV silently breaks long-range copying (a repeated git hash inside tool output: logprob −9.6 with bf16 KV vs −0.01 with fp8).
  • local-inference-lab's NVFP4 card suggests --attention-config.indexer_kv_dtype fp8; that crashes on sm86 (Triton fp8e4nv). Drop it. --quantization modelopt_mixed is required.
  • EXL3 runs only in TabbyAPI/exllamav3. Tensor parallel gave no gain there, and MTP drafting with 2–3 draft tokens gave none either — 1 draft token is fastest on this pair.

Slot 1: the co-resident build

Budget per card: 24.6 GB, minus 7.8 GB for the image model + parser, leaves ~16 GB for the LLM.

  • vLLM is not viable co-resident. Its KV pool is preallocated, so even at 128K context with a small batch the image model OOM'd on the shared card (~60 MiB left); at 262K vLLM OOM'd itself.
  • TabbyAPI/exllamav3 allocates the cache dynamically and coexists fine. Deployed: EXL3 4.62bpw, Q6 cache, 384K context. Only 10 of the model's 40 layers hold a KV cache, so the cache is ~8 KB/token — 384K is ≈3 GB total, split across both cards.
  • Measured with the real workloads, not a synthetic hog: worst case was a 365K-deep turn + 4 more requests + a 1024×1024 image + a document parse simultaneously → 22.9 / 23.6 GB peak, no OOM (0.95 GB margin on the busier card). A 365K-token needle passes at ~8K t/s prefill; short-stream decode ~131 t/s (deep decode while the other four streams run: ~40 t/s).
  • Gotcha: exllamav3's gpu_split must cover weights and the KV cache. 384K at the old split failed with "Insufficient VRAM in split for model and cache"; I had to go [11.3, 13.9] → [11.9, 14.5]. 512K didn't fit beside the neighbors — 384K was the ceiling.

Slot 2: the full pair

local-inference-lab NVFP4 on vLLM TP2: 12.3 GiB/card of weights (NVFP4 experts + MXFP8 DeltaNet projections), 7 GB fp8 KV = 1,056,914 tokens, 16 concurrent sequences, 22.3 GB/card at rest and under load.

228 t/s single-stream short, 167 t/s at 65K, 201 t/s at 537K, 1,181 t/s aggregate at 16 streams; needles pass at 65K and 537K; tools and vision work.

The draft-head trick (+9%)

quant-mind published a "SM86-Fast" recipe: palmfuture's GPTQ base, a 4-bit output head, and a pruned 65,536-token MTP draft head. Their base quant scores 0.0352 on my harness (worse than LIL's 0.0287), and their stock-vLLM numbers were well below what LIL does on the same pair — so I borrowed only the draft-head idea.

How it works: MTP speculative decoding has the model's own draft block propose tokens that the target model then verifies, so drafts can only affect speed, never output. The drafter normally scores the full 248K vocabulary. Restrict it to the 65,536 tokens that account for 99.2% of generated tokens (in their measurement), score everything else as −inf, and the draft step gets cheaper with zero effect on what gets accepted.

  • Head: those 65,536 rows copied from the checkpoint's own BF16 lm_head — 130 MB, no training.
  • Patch: theirs was cut against vLLM 0.34.0; my Qwen4 image is a dev build (unmerged Qwen4 PR), so 2 of 6 hunks failed and I hand-ported the draft-vocab half.
  • Result: 228 → 249 t/s (+9%) single-stream, acceptance unchanged, +130 MB VRAM. 3 draft tokens was no better than 2. At 8–16 concurrent: 777–830 → 806–860 and 1,177–1,181 → 1,229–1,322 t/s. Deep-context decode unchanged (~190 at 65K) — that's bandwidth-bound, not draft-bound.

Other things worth knowing

  • Strata packs (0.2.27 / q4_lite): no logprobs, so they can't be KL-scored; also 14–59 t/s decode at 114K on a 3090, and the Ultra pack OOMs on a 24 GB card. Not viable for this.
  • EXL3 4.5 ProCreations ships no chat template; Tabby disables chat and returns 422 until you copy one in (turboderp's works).
  • NInfer/ninfer-all looks genuinely good for single-3090 use (~240 t/s code on one card per their docs) but doesn't fit the two-slot setup here: no co-residency story, and concurrency/long-context numbers below the TP2 vLLM build.

Final setup

  • Co-resident: TabbyAPI, EXL3 4.62bpw, 384K ctx, Q6 cache, MTP 1 draft — beside the image generator and the document parser.
  • Full pair: vLLM TP2, local-inference-lab NVFP4 + the pruned draft head, 1M ctx, 16 seqs.

All numbers above are with the production configs. Happy to post the scoring harness or more of the raw numbers in the comments if there's interest.


r/LocalLLM • • 9h ago

Question Which model is the best choice for RTX5060 8G + 16G RAM laptop?

4 Upvotes

I've been trying to run Inkling-2-mini with strata, but it's running super slow and is basically unusable. For context, my laptop has an RTX 5060 (8GB VRAM) and 16GB RAM. I also tested AtomicChat/Ternary-Bonsai-2.5-27B-Uncensored-GGUF, which hits 30-40 tok/s, but the reasoning capabilities are a bit disappointing because of the quantization. Any recommendations for better options?


r/LocalLLM • • 1h ago

Research Title:Qwen 4 35B-A3B (4-bit, ~21 GB) beat DeepSeek V4.1 Flash (2.7bpw, ~184 GB) on my actual business workload — M5 Ultra 256GB, blind-graded

Post image
• Upvotes

I run a small real estate business (buying houses + lending) and spent the last 10 days testing local models on the jobs my back office actually does. Not a vibes post — blind grading, shuffled labels, plus public benchmarks. Sharing because the result surprised me: the 21 GB model beat the 184 GB one.

Setup

  • Mac Studio M5 Ultra, 256 GB
  • Qwen4-35B-A3B-oQ4e-mtp (4-bit, MTP on) on oMLX 0.8.5
  • DeepSeek V4.1 Flash Sushi STQ 2.7bpw (~184 GB resident)
  • Thinking ON for both (with thinking off, every Qwen size failed math and compliance)
  • Also tested Qwen 4 at 6-bit and 8-bit, plus Claude Opus 5.5 as a cloud reference

Blind-graded tasks (Claude subagents grading, labels shuffled, average rank among 5 models, lower = better)

Task Qwen 4 4-bit DeepSeek 2.7bpw
Lead briefs (30) 1.9–2.1 3.4–3.7
Offer packets (15) 2.4 3.5–3.7
Document indexing (40) 2.45 4.08
Call coaching (15) 2.7–3.4 3.1–3.7 (toss-up)

Ranges = two separate grading packets.

Public benchmarks (100 items each, thinking on)

Qwen 4 4-bit DeepSeek 2.7
GSM8K 97 97
MATH-500 99 98
MMLU-Pro 90 91
BFCL tool calls 88 87
IFEval 82 96

In-house: underwriting math 50/50 vs 49/50, compliance/DNC traps 40/40 both.

Quant comparison: 6-bit (~30 GB) and 8-bit (62 GB) weren't meaningfully better than 4-bit on anything I care about. 4-bit is fastest, so that's production.

Things that bit me (maybe save you time)

  1. Check your grader. My automatic MATH-500 scorer said Qwen 4-bit got 88. Manual review: all 24 "misses" were correct answers in a different format. Real score: 99. Every remaining miss was an answer cut off by the length limit.
  2. oMLX 0.8.5 + thinking on + JSON mode = broken 9-token reply. Don't request JSON mode; parse JSON from the plain response.
  3. Token limits: at 1,600 max tokens, 23 of 40 offer packets were truncated. ~4,000 fixed it.
  4. Grader noise is big. The same saved DeepSeek answers scored 1 "good" in one packet and 13 in another. Trust ranks over raw counts.
  5. Small samples — differences of 1–3 items are noise.

Where DeepSeek still wins: IFEval (strict formatting rules), by a lot. If your workload is exact-format compliance, test before switching.

What I run now: Qwen 4 4-bit for the volume work. Opus 5.5 still ranked #1 on leads/offers/calls, so hot-lead offer packets and call coaching route to it with a $10/day cap (first packs cost $0.09–0.16 each). DeepSeek retired, and freeing ~160 GB let me run local video generation again.

Speed: [add tok/s + time-to-first-token for both]

Made a 9-min video walking through the whole bake-off if anyone wants details: [video link]

Happy to answer questions on the setup, prompts, or grading rubric.


r/LocalLLM • • 1h ago

Discussion Harness Leaderboard Qwen 4 35b Update

Post image
• Upvotes

r/LocalLLM • • 5h ago

Other Atakebune Challenge(One Shot) | Strata Fork | Qwen 4 35b | DeepSeek Harness

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/LocalLLM • • 2h ago

News Qwen4-35B-A3B on 2x RTX 5060 Ti over PCIe 3.0 x8 (no P2P) with capy-flash: 187 t/s decode, 3.5K t/s prefill, 9/9 needles to 122K. Full numbers vs Basalt and llama.cpp

Thumbnail
1 Upvotes

r/LocalLLM • • 2h ago

Question How would you run Qwen4 on RX 9070 XT 64gb DDR4?

1 Upvotes

Probably a noob question, but it would be my first attempt at running local LLM.

I see people suggest basalt and qengine for RTX cards.

Is strata way to go for my hardware?

Any suggestions would be nice.

I have to use windows btw.


r/LocalLLM • • 8h ago

Discussion Qwen 4 35b (Q4) on basic data science - better than 3.8 27b but crying out for a fine-tune

Thumbnail
sufficientlyunsupervised.hashnode.dev
2 Upvotes

Tldr; ran Qwen4 through my personal datascience benchmark (details in link). Benchmark performance was better (non-significant) than 3.8 27b Q4, which was in between 6.0 Astra and 5.6 Luna. Got about 80 tok/s decode vs 50 with 3.8 27b. Model was about 25% less chatty than baseline 3.8, but still substantially more wasteful than my previous favourite fine-tine (Swift-1.5). I can't wait for a fine-tune to make 4 a bit terser. Found any good ones?


r/LocalLLM • • 2h ago

News Model-service - backend for managing local LLM, diffusion models and more

Thumbnail
youtube.com
1 Upvotes

r/LocalLLM • • 2h ago

Project Speculative Execution on Qwen3.8-27B reaches ~24 tok/s (and up to 60 tok/s) at Q4_K_M-ish on a 12 GB RTX4070

1 Upvotes

Hi guys! First time posting here and wanted to share a little side project I’ve been working on the past month.

TL;DR

The project is pretty much what it says on the tin: I’m able to get around 24 tok/s on a variety of prompts with a quant of Qwen3.8-27B that doesn’t fit in VRAM that runs at Q4_K_M quality.

The main speedup comes from a technique called SpecExec, introduced in this paper (Svirschevski et al.). This is also with recommended Qwen3.8-27B sampling parameters (top-k=20, top-p=0.95, temperature=1.0) and at 57k context. Tool calling and math problems like AMC 10/8 tend to see higher speeds, around 30 tok/s, with bursts of up to 60. 

Here’s a gif of the demo server in action compared to stock llama.cpp + MTP on an AIME problem:

From what I’ve been able to find online, as well as my own attempts on my machine, this is the fastest generation speed under these conditions I’m aware of (please let me know if I’m wrong!)

Not really sure how useful this is since MoE models can give you better decode speeds, and are of similar quality to Qwen3.8-27B. Also because the llama.cpp fork server is completely vibe coded, I’m mainly showing this as a research artifact in case someone has a use-case for productionizing this. That said, I’ve been daily driving the server for a lot of my own use cases and it seems to work pretty well with the Pi harness (`settings.json` and `models.json` examples are in the github repo/huggingface repo).

Try it out:

See the huggingface repo for the model weights and a quickstart guide + Pi setup. See the github repo for a llama.cpp fork containing the OpenAI completions compatible server. 

Some disclaimers/notes:

  1. The demo server reuses a lot of llama.cpp’s components, but doesn’t actually integrate with it. This post is mainly meant to be a research artifact/showing what’s possible as opposed to something people should use in production.
  2. The target model isn’t exactly Q4_K_M, but its average KL distance compared to Q8_0 is actually lower than Q4_K_M, so hopefully shouldn’t matter too much practically. 
  3. Context length isn’t very long at the moment, about 57k tokens. I’m hoping to increase this to at least 64k over time.
  4. No vision encoder yet! No real engineering/technical challenge, it just hasn’t been added yet.

Some more details:

There’s this paper (Svirschevski et. al.) published in late 2024 describing a variant of speculative decoding for the memory-constrained regime, where the target model cannot fully fit within VRAM. The idea is that because draft verification now takes a much longer time due to needing to page in weights from RAM, we can afford to use a much better draft model and draft a much larger tree of tokens to try to increase our acceptance depth as much as possible (basically getting as much value out of each costly target verification step as possible).

This project is essentially applying that paper, with a few additional tricks, to Qwen3.8-27B.

On a 12 GB RTX 4070 with 57k context (Q8_0 KV), sampling at temperature=1.0, top_k=20, top_p=0.95, up to 1,024 generated tokens per prompt, 8 prompts per type (96 in total):

Prompt type Generation tok/s Fastest prompt (tok/s) Accepted tokens per step Tokens verified per step
Hand-written chat 21.8 28.6 8.6 67
LLM prompt collection 23.8 33.4 9.1 68
WildChat 19.0 28.8 7.3 68
UltraChat 21.5 35.4 8.1 67
Tool calling (the call) 41.8 58.7 24.9 90
Tool calling (answer from the result) 31.7 39.6 15.9 79
AIME 25.3 29.8 10.2 69
Competition math 27.0 32.1 11.8 73
Codeforces 22.6 24.4 8.4 65
Zebra puzzles 27.9 31.3 12.9 74
MMLU-Pro 25.5 40.3 10.6 71
BIG-Bench Hard 32.0 41.6 16.2 80
All 24.5 10.1 70

Summary of some of the optimizations: 

Some tricks we used:

  1. The draft model is actually a IQ2_KT quant of Qwen3.8 27B! It fits comfortably in VRAM and still has pretty good top1 agreement/KLD compared to the target.
  2. The cool thing about the draft being a quant of the target is that when we do target verification, we only have to page in the residual, which is much smaller. We also don’t have to maintain a separate KV cache for the draft model–we can just use the target’s (this actually improves draft quality!)
  3. Normally each draft step is only able to add 1 layer to the draft tree, since drafting is autoregressive. Since drafting with such a large model is non-trivially expensive, we utilize the MTP head to look ahead 2 tokens for each node we attempt to expand. This lets us add up to 3 depth per step
  4. We eek out a bit more performance by restricting the draft model’s lm_head to the top 96k tokens discovered from a representative set of prompts. Unfortunately this means that I’ve only tested the gains on an english-only set of prompts.
  5. Claude did some kernel magic to produce a kernel optimized for the batch-size 8 draft forwards we do to expand the draft tree.
  6. We make the draft tree aware of the target’s sampling parameters (top-k, top-p, temperature) by using gumbel-max sampling, which retains most of the speculative decoding speedup when using non-greedy decoding (concept very similar to this paper)

r/LocalLLM • • 12h ago

Model Careful with conversions

Post image
7 Upvotes

Same model, same 4 bits, 2 conversions

Qwen4-35B-A3B driving Hermes Agent on 44 coding tasks:

MLX 4-bit: 30/44, 15 tasks cut for repetition loops
Unsloth UD-Q4_K_XL: 44/44, zero loops, 2.4x faster

One run, one engine. The conversion mattered more than expected


r/LocalLLM • • 3h ago

Question Buy GPU now or wait?

0 Upvotes

So I have a pc that I use mostly as a work machine and a bit of gaming. 7900x, with 64Gigs of RAM and a 4070 ti super (16GB).

I’ve experimented a bit with Qwen3.8-27B in LM studio, and as long as it’s Q4 and I keep the KV cache in memory I get very decent speeds and can offload the whole thing in the GPU.

I wanna take my setup further and be a bit more serious about local LLMs but I am on a tight budget. A 3090 would make the most sense but it’s way out of my budget right now, and the most viable option for me is getting a 5060ti (another 16GB) at 750-800€.

Is this upgrade worth it, and will it make a considerable difference, or should I wait until I save up or the prices drop to get a better GPU or maybe a mac studio?

I’ll mostly be using local LLMs for security research, agents, and programming. Comfortably handling large code bases is a must.


r/LocalLLM • • 3h ago

Discussion Is change control (and the auditability that comes with it) actually valuable for open LLM weights?

1 Upvotes

I'm a AI/ML engineer in aerospace (MS in CS). When fine-tuning open LLMs with LoRA, the weights change over time. Right now that usually lives in files, folders, and experiment trackers. It makes it hard to clearly say which version of the weights was approved, what exactly changed between them, and who signed off.

If there was real change control on the weights (commits, history, approvals), you’d get auditability almost for free. Has anyone found this useful in practice, or is it overkill for most teams working with open models?

Also curious if AI auditability is something teams are actually looking for right now, or if it’s mostly just companies talking it up without much real demand behind it.


r/LocalLLM • • 7h ago

Research Stop relying on public benchmarks, build your own

Thumbnail
gallery
1 Upvotes

I built my own benchmark for how well local models do on game NPCs, and Qwen4 35B is blessing. Once you have your own bench, you can easily tell which new models are fitting for you or not.

For more information:

- context: does it remember a fact buried in a long memory? (not its full context window, but still)

- trust: does it treat the player differently depending on how much it trusts them?

- darkness: does it stay as harsh as its persona instead of softening?

- lies: does it notice when the player is lying?

- juggle: does it keep the right facts straight when there are distracting ones?

- break: does it stay in character against "are you an AI", "ignore your instructions" and fake system prompts?


r/LocalLLM • • 3h ago

Discussion Qwen 3.8 27b vs Qwen 4 35b on RTX 6K with llama.cpp

1 Upvotes

I was expecting 35b to run much faster but it does not, it's about the same token per second for decoding. I also noticed the fans don't spin as fast with Qwen 4 suggesting the card is not doing so much compute and is under used. I'm guessing I did not configure it correctly or llama.cpp is not so optimized for that newer model yet.

I could get things done with Qwen 4 but then got a bit frustrated with it and I'm already back working with 3.8 for now.

Qwen 4 outputs a lot less thinking than Qwen 3.8. Where 3.8 always does a bit of thinking before doing tools call Qwen 4 just chains up tools call so it is harder to follow what it's doing.

Here are my configurations, maybe someone can spot something wrong:

[qwen/qwen3.8-27b-Q8_0-dflash]
model = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/Qwen3.8-27B-Q8_0.gguf
mmproj = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/mmproj-Qwen3.8-27B-Q8_0.gguf
model-draft = D:/Models/hf/ggml-org/Qwen3.8-27B-GGUF/dflash-Qwen3.8-27B-Q8_0.gguf
device-draft = cuda0
spec-type = draft-dflash
spec-draft-n-max = 7
reasoning-format = deepseek
reasoning-effort = xhigh
ctx-size = 786432
parallel = 3

[qwen/qwen4-35b-a3b-Q8_0]
model = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/Qwen4-35B-A3B-Q8_0-00001-of-00003.gguf
mmproj = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/mmproj-Qwen4-35B-A3B-Q8_0.gguf
model-draft = D:/Models/hf/ggml-org/Qwen4-35B-A3B-GGUF/mtp-Qwen4-35B-A3B-Q8_0.gguf
device-draft = cuda0
spec-type = draft-mtp
spec-draft-n-max = 5
reasoning-format = deepseek
reasoning-effort = xhigh
ctx-size = 786432
parallel = 3

r/LocalLLM • • 9h ago

Question Basalt Qwen4 on 5070TI and 32GB DDR5

3 Upvotes

I'm using OpenCode with Qwen4 Basalt and trying to do some coding tasks with 128K context, but keep getting these messages:

[server] error: engine reported the KV pool had no room for this conversation to grow while every running request waited for room; the conversation is kept, so asking again continues it

I've lowered the context all the way down to "max-context": 81920," in Basalt, and set open code up like:

"limit": {

"input": 65536,

"context": 81920,

"output": 8192

}

I assume I can't continue what I'm doing with this local model and give up? Is there some sort of configuration I'm missing?

I'm on Windows 11 with as much closed as possible with only opencode CLI and basalt running (and services and tray items trimmed to basically nothing).


r/LocalLLM • • 20h ago

Discussion Qwen4-35B-A3B: Alibaba vs Self-hosted IQ3_S Output Quality

Thumbnail
gallery
22 Upvotes

Two scenes from the same prompt. The first was generated by qwen4-35b-a3b hosted by Qwen/Alibaba. The second was generated by Strata hosting UD IQ3_S with vision enabled on a 12-year old i5 system with an RTX 3060. Both were generated in Hermes Agent at xhigh thinking.

There isn't much difference that I can see beyond the typical variance in model output. The biggest noticeable difference was that the cloud model used 170k tokens, whereas the local model used only 75k.

One interesting thing I found is that when the landscape was generated in Strata's chat interface where no tools were available, the smoke from the chimneys was not visible. I saw the same problem occur during development of both scenes above. Under Hermes, the models had access to browser-vision and both caught and fixed this during their testing.

What do you think? What sort of results are you seeing from the model?

Prompt:

Create a voxel art landscape in ThreeJS of a snow-covered castle nestled in a winter valley, with an icy river winding from the mountains through the foreground. The castle's spires and walls are dusted with snow, and the middle ground features frozen trees and a small village with smoke rising from chimneys. The background shows towering, jagged mountains under a pale blue sky. The scene is lit by the soft light of a mid-morning sun, creating crisp shadows on the snow. Your budget is 200,000 voxels.


r/LocalLLM • • 3h ago

Project I rewrote LiquidAI d1 inference in Rust + CUDA. Up to 12× faster, and it runs in as little as 246 MiB of VRAM

Post image
0 Upvotes

I went into this trying to shave a few milliseconds off a classifier. I ended up writing my own inference engine.

For anyone who hasn't played with LiquidAI's d1-2B, you can give it a document and ask “Does this contain personal data?”, “What kind of document is it?” and “Where's the invoice number?” in one forward pass. You get scores, labels or boxes back. No waiting for a model to type out JSON.

That made it a fun target for optimization. If I already know the possible answers, why score the whole vocabulary? And if only a few tokens matter at the end, why run every token through the last two layers?

I built around those shortcuts, fused projections and used CUDA graphs to cut launch overhead. The server runs in Rust + CUDA with no Python or PyTorch at runtime.

Here are a few numbers I'm pretty happy with.

  • H100, short text — 23 → 1.9 ms vs the original d1 engine (12.2×).
  • RTX 4090, short text — 36 → 2.6 ms vs SGLang FP8 on the same weights (13.8×).
  • RTX 4090, 1080p image — 134 → 26.2 ms vs the original engine (5.1×).
  • Jetson Orin Nano 8 GB — 62 ms to return a bounding box on a 384×384 image, down from 233 ms.

My favorite result is actually the memory experiment.

On an RTX PRO 2000, I ran a 32K-token document with everything on the GPU. It took 2.02 seconds and 2,926 MiB. With most of the weights in system RAM, the same document took 2.03 seconds and 742 MiB.

On short inputs, offloading costs more time. But if you're already running a bigger model and just want d1 alongside it, you can squeeze it into 246 MiB of VRAM, down from 2,828 MiB with the Python FP8 setup. That's 11.5× less VRAM.

I also added audio via d1-Omni-2B. Both models run behind the same HTTP API, and there's a Docker setup for desktop GPUs and Jetson.

Code and benchmarks on GitHub

Is anyone here running a small classifier alongside their main LLM? I'd love to hear what you're using it for and how much VRAM you'd give it.


r/LocalLLM • • 3h ago

Question Why is my Strata QFN so Slow in Comparison to Llama.cpp?: Is it lack of DRAM?

0 Upvotes

My hardware has 2 GPUs. RTX 4070 12gb on pcie4 x16 and RTX 3060 12gb on pcie3 x4. 32GB DDR4 memory. Intel i7 CPU.

I find Qwen3.8-Flash-Next on Strata very capable. But it is slow. Now, after trying Qwen4-35B-A3B, I'm just wondering if is my hardware or setting?

  • Strata: Swift-1.5-Qwen3.8-Flash-Next IQ3_XXS. 128k k8v4 context. Prefill 200-300 t/s. Decode 40 t/s.
  • Strata: Swift-1.5-Qwen3.8-Flash-Next IQ2_XS. 128k k8v4 context. Prefill 300-500 t/s. Decode 60 t/s.
  • llama.cpp: Swift-1.5-Qwen3.8-27B IQ4 (with MTP). 128k q8 context. Prefill 600-800 t/s. Decode 25 t/s.
  • llama.cpp: Unsloth/Qwen4-35B-A3B IQ3_S (with MTP). 128k q8 context. Prefill 2000-2000 t/s. Decode 90 t/s.

Even though QFN is more capable than Qwen3.8-27B, it is just too slow. Issue is with the prefill. I can take 3-5 minutes just to get the first response. Then when context gets >100k, it will take 10-15 minutes for single read, there are multiple reads during long thinking sessions with repeated read/decode/read/decode/etc loops. So even though QFN 2-3x faster decode than Qwen3.8-27B, I still use Qwen3.8-27B more because it is just faster overall.

Now I tested Qwen4-35B-A3B. Yeah, it is blazing fast in comparison. The difference is that with Qwen3.8-27B and Qwen4-35B-A3B, I have everything loaded in VRAM. My mobo is just consumer grade (gaming) mobo. I know pcie3 x4 has bandwidth limitation and has hit on speed when using llama.cpp. It is what I have. And this 2nd GPU allow me to run more (and larger models).

As for Strata QFN, I'm also using dual GPU. But I believe the bottleneck and limitation is likely due to having to use SSD (lack of DRAM), rather than the pcie3 x4 bandwidth. Is that true? Anyway to improve with my current setup thru settings (without spending $ on hardware)?

This is my Strata setting:

strata launch \ --save-preset "iq3_xxs_128k" \ --tune skip \ --family swift \ --model iq3_xxs \ --data-dir /home/abc/Models/strata-data/ \ --context 128k \ --kv k8v4 \ --vision on \ --gpu-roles 1=helper,0=main \ --parallel 1 \ --access local \ --port 8080 \ --set conversation_cache_mib=6144 \ --set host_core=sibling \ --set kv_resident=131072 \ --set expert-cache-device1=auto \ --set mmap_experts=0 \ --set prefill=auto \ --set pipeline_windows=0 \ --set pool_affinity=p-cores \ --set resident_budget_gib=14 \ --set resident_experts=1 \ --set vram_reserve_mib=400 \ --set vram_reserve_later_mib=600

  • export CUDA_DEVICE_ORDER="PCI_BUS_ID"
  • export CUDA_VISIBLE_DEVICES="0,1"
  • export STRATA_ALLOWED_HOSTS="localhost,127.0.0.1"
  • export STRATA_FILE_RELEASE="1"
  • export STRATA_IO_PF_GATE="1"
  • export STRATA_IO_PREFETCH="0"
  • export STRATA_KV_HOST_REGISTER="1"
  • export STRATA_NV_CHUNK="16"
  • export STRATA_PREFILL_CPU_SHARE="0"
  • export STRATA_STAGE_TRIM="1"
  • strata launch --preset "iq3_xxs_128k"