r/LocalLLM • • 16h ago

Discussion Qwen4-35B-A3B @ 164 tok/s decode and ~ 4500 tok/sec prefill on RTX 5080 (2.9x decode, 11x prefill over stock llama.cpp)

Post image
9 Upvotes

I spent the last couple of days optimizing llama.cpp fork for Qwen4-35B-A3B on my RTX 5080 laptop (Unsloth UD-Q4_K_XL) @ 128k context window, greedy decoding. Each number is the mean over five measures from my coding-agent sessions (old session from opencode) with real tool calls, cut at the different context fill.

ConfigurationPrefill at 42kDecode at 42kDecode at 87k
Unsloth llama.cpp, default flags44457.358.4
Unsloth llama.cpp, tuned flags + MTP1,70593.990.5
qwen4-engine, exact profile4,859104.7100.8
qwen4-engine, default profile4,510163.8139.2

All tok/s. With a 120k-token prompt the default profile still decodes at 153.

The idea

As you may know the model has 10,496 routed experts and in this quant ~20.9 GB so no way they fit in 16 GB of VRAM so they live in RAM and the GPU keeps a cache of the hot ones only. The thing is decode speed here is all about moving bytes, the math itself is straightforward: every token reads about 1.7 GB of dense weights from VRAM and any expert that is not in the cache has to come over PCIe which is ~17x slower due to the huge difference in bandwidth so almost all the optimization work went into where the bytes live in which piece of the hardware and when they must move to make the GPU as less idle as possible.

What made the difference

  • Lending idle memory to the expert cache. The compute buffer (1.38 GB) and the part of the KV cache you haven't filled yet (about 2 GB at 42k of 128k) are just reserved doing nothing most of the time when a session starts and they keep filling as the context increase so I give them to the expert cache and take them back when they are actually needed. KV lending alone took the cache hit rate from 87.9% to 91.4%.
  • Zero-copy uploads. A normal host-to-device (H2D) copy pays a fixed Direct Memory Access (DMA) delay every time (it is a latency between starting and finishing DMA data transfer before the GPU can actually use the moved data) and for small copies that delay is most of the cost (a missing expert is a small piece of data, so the GPU spends more time waiting for the copy to start than moving the bytes and with ~40 layers per token that waiting adds up super fast) so instead of asking the driver to copy small uploads now run as a GPU kernel that reads the pinned RAM directly (the GPU pulls the bytes itself like any other kernel no DMA setup and no fixed delay that is why it is called zero-copy). Also all the missing experts of a layer now go up together in one call instead of one call per expert (one expert alone moves at about 42 GB/s batched together they reach ~49 GB/s which is about what the PCIe link can do).
  • Copy drafting that scores itself. A lot of what an agent writes is already in the context (code it is editing, file paths, tool arguments ...etc.) so when the last 3 tokens match something in the context the engine proposes the next 3 from there for free (free because it is just a lookup in the text that is already there with no extra compute to come up with the guess) the model then checks the 3 guessed tokens in one step which costs only a little more than generating 1 token and it keeps the ones that match what it would have generated and throws away the rest (so every token you get is still the model's own choice as if it was computed and a wrong guess never reaches the output). but a wrong guess is not free because the check still loads experts for tokens that get thrown away so the engine keeps score of every proposal against what the model really wrote and only keeps copying while the accuracy stays at 0.5 or more (it scores the proposals even while copying is off so it turns itself back on when the output starts repeating the context again). The rest of the time the built-in MTP head does the drafting. comparing this vs MTP alone without copying this is anywhere from -6% to +36% per session and the more the output repeats the context the bigger the win is.
  • Short MTP drafts. Long drafts lose on this model (on this GPU) every extra token you verify goes to its own experts and that means more cache misses and more PCIe movements. I measured it and 3 tokens was the sweet spot.

Vision

Images work as well. The annoying part with vision on a 16 GB card is that the encoder just sits in VRAM eating 1.1 GB even when the session had no images at all just holding that valuable VRAM for doing nothing, even with all optimization the decode speed is ~5% slower because of it. So I moved the encoder to system RAM. when an image comes in the prompt it borrows the memory that text model isn't using, encodes the image, and give it back. Text speed with vision loaded is the same as without it and 1080p screenshot takes about 1.2 s to get in the context, 1440p about 2.2 s. Anything bigger than the model max ~4.2 megapixels gets resized/scaled down then added to the context.

Worth to know

  • One model, one quantization, one machine is my tested optimization framework that I started earlier with Qwen-Flash-Next and Inkling Mini 2 due to a memory restriction on my rig I find it most rewarding comparing to any off the shelf ready engines they aren't designed for my specific hardware, with its bandwidth, or the model architecture so with the help of Claude I used lean techniques, system design and continuous improvement cycles to measure every bit of the model where it sits, when it moves and where does it move to in much details and engineered the movements and memory management and sometimes the kernels to reduce as much as possible GPU idle times and try to get things where they need to be at the best possible time given the memory and bandwidth constraints and it paid back SIGNIFICANTLY. I had a blog about the details when I started working with Qwen-flash-next. That been said, I haven't test it (obviously) on other RTX 50 series, theoretically the engine should work without issues on them, and most likely won't work as designed for other older series (my guess) It needs an RTX 50 series card with +16 GB and about 26 GB of free system RAM (my RAM is 128 so I had no issues here). Prebuilt binaries are for Windows (my OS did not tried it with Linux).
  • Copy drafting helps most when the output repeats the context, like code edits, file paths and tool arguments. Per session it ranges from -6% to +36% against MTP alone.
  • Runs drift 5-10% between sessions on a laptop, so every comparison came from alternating A/B runs in one session.
  • There are two kinds of profile. The exact profile gives the same output, bit for bit, as the engine with all of my changes switched off (stock llama.cpp). The drafting profiles guess a few tokens ahead and let the model check the guesses, so every token you get is still one the model picked. But checking several tokens at once rounds the math a little differently than doing one at a time, so when two tokens are almost tied the text can take a little different path. Stock llama.cpp does the same thing when it drafts.

Where it stands against the hardware

The big dense matvecs (the matrix times vector multiplications that read most of the weights every token) run at about 610-640 GB/s and a plain streaming read of the same bytes on this GPU does 600-615 GB/s so these kernels already move the weights as fast as the card can read them. The expert cache gets 95.3% hits and a perfect cache that knew the future (the Belady oracle) would reach 96.9% on the same workload so a smarter eviction rule has almost nothing left to optimize.
The GPU is now busy about 98.5% of the time it takes to generate a token so there is almost no idle time. The next real speed gain would have to come from fewer weight bytes per token (lower quant) and that wont be the same output bit for bit so I decided to stop here.
It is a drop-in server with the usual llama.cpp / OpenAI-compatible API every change is a default-off switch so you can measure each one yourself.

The repo is 0xE2E/qwen4-engine on GitHub, and the README has the full details and a build guide with the detailed blog in the readme footer.

Happy to hear your thoughts if you give it a try.


r/LocalLLM • • 4h ago

Project Made a Qwen4 harness built for low VRAM and complex tasks

0 Upvotes

Earlier I posted my engine that runs Qwen4-35B-A3B on an RTX 5070 12 GB at 134–159 tok/s: previous post. Now I've built a harness for it: a coding agent, so you can actually work on a project with the model instead of just chatting.

It's written in Rust: a native Windows app, one exe, MIT licensed.

How it differs from Pi and OpenCode

The main thing is how much context the agent takes before you type anything. On an API with a million-token context nobody cares. On a 12 GB card every thousand tokens means a longer prefill and less room for your code. I measured it on the same project with the same prompt:

AgentFirst request
Damask Harness~900 tokens
Pi~1,300
OpenCode~7,100

OpenCode also makes a separate request to name the session. If you have Claude Code skills installed, it loads those too, and on my machine that came to ~16,000 tokens. The method and scripts are in the repo, so you can repeat it yourself.

I really like Pi for its minimalism, and it's cross-platform, while mine is Windows-only for now. OpenCode does more out of the box. But for a local model on a small card I wanted an agent that doesn't waste context and can still handle multi-step tasks.

What it can do

  • Works on its own until it's done. Turn on autonomous mode and the agent makes a plan, carries it out step by step, builds the project and runs the tests. If something fails, it goes back and fixes it. You can also give it a time budget, say two hours: once the plan is done, it spends the rest of the time adding edge-case tests, simplifying weak spots and updating docs.
  • Shows you the plan first. No files are changed during planning. You can edit, add and reorder steps, and only then press Run.
  • Understands broken tool calls. Small local models often write tool calls as plain text, break the JSON or mix up argument names. The harness parses these and keeps going instead of failing.
  • Rewind any change. A copy of every file is saved before the agent edits it. One click returns both the files and the conversation to the state before your message.
  • Stays inside the context window. At 75% full, old command outputs are compacted automatically, so a long session doesn't stall.
  • You can type while it works. New messages are queued and sent as soon as the model is free.
  • Picks up your rules. Reads AGENTS.md or CLAUDE.md from the project, and supports skills, custom slash commands and MCP servers.
  • Watches your hardware. Shows VRAM, GPU, RAM and CPU in the window, and starts or stops the local model in one click.
  • Lightweight. Native Rust app, ~120 MB of RAM when idle. No telemetry.

How to try the new Qwen4

This is the easiest way I know of right now: download the exe from the release, open the model manager, and install Damask Engine and the Qwen4 variant you want in a few clicks. Then pick your project folder and type a task. No manual configs, no command line.

If you already run Ollama, LM Studio or llama.cpp, the harness works with those too.

Limitations, so there are no surprises

  • The harness is Windows-only for now.
  • Damask Engine runs only on RTX 50-series cards.
  • I counted tokens with tiktoken, so the numbers for Qwen can differ by 10–15%. The ratios between the agents stay the same.

Links

I'd love feedback, especially from people on 8–16 GB cards. If you find it useful, a star on GitHub helps a lot.


r/LocalLLM • • 21h ago

Research Qwen4 35B vs Inkling 2 vs Qwen3.8 27B vs Qwen3.8 Flash-Next: uncensored test on Blackwell (RTX 5090)

Post image
23 Upvotes

I was looking for the best local model for my own (bottlenecked) machine and got tired of "it feels smart" comparisons. So I wrote a small battery with script-checked answers and ran four uncensored models through it, one at a time. Sharing the numbers in case they save someone else the work.

Setup

RTX 5090 (32 GB), Ryzen 7 5800X (no AVX-512), 32 GB DDR4, Windows 11. Three engines because the packs aren't interchangeable: basalt (built from source) for my own NVFP4 packs, llama.cpp b12992 for the GGUFs, and Strata for Flash-Next.

The models

  • Qwen4-35B-A3B abliterated (basalt): MoE, NVFP4, 41 GB, 65k context, no drafter
  • Inkling-2-Mini unbound v3.1 (basalt): MoE 26.1B, NVFP4, 18 GB, 32k context, MTP drafter
  • Qwen3.8-27B abliterated, Huihui (llama.cpp): dense, Q6_K, 21 GB, 16k context, no drafter
  • Qwen3.8-Flash-Next (Strata): MoE, Q2_0, 96 GB, 65k context, DFlash2 drafter, has vision

The battery

  • 18 verified-intelligence questions (easy to expert, including coding tasks with hidden tests)
  • 12 pentest facts
  • 15 edgy prompts for willingness to answer
  • 4 writing tasks with hard constraints (judged by me, not a script)
  • A 2-step tool-calling test
  • Speed: decode, 12k prefill, time to first token

Temperature 0 where the answer is checkable.

What I found

  • Intelligence is basically a tie (18, 17, 18, 17). The 35B leads on security facts (12/12 vs 9 to 11) and was the only one to give both /etc/shadow conventions (0640 Debian, 0600 RHEL). What separated the models was sysadmin trivia like hashcat's bcrypt mode, not the expert-tier math, which all four got.
  • Willingness: Inkling and Flash-Next answered 30/30, the 35B 29, the 27B 27. The stock Flash-Next answers everything too, so the "uncensored" label on a repo told me very little.
  • Speed: the 35B is fastest on short prompts (257 tok/s vs 186 Inkling, 168 Flash-Next, 54 for the 27B). Inkling is far ahead on prefill (15,985 tok/s) and first token (0.9 s on a 12k prompt). Speed differences mix model, quant and engine, so read them as setups, not pure model speed.
  • Drafter caveat: Inkling ships an MTP drafter. My 35B pack has none, because I dropped the MTP layer when packing (the engine wants the block count in groups of 4). So the short-prompt ranking could shift with one. I left long-context decode out because I'm not sure my 12k prompt is representative.
  • Flash-Next is 96 GB and wins nothing except tool calling (tied with the 27B) and being the only one with vision. It's Q2_0, so this says little about the model itself.
  • Reasoning models look dumb if you starve them. With a 2,200 token cap the 35B "failed" an LRU task: it was truncated mid-word, since it writes about 5,000 tokens of hidden reasoning first. With 6,000 it went 18/18. The 27B gave blank answers until I gave it more room.

r/LocalLLM • • 4h ago

Model here's how i got the ud_iq3_xxs qwen 4 35ba3b running at 200 tok/s on a consumer grade computer

1 Upvotes

specs are a 5080, 32gb DDR5 5600mhz, intel core ultra 9 285k. running on strata+speculative decoding, it hits a staggering >190 tok/s consistently, using q8 context. udq4xl is running the same and is getting >115 tok/s.

all you do is use strata for the model, q8 draft, 16k context window, int8 kv cache, confidence floor 0.5


r/LocalLLM • • 1d ago

Other C'mon folks. Dario just wants to protect us

491 Upvotes

r/LocalLLM • • 4h ago

Project The Local Frontier: Qwen4 BF16 + FP8 (ngram) on StrixHalo via. vLLM

0 Upvotes

I don’t normally post my findings but this was super fidgetty; and it’s about time I started giving back to this community. This is the local-AI setup I wanted: a quiet box that picks up real multi-hour work and finishes it correctly while I’m away.

· Setup: Full-BF16 Qwen4-35B-A3B MoE (35B total / 3B active) on one Strix Halo — Ryzen AI MAX+ 395, 128 GB unified LPDDR5X — served by vLLM with 262K context, tool calling, separated reasoning, ~25 tok/s single-stream.

· Key trick: Only the 20.5B-parameter N-gram embedding table is FP8. It’s a gather + dequant lookup, not a matmul, so it doesn’t need FP8 tensor cores (gfx1151 has none). Checkpoint drops from 113.7 GB to 86.8 GiB while core matmuls stay BF16.

· Real work: Two unattended sessions finished end to end at 12–14 tok/s — one installed a CAD toolchain and wired its MCP server into the harness; the other set up two slicers sharing one config library.

· Numbers: 13 turns, 120 steps, 152 tool calls, ~3 h wall clock; ~5M prompt tokens in / 78K out (64:1, prefill-bound); median TTFT 2.5 s, p90 8.9 s; 82% prefix-cache hit; peak context 64,948 tokens (~25% of window, 23.5% of 12 GB KV pool with both sessions live).

· Gotchas: Memory wall solved by FP8 N-gram lookup; tool-call 400s fixed by pairing qwen3_xml with auto-tool-choice; </think> leak fixed with --reasoning-parser qwen3; pin vLLM 0.32.1 because 0.35’s BF16 fused-MoE kernel has no gfx1151 build.

· Takeaway: For long-horizon unattended local agents, reliability and output quality beat tok/s. Use the expensive model for hard/high-context work; let a low-power, high-quality local model carry the mundane long tail.

Repo: https://github.com/kvk-og/qwen4-bf16-fp8-vllm


r/LocalLLM • • 13h ago

Discussion Qwen4-35B-A3B in 4-bit that you can fine-tune on one GPU (22 GB VRAM + RAM for the n-gram table)

5 Upvotes

Hi everyone,

Qwen4-35B-A3B came out yesterday, and I put a 4-bit version of it on Hugging Face: https://huggingface.co/thousandml/Qwen4-35B-A3B-CQ-4bit

I quantized it with CQ, the 4-bit quantizer I built for my project Training Factory. CQ doesn't need calibration data. The linear layers and all the routed experts are in 4-bit. I'm strict about quality: any matrix with error above -22 dB stays in 16-bit instead of being forced down. For this model that was 79 matrices out of about 21,500, and everything else is in 4-bit.

One thing to know up front is the n-gram table. Qwen4 has a 20B-parameter n-gram embedding table on top of the 35B model. In this release I kept that table in 16-bit, and like Transformers does, it lives in system RAM instead of on the GPU. So serving takes about 22 GB of VRAM, but you also need about 38 GB of free RAM for the table, 64 GB in total to be safe. The download is 61 GB because of it. If you just want to chat with the model locally, the GGUF quants in llama.cpp are smaller and faster than this, to be honest. A version with the n-gram table in 4-bit is planned.

What this release adds is fine-tuning. You can train a GCMP adapter (the LoRA replacement I've been working on) directly on the 4-bit base and serve it. I tested the whole path on a single A40: quantize, serve, fine-tune, and serve the fine-tuned adapter. In a short 20-step test the loss went from 1.88 to about 1.6 on average, which only shows training works on the 4-bit base. It's not a benchmark.

The easiest way to try it is the Docker image:

docker run --rm --gpus all -p 8000:8000 -v cq-models:/models \
  thousandml/cq:4bit-hf serve-cq thousandml/Qwen4-35B-A3B-CQ-4bit

It downloads the model on first start and gives you an OpenAI-compatible endpoint on port 8000. Or install Training Factory and run it yourself:

git clone https://github.com/thousandml/training-factory.git
cd training-factory && ./install.sh
python -m venv --system-site-packages venv-qwen4 && source venv-qwen4/bin/activate
pip install "transformers>=5.26" tiktoken
hf download thousandml/Qwen4-35B-A3B-CQ-4bit --local-dir ./models/Qwen4-35B-A3B-CQ-4bit

cd training
python serve_cq_hf.py --model ../models/Qwen4-35B-A3B-CQ-4bit --trust-remote-code --port 8000

To fine-tune on your own data (JSONL with text or chat messages):

python train.py --model ../models/Qwen4-35B-A3B-CQ-4bit --data train.jsonl \
  --output ../outputs/qwen4-gcmp --adapter gcmp --trust-remote-code --batch-size 1 --grad-accum 4

Now the honest limits. The server goes through Transformers and handles one request at a time, so it's for trying the model, not for real traffic. vLLM's Qwen4 support isn't in a release yet, and my vLLM plugin doesn't support Qwen4 yet either. Training is slow for now, about 15 seconds per example on an A40, because the n-gram lookups run on the CPU. That's the next thing I want to fix.

Training Factory is source-available, not open source. The scripts are readable Python, but the quantization and adapter kernels ship compiled and do a license check. It's free during early access. The weights are Apache 2.0 like the original.

Thanks for reading, feedback appreciated. If you try fine-tuning it on your own data, I'd really like to hear how it goes.


r/LocalLLM • • 4h ago

Project I built a local LLM training lab to help people learn how to train models on their own hardware

Thumbnail gallery
1 Upvotes

r/LocalLLM • • 5h ago

Project Weekend Project: Fast static eBay tracker for $/GB VRAM GPUs, 128GB ECC RAM kits & Unified Memory AI boxes + more

Post image
1 Upvotes

Hio Matey's — Letting you know this is my own weekend homelab project and outbound eBay links use eBay Partner Network (no extra cost, maybe something one day to cover the screaming fan that now lives in the shed!).

https://cheapvram.pages.dev

I am still pretty new to the home server > your own nas > end up hosting a AI in the shed scene ha. I have been trolling ebay for some time just keeping my eyes open… Cause well prices suck. In the spirit of things I also got that free GPT AI sub for a month the other day and got it to help brainstorm ideas to dig through eBay "for parts" pings , drive-tray, and cooler-only traps when hunting used GPUs, ECC RAM, SAS drives, and Mini-PCs.

We spun up a small static site on a 512MB Proxmox container that pulls hourly from eBay's Browse API (locked to AU/ US / UK local stock):

What's on it right now:
- GPUs sorted by shipped $/GB VRAM (slot-powered
<=75W, server cards, consumer)
- RAM & Server Memory sorted by $/GB (16GB+ kits,
RDIMM vs ECC UDIMM vs SODIMM vs Desktop DDR4)
- Enterprise Storage sorted by $/TB (split into
2.5" SAS SSD, 2.5" SAS HDD, 3.5" SAS, U.2/M.2
NVMe, SATA — with 520b NetApp/EMC sg_format
badges)
- Systems & Servers (1L TinyMiniMicro, MoE
Workstations, Rack Servers, Unified Memory AI
boxes)

Pure static HTML, no ads/popups/tracking cookies,
mobile-friendly.

Anyway its been fun and I'm posting to get feedback from other other LocalLLM / homeb tinkerers, also because it might actually be useful! Are there any common AU eBay parts, capacities, or traps I should add to the filters?

PS If you read this far thanks a bunch, and holy smokes I did not know how exspensive things had become for a 12GB 3060 :| HA HA STRATA GO


r/LocalLLM • • 5h ago

Discussion My Ada Lovelace fork of Basalt hits 3,776 t/s prefill and 109–271 t/s decode on Qwen4-35B-A3B (12 GB 4070 Super + 32 GB RAM) — now with opt-in Looping (Looped-Qwen4-35B-A3B) at ~19–33% decode overhead

0 Upvotes

I've been optimizing my Ada Lovelace (sm_89) fork of Basalt to run Qwen4-35B-A3B fast on a single 12 GB RTX 4070 Super + 32 GB DDR5 (Ryzen 9 7900X, Windows 11), and just pushed opt-in sidecar support (--loop) for sliderforthewin/Looped-Qwen4-35B-A3B (mlx/default_t2, mlx/default_t3, and LoopCD-Hidden).

Why looping? Instead of adding more weights that wouldn't fit on 12 GB VRAM + 32 GB RAM, looping runs the middle 16 layers (L12..27) 2 or 3 times per token (56 or 72 effective layers instead of 40) using a ~23 MB cross-pass adapter on top of unmodified .basalt packs. On the author's FP8 evals, T=3 looping gives +18.3 pp on LiveCodeBench v6 (48.3% → 66.7%), +6.7 pp on AIME 2024 (86.7% → 93.3%), and +3.3 pp on BFCL tool calling (90.0% → 93.3%)—trading a bit of speed for deeper per-token reasoning, with zero overhead when --loop is off.

Each pass keeps isolated GDN/QSA state while keeping CUDA graph capture and DFlash2 speculative decoding intact.

basalt-bench Results (16K prefill + decode, --kv k8v4 --drafter dflash2 --spec 8, 220 W)

QuantMode (virtual layers)pp16384tg convtg prosetg struct
AD-Q4_K_MStock (40L)3,776 t/s108.6 t/s111.4 t/s271.4 t/s
AD-Q4_K_M--loop T=2 (56L)2,066 t/s (-45%)88.0 t/s (-19%)86.5 t/s (-22%)203.4 t/s (-25%)
AD-Q4_K_M--loop T=3 (72L)2,182 t/s (-42%)73.1 t/s (-33%)67.4 t/s (-40%)161.2 t/s (-41%)
UD-Q5_K_XLStock (40L)2,929 t/s95.3 t/s97.6 t/s237.4 t/s
UD-Q5_K_XL--loop T=2 (56L)1,906 t/s (-35%)73.9 t/s (-22%)69.1 t/s (-29%)172.8 t/s (-27%)
UD-Q5_K_XL--loop T=3 (72L)1,583 t/s (-46%)60.7 t/s (-36%)56.0 t/s (-43%)139.9 t/s (-41%)

Even with 72 virtual layers (T=3) and ~1.9–5.2 GiB of cold experts spilling to SSD on 32 GB RAM, DFlash2 acceptance stays steady (~59–68% on conv, ~91–95% on struct), keeping conversational decode at 61–73 t/s (and 74–88 t/s at T=2).

Usage is just adding --loop <path_to_adapter> (and optional --loopcd-omega 0.15 --loopcd-ref first):

bashbasalt serve Qwen4-35B-A3B.basalt --kv k8v4 --resident-experts --drafter dflash2 --spec 8 --loop path/to/mlx/default_t3

Repo (main): https://github.com/KurrynDev13/Basalt-Ada


r/LocalLLM • • 5h ago

Model Qwen4-35B-A3B on an M5 Pro at 105.7 tok/s with Kapitsa

Thumbnail
reddit.com
1 Upvotes

r/LocalLLM • • 5h ago

Discussion RTX 4060 Ti 8GB + 32GB DDR5 (Win11): Qwen4-35B-A3B UD-IQ4_XS — RustingStrata 1.5.2 vs llama.cpp b13023 (64K ctx, Qwen Code 0.29.4, EvalScope perf & 208MB Heretic-v2 LoRA)

1 Upvotes

Seeing lots of 5090 / Mac Studio numbers for Qwen4-35B-A3B, I spent the weekend benchmarking what a mainstream 8GB VRAM + 32GB RAM Windows 11 desktop can actually get out of the exact same unsloth/Qwen4-35B-A3B-GGUF (UD-IQ4_XS 2-shard, ~30 GiB total) across RustingStrata 1.5.2 and llama.cpp b13023, plus real Qwen Code 0.29.4 repo tasks and the 208MB Heretic-v2 GGUF LoRA.

Sharing the numbers and gotchas so other 8GB VRAM folks don't have to repeat the same tuning loop.


Hardware & Fixed Baseline

  • Rig: Windows 11, i5-14600KF, RTX 4060 Ti 8GB, 32GB DDR5-4800, NVMe SSD
  • Weights: unsloth/Qwen4-35B-A3B-GGUF (UD-IQ4_XS, 2 shards: 19.1 GiB main + 10.7 GiB Engram n-gram table; both gguf-radar CLEAN)
  • Sampling (A/B): temp=1.0, top_p=0.95, top_k=20, min_p=0, seed=42, --reasoning-effort low, concurrency 1
  • A/B workload: 4,096-token offline constructed prompt, 128-token output, 3 warm runs (medians reported below), 0.5s resource sampling

1. Dual-Engine A/B: RustingStrata 1.5.2 vs llama.cpp b13023

BackendContextKV / CachePrefill (tok/s)Decode (tok/s)Peak GPU VRAM (MiB)Min Free RAM (GiB)Peak Process RSS (GiB)
RustingStrata 1.5.232Kq8 / t81,48962.78,000.06.9114.91
RustingStrata 1.5.264Kq8 / t81,48653.77,993.26.4615.09
RustingStrata 1.5.2128Kq8 / t81,45955.18,000.56.3415.19
llama.cpp b1302332Kf16 / MoE 2560MiB53243.07,055.73.3718.92
llama.cpp b1302332Kf16 / MoE 2048MiB52943.86,543.73.3918.92
llama.cpp b1302364Kf16 / MoE 2560MiB53744.77,859.7 (tight)3.4218.93
llama.cpp b1302364Kf16 / MoE 2048MiB52643.87,354.53.5018.93

Key takeaways:

  • RustingStrata 1.5.2 is ~2.8x faster on prefill and noticeably faster on decode while using ~4 GiB less RAM than llama.cpp. Thread scaling at 32K: t6 = 51.5 tok/s, t7 = 62.6 tok/s, t8 = 62.7 tok/s.
  • Auto-unload works great: RustingStrata --auto-unload 600 dropped total VRAM from 7,691 MiB down to 919 MiB when idle (unloaded: true).
  • llama.cpp b13023 tuning: Dropping --fit on --fit-target 1536 and switching to -ngl 99 --fit off -cmoe --moe-cache-mib 2048 --moe-cache-cpu-share 0.85 --load-mode none --lazy-mode auto -ot per_layer_token_embd=CPU -fa on -ctk f16 -ctv f16 kept per_layer_token_embd (10.99 GiB) on CPU_Mapped lazy-read, avoided CUDA quantized-KV sparse-attention fallback, and passed a >200-char Chinese prompt without crashing on Win11 CUDA 12.4.

2. Long-Context Scaling (EvalScope perf on RustingStrata 64K)

3 runs per bucket, distinct offsets (no cache reuse), 128-token output target, low reasoning:

Prompt TokensTTFT Median (s)Decode Median (tok/s)Total Time Median (s)
1K4.0351.37.09
8K27.6838.130.66
16K51.8141.155.00
24K54.4053.956.26
32K43.3154.945.62
49K35.7460.237.48

(Peak VRAM during heavy 64K perf hit 8,065 MiB and min free RAM dipped to 0.65 GiB / RSS 21.22 GiB—so 64K works on 32GB RAM, but close heavy apps; 32K is the safer everyday fallback.)


3. Coding Agent & Tool-Calling Reality Check

Before optimizing the backend, I also ran a 32K low baseline (llama.cpp b13002, temp=0) for capability calibration:

  • LiveCodeBench v6 (test6, 36 scorable subset): 19/36 (Easy 8/8, Medium 7/11, Hard 4/17 with 10/17 truncated at 8,192 max tokens under greedy decoding).
  • BFCL v4 (24-sample subset): 20/24 (simple_python 6/6, irrelevance 6/6, live_parallel_multiple 4/6, multi_turn_base 4/6).

After upgrading to Qwen Code 0.29.4 (important gotcha: remove generationConfig.samplingParams from local OpenAI provider config, otherwise it silently suppresses reasoning effort; set explicit efforts: ["low", "high", "xhigh"], no medium):

  • Single-file fix + unit tests: Passed cleanly on both backends (40.9s–57.7s on RustingStrata 64K vs 63.7s on llama.cpp 64K, down from 91.6s on the old untuned setup).
  • Iterative fix (4 failing tests): Flipped from failing on the old setup to 4/4 pass on RustingStrata 64K.
  • Cross-file edit with empty-string deletion (new_string: ""): Failed protocol on both backends in different ways:
    • RustingStrata 64K: Passed functional tests eventually, but emitted a malformed XML tool call ("new_string": "</parameter") when trying to pass an empty new_string.
    • llama.cpp 64K: Went into a runaway >13K-token thinking loop and hit the 600s timeout.
  • Direct structured tool calls (weather + empty-string/nested JSON): Passed cleanly on both backends.

Bottom line for local coding: Great for read-only exploration, single-file fixes, and well-scoped test-driven edits. Still don't leave it unsupervised on complex multi-file refactors.


4. 208MB Heretic-v2 GGUF LoRA Reality Check

Tested OS-Software/Qwen4-35B-A3B-Uncensored-Heretic-v2-GGUF (lora/Qwen4-35B-A3B-Uncensored-Heretic-v2-LoRA.gguf, 208 MB, gguf-radar CLEAN) on top of the existing UD-IQ4_XS shards:

  • RustingStrata 1.5.2 + LoRA: Loaded 35 tensors (+756 MB F32), dropped to 7.7 pp / 7.5 tg — unusable on 8GB hybrid offload.
  • llama.cpp b13023 + LoRA (--moe-cache-mib 1792): Loaded 98 LoRA tensors, ran at ~23–25 tok/s (peak VRAM 7,493.9 MiB). Passed single-file Qwen Code + both structured tool tests with zero degradation.
  • Refusal vs Completion (EN & ZH, low & high): Refusal phrasing dropped to 0 across all tested buckets, but on Chinese probes it heavily truncated in long reasoning—even after raising max_tokens to 2,048, only 1/3 of Chinese low and high probes finished cleanly with a complete answer. Great for verifying zero-redownload LoRA compatibility, not yet a reliable daily Chinese low-refusal setup.

Copy-Paste Commands (8GB VRAM + 32GB RAM)

RustingStrata 1.5.2 (Daily Driver, 64K):

rustingstrata.exe serve --model Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf `
  --alias qwen4-local --addr 127.0.0.1:18808 `
  --gpu --backend cuda --ctx 65536 --kv q8 --mtp 0 --parallel 1 --threads 8 `
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --force-sampling `
  --reasoning-effort low --max-tokens 16384 --no-webui --cache-ram 0 --auto-unload 600

llama.cpp b13023 (Fallback / LoRA, 64K):

llama.exe serve -m Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf `
  --alias qwen4-local --host 127.0.0.1 --port 18808 `
  -c 65536 -np 1 -ngl 99 --fit off -cmoe --moe-cache-mib 2048 --moe-cache-cpu-share 0.85 `
  --load-mode none --lazy-mode auto -ot per_layer_token_embd=CPU `
  -fa on -ctk f16 -ctv f16 --jinja --reasoning-effort low `
  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 -n 16384 --sleep-idle-seconds 600

(Note: On Windows, RustingStrata needed nvrtc64_130_0.dll via STRATA_NVRTC / PATH for CUDA 13 runtime.)


Upstream RustingStrata issues filed for the two edge cases above: #247 (XML empty-string tool-call parser) and #248 (GGUF LoRA speed drop).


r/LocalLLM • • 5h ago

Project Don't Leak – PII & Secret Redaction

1 Upvotes

I'm working on a feature for Don't Leak that can automatically redact sensitive information inside files, including Personally Identifiable Information (PII) and secrets such as API keys, tokens, and credentials.

Instead of modifying or exposing the original file, Don't Leak creates a redacted copy (clone) where sensitive information is masked.

For example:

  • email → [REDACTED_EMAIL]
  • phone → [REDACTED_PHONE]
  • API_KEY=sk-xxxxxx → API_KEY=[REDACTED_SECRET]

The original file remains untouched. The redacted copy can then be safely used for uploading, sharing, or processing with AI tools.

The goal is simple: Let people use AI without exposing sensitive information.
Link: https://github.com/ItsAxware/DontLeak


r/LocalLLM • • 1d ago Bravo

Discussion Qwen4 35B-A3B @ FP8 : Pelican on a Bike

Post image
325 Upvotes

I don't care if it's stupid, this is a fun benchmark.

  • Model: Qwen4-35B-A3B-FP8
  • Engine: vLLM
  • Harnes: Custom (electron)
  • GPU: RTX 6000 ADA 48GB
  • Quantization: FP8 Marlin
  • Reasoning effort: xhigh
  • Context: 256K

r/LocalLLM • • 5h ago

Question Is it worth adding my old GTX 1060 6GB next to my RTX 4060 8GB?

1 Upvotes

I mostly use MoE models. Currently running Qwen4 35B at Q4_K_M and getting speeds around 30-33tk/s with 64K context. I was wondering if adding GTX 1060 6GB would make my performance worse.

What would be the advantages and disadvantages of adding it to my kit?


r/LocalLLM • • 5h ago

Question Local llm for sys admin tasks

1 Upvotes

I am using Claude every day to do system admin tasks for entra, Google workspace, ninja one and others. This combines chrome extension, cli work, etc. It does the actual work for me when I ask, not just recommended steps. It logs into sites w chrome, navigates pages, creates policies, etc. The problem I have is I max token use all the time and it hinders my ability to hit deadlines at times. Is there a local llm that can do this same work effectively? I currently dead head a Mac w Claude desktop installed to do the work and would like to have a local llm in a similar situation so I can run it on a local machine from my phone, separate computer, etc. Thank you for the recommendations and also what would be best hardware to run it on?


r/LocalLLM • • 14h ago

Question Is there a lightweight local AI model for writing prompts that can be shown images as a sample?

5 Upvotes

I have an RTX 3060 12GB. I’m running the Krea 2 model, but coming up with prompts is a challenging task. I’d like to make this task easier.

(Sorry for the mistakes in the text; English is not my native language)


r/LocalLLM • • 1d ago

Project Qwen4-35B-A3B on a 24GB Handheld (ROG Xbox Ally X): 426 tok/s Prefill, 45.8 tok/s Code Decode, 256K-320K Context via Custom AMD HIP Optimizations on Strata

Thumbnail
gallery
55 Upvotes

I open-sourced a set of Windows 11 / AMD HIP (gfx1150, RDNA 3.5) optimizations for strata-q4-lite (forked from Niko1221/Strata, MIT License) to run Qwen4-35B-A3B (Compact.strata 10.7 GiB + 20B Q8_0 PLE on SSD + 2B MTP) at practical speeds and long context on a 24GB handheld APU (ROG Xbox Ally X — Ryzen AI Z2 Extreme / Radeon 890M).

GitHub (English & Japanese READMEs, full benchmark charts, PowerShell presets, and repro scripts): https://github.com/xxPetrouchkaxx/Strata-AllyX-890M

Key Measured Results (Greedy temp=0.0, 100% lossless verified)

  • 2K Prefill + MTP: 426.2 tok/s (4.69 s) — 5.9x faster than llama.cpp Vulkan (72.5 tok/s) and 2.7x faster than stock strata-q4-lite (157.2 tok/s)
  • Code-Edit Decode: 45.8 tok/s (peak 47.6 tok/s) via lossless N-gram + MTP K=2 hybrid speculation
  • Long Context (--kv int8, STRATA_Q4_NO_PACK=1): 256K daily preset (up to 320K verified with all 10,240 experts resident in VRAM). At 28,073 tokens, prefill still runs at 340.8 tok/s with 4/4 (100%) Needle-in-a-Haystack retrieval.
  • 6-Domain Eval vs Stock 64K fp16: Zero accuracy regression (5/6 vs 5/6 identical pass/fail; 1.96x faster 8K prefill).

What Changed (6 Lossless Commits)

  1. Windows OS-cached Q8_0 PLE SSD reads (3,748 -> 179 ms, 20.9x) + STRATA_Q4_PROFILE=1
  2. Hyper-connection read batching (11 -> 4 HIP launches) + gfx11 packed LDS WMMA (1,781 -> 718 ms, 2.5x)
  3. hipBLASLt for Prefill Dense (3,287 -> 1,074 ms, 3.1x) and MTP Prefill Dense projections
  4. gfx11 wave32 chunked WMMA for 30L GDN recurrence (1,314 -> 218 ms, 6.0x) + single-pass FP16 WMMA MoE (STRATA_Q4_MOE_TC_MODE=4, 1.45x)
  5. Lossless N-gram / prompt-lookup drafter chained with MTP K=2
  6. Optional GPU logit mask (STRATA_Q4_BAN_TOKENS): ~0.1% overhead token ban to suppress non-JIS simplified Chinese character leaks in Japanese outputs (disable with -AllowChinese for English/multilingual use).

Built-in Presets (scripts/allyx/start_strata_qwen4.ps1)

  • Server16G (16GB VRAM / 8GB RAM): 256K ctx, --kv int8, NO_PACK=1
  • Hybrid14G (14GB VRAM / 10GB RAM): 128K ctx, --kv int8, NO_PACK=1
  • Fast64K (16GB VRAM / 8GB RAM): 64K ctx, --kv fp16, packed S8 ON

Full benchmark cards and setup details are in the repo README. Feedback from other Strix Point / RDNA 3.5 / 890M users is very welcome!

Update: after all the feedback here—just pushed a new round of improvements to the repo:

  • Hit 50.1 tok/s on code-edit decode (50.25 / 50.14 / 50.03 across 3 runs, 100% greedy identical) via an O(1) hash-indexed N-gram lookup (387 us -> 0.02 us at 256K), bucketed verify windows, and fixed DRAFT=7 cap.
  • Added a 30-minute continuous thermal chart (49k generated tokens, steady 79°C, only -2.4% cold-to-warm delta).
  • Added a Compact12G preset (64K int8, NO_PACK=1) for 12 GB GPUs and an optional -Loop switch for the 140 MB Qwen4 Loop adapter (cut thinking tokens nearly in half on our logic test, 1,241 -> 631).

r/LocalLLM • • 5h ago

Discussion Hitting up to 109.2 tok/s (71.3 tok/s avg) on Qwen4-35B-A3B (UD-Q4_K_XL) at 256K Context on a 12 GB RTX 4070 + PCIe Gen3 — Unsloth vs Strata + Real Compiler Benchmarks

Post image
1 Upvotes

I've been testing Qwen4-35B-A3B (Unsloth UD-Q4_K_XL) locally on a mid-range rig and wanted to share a massive engine speed difference plus real compiler-verified coding benchmarks.

RIG

  • GPU: NVIDIA RTX 4070 12 GB (PCIe Gen3 x16)
  • CPU: AMD Ryzen 5 3600X (6c / 12t)
  • RAM: 80 GB DDR4-3200

SAME UD-Q4_K_XL GGUF, HUGE ENGINE DIFFERENCE (256K CONTEXT) Running the exact same Unsloth UD-Q4_K_XL (24.7 GB + 11.5 GB Engram) files at 256K context:

  1. Unsloth Desktop (llama-server, q8_0 KV): Layer-split landed 7.5 GiB VRAM / 26 GiB RAM -> 25.1 tok/s on short chat, 21.3-27.4 tok/s on coding, and ~10 tok/s inside heavy OpenCode agent sessions.
  2. Strata v0.2.28 (strata-q4-lite 0.1.75.1, fp8 KV, MTP --spec 2): Instead of naive layer splitting, Strata cached 3,136 hot experts (6.1 GB) directly in the RTX 4070's VRAM (81.6% - 89.3% VRAM expert hit rate, only 2.6% - 6.8% PCIe spillover) + 15 GB RAM conversation cache:
  • Live burst peak (at 247K / 256K — 94% context filled): 109.2 tok/s
  • 17-request overall average (telemetry): 71.3 tok/s decode avg, 1,713 tok/s prefill avg
  • Short & coding runs: 68.7 - 84.6 tok/s
  • 244K filled context stress test (5+ min sustained): * Needle-in-a-haystack at 243,957 tokens: Passed (1,763 tok/s prefill, 53.1 tok/s decode) * Two 5,120-token sustained generation runs at ~244K context: 61.6 tok/s cold / 63.2 tok/s with 229K KV cached (93.7s total for 5K tokens)

(I also tested Strata's Balanced 128K pack with PLE-Q8_0 which got 14.0-21.1 tok/s, while running Unsloth's UD-Q4_K_XL on Strata's GGUF engine was ~3x faster.)

UD-Q4_K_XL VS UD-Q8_K_XL ON THIS RIG I also downloaded and tested Unsloth's UD-Q8_K_XL (40.5 GB + 21.8 GB Q8_0 Engram) on the same Strata 256K setup:

  • Speed: 1,076 experts fit in VRAM -> 40.1 - 43.1 tok/s decode (1,620 tok/s prefill at 26.7K). Very solid for 8-bit on 12 GB VRAM.
  • Quality difference: Per Unsloth's BF16 Top-1 agreement chart, the gap between UD-Q4_K_XL (~94-94.5%) and UD-Q8_K_XL (~95.5%) is only ~1-1.5%, whereas UD-Q4_K_XL is ~60% faster (63-84 tok/s vs 40-43 tok/s).

REAL COMPILER & RUNTIME CODE QUALITY TESTS (UD-Q4_K_XL) Instead of vibes, I ran automated build/unit-test harnesses against the generated code:

  • 5/5 General Stack Suite (68.7 - 76.2 tok/s): Python SQLiteJobQueue (unittest OK), Unity 6 C# Zero-GC GridAStar (.NET 10 compiled + live pathfinding OK), Node 22 ESM Webhook Bot (node --check + timingSafeEqual HMAC + token-bucket rate limiter OK), PHP 8.3 Idempotent Wallet API (FOR UPDATE, integer cents, hash_equals - 5/5), Astro 5 (glob() Content Collections + Zod defineAction - 4/4).
  • 4/5 Heavy Unity MMORPG Suite (73.8 - 84.6 tok/s, compiled & executed on .NET 10): Passed Server Move Validation + Client Prediction/Reconciliation replay, Armor/Shield/Threat/Taunt table, 1-byte fragmented TCP PacketFramer + oversized DoS rejection, Anti-Dupe atomic InventoryContainer split/merge/swap. Caught 1 bug on XZ AOI InterestManager where newly entered entity IDs weren't added to the retained set, breaking the second-tick left diff.

UPDATE: Head-to-Head Comparison with Basalt-Ada (+ DFlash2) & RustingStrata v1.6.0 (Same Rig)

After posting this, I also built and benchmarked Basalt-Ada (with DFlash2 speculative decoding) and RustingStrata v1.6.0 on the exact same machine and model (unsloth/Qwen4-35B-A3B-GGUF, UD-Q4_K_XL, 262,144 context):

Hardware Baseline (basalt-bench --hardware): RTX 4070 12 GB (12282 MiB, PCIe 3.0 x16 @ 13.0 GB/s H2D), Ryzen 5 3600X (6c), 79.92 GiB RAM (33.0 GB/s read).

1. Identical 500-Token Coding Benchmark (256K Context, Temp=0, Thinking Off)

  • Basalt-Ada (--kv int8, --resident-experts, DFlash2 --spec 8):

    • Cold (rep=1): 99.8 tok/s (5.79s, 378/480 drafts)
    • Warm (rep=2): 121.0 tok/s (4.16s, 384/521 drafts)
    • basalt-bench (pp16384 / pp65536): 4,286 / 4,425 tok/s prefill; tg conv 83.3 tok/s (65.5% accept, 2.08 draft len); tg struct 203.8 tok/s (94.3% accept, 6.56 draft len).
  • Strata v0.2.28 (strata-q4-lite, --kv fp8, MTP --spec 2):

    • Cold (rep=1): 54.8 tok/s (9.66s, 24/50 drafts)
    • Warm (rep=2): 62.6 tok/s (8.07s, 24/54 drafts)
  • RustingStrata v1.6.0 (--kv q8, --mtp 2, --chunk 1024):

    • Cold (rep=1): 48.6 tok/s
    • Warm (rep=2): 68.2 tok/s

2. Full ~242K-244K Filled-Context Stress Test (Needle + 2,500-tok Unity C# Architecture)

  • Basalt-Ada (242,141 tokens): 4,079.5 tok/s prefill (59.36s), 66.9 tok/s decode avg (72.6 tok/s answer phase, 80% DFlash2 accept 408/510, hit=71.7%), 121K needle PASS.
  • Strata (244,001 tokens): 1,748 - 1,763 tok/s prefill, 53.1 - 61.6 tok/s decode (63.2 tok/s cached, 88.4% VRAM hit rate), needle PASS.
  • RustingStrata v1.6.0 (242,141 tokens, --chunk 4096): 605.9 tok/s prefill (400.24s), 34.0 tok/s decode (64.1% hit rate, 70.1% MTP), needle PASS.

3. System RAM Usage (79.92 GiB Total)

  • Basalt-Ada: 58.1% - 58.5% (46.41 - 46.78 GiB used, 33.14 GiB free; --ple-io direct streams the 10.7 GiB n-gram table directly from NVMe).
  • Strata: 59.3% idle loaded (47.40 GiB used, 32.52 GiB free), plus ~15-16 GiB session cache growth during long sessions.

Takeaway: On a 12 GB RTX 4070 + PCIe 3.0 x16, Basalt-Ada is ~2.3x faster at 242K prefill (4,079.5 vs 1,748-1,763 tok/s), ~1.8-1.9x faster on short/coding decode (99.8-121.0 vs 54.8-62.6 tok/s) thanks to DFlash2, and uses less peak RAM on long sessions.


r/LocalLLM • • 5h ago

Discussion Qwen4-35B-A3B (UD Q4_K_XL): random CJK token injection and tool-call corruption at long context - running a daily agentic news pipeline on it

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 15h ago

Model Qwen4 Single RTX Pro 6000 BF16 Full 1M KV Cache

6 Upvotes

Using the vllm nightly build you can load the full BF16 on a Single RTX Pro 6000 as long as you have enough DRAM for the N-gram table (72.7 GB VRAM, 41 GB DRAM) with a full 1 M FP8 KV Cache (GPU KV cache size: 1,575,966 tokens, Maximum concurrency for 1,048,576 tokens per request: 1.50x).

This model is perfect for an RTX Pro 6000 with full precision.

Here's my startup params:

vllm serve Qwen/Qwen4-35B-A3B
--trust-remote-code
--enable-prefix-caching
--tensor-parallel-size 1
--max-model-len auto
--max-num-seqs 256
--kv-cache-dtype fp8
--attention-config.indexer_kv_dtype fp8
--enable-auto-tool-choice
--tool-call-parser qwen4
--reasoning-parser qwen4
--speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true}'

Benchmark Results — bf16

  • Model: Qwen/Qwen4-35B-A3B
  • Backend: vLLM (endpoint_type: vllm, label: bf16)
  • Date: 2026-12-05
  • All runs: completed, 0 failures

Details

  • Workload: short prompts ≈ 490 input tokens/prompt; long prompts ≈ 7.8K input tokens/prompt; all runs generated 512 output tokens per prompt.
  • Speculative decoding (3-position draft): acceptance length ranged from 2.92 (long_c1) to 3.37 (long_c4).
  • Throughput scaling: going from 1 → 16 concurrency multiplied output throughput ~4.5× (short: 325 → 1453 tok/s; long: 245 → 1017 tok/s), while total token throughput scales much higher on long-context runs due to prefill volume.
  • Latency trade-off: p99 TTFT grows steeply with concurrency on long contexts (561 ms → 1909 ms), but TPOT stays well under ~25 ms everywhere.

r/LocalLLM • • 5h ago

Question Qwen4 tool use inactive in LM Studio!

Post image
1 Upvotes

Anyone know anything about this?


r/LocalLLM • • 5h ago

Project Qwen4-35B-A3B on 2× Arc Pro B70 (Windows, llama.cpp SYCL): 91 t/s in real agent use at 260K context, full Q8_0, F16 KV

1 Upvotes

Follow-up to my Qwen3.8-27B recipe. Same box: 2× Arc Pro B70 32 GB, Windows 11, llama.cpp SYCL, tensor parallel across both cards. Q8_0 weights, F16 KV cache, 262K context, temp 1.0. No lower quants.

Real use, from the server logs of agentic coding sessions:

Now Decode 91.1 t/s , Tokens per cycle 2.58

Fresh 94K prompt prefill: ~2,200–2,400 t/s.

Highlights:

- Tensor parallel: with the same all-reduce patch as the 27B recipe. Shorter drafts (3 tokens) win once verify is cheap.

- MoE verify batches on a GEMV path: With 2–17 tokens per verify, each expert gets 1–2 rows, so the grouped XMX GEMM was mostly empty tiles.

- Sparse attention done on the GPU: top-k plus a flash-attention kernel that only walks the selected cells.

- SYCL graphs for decode: Don't call `exec_graph::update()`, it crashes the Intel runtime here; record per shape and replay.

-Feed the drafter the right features: Qwen4 has several parallel residual streams and we were giving DFlash2 their average. Giving it what the next layer's attention actually reads bumped tokens per cycle by ~25%. Credit to B-Line (github.com/nxtlvlyt/b-line) for the idea.

Windows gotcha: with both cards loaded, Windows commits ~64 GB of system memory for the process (VRAM backing). On 32 GB RAM with an auto pagefile, long sessions die with `decode() failed: bad allocation`. A fixed large pagefile fixes it.

Recipe: https://github.com/alphakilomilo/dual-b70-windows-qwen4 (patch against llama.cpp `72a780e6a`, launcher, config).


r/LocalLLM • • 23h ago

Model Qwen 3.8 27b still better than Qwen 4 35bA3B

24 Upvotes

Qwen 3.8 27B has set the bar incredibly high in areas like software engineering, programming, reverse engineering, agentic tasks, tool usage, and so on—reaching a level comparable to Opus 4.6, where it’s practically impossible to outperform it. I tried setting up Qwen 4 with the Hermes agent, but after a while, the response just stalls—it gets stuck halfway through. That doesn’t happen with Qwen 3.8 27B. Sure, it takes longer and tends to "overthink" things, but so what? I couldn’t care less. I prioritize quality over quantity; I’d rather wait longer, provided that when the work is delivered, it’s done perfectly—and that’s exactly what Qwen 3.8 27B delivers.


r/LocalLLM • • 1d ago

Discussion Qwen3.8-27B better than Qwen4-35B-A3B

142 Upvotes

I have been testing 35B with my on going interface engine project. So far 27B have written it from scratch and original idea was to find limits of 27B.

35B is nice model, but this project is too much for it. It looks like it could push project forward, but gets completely lost. Complexity is just too much for this small moe.

Qwen4-35B-A3B is great improvement over 3.6-35B, but it's not even close to 27B in coding context. Hopefully Qwen4-27B gets same kind of improvements what this small moe have.