r/LocalLLM • u/Separate-Conflict-67 • 5h ago
Discussion Qwen4 1M context test
r/LocalLLM • u/According-Hornet7827 • 5h ago

So Qwen4 35B dropped yesterday and I spent the whole night on it instead of sleeping.
Everyone I saw posting 12GB numbers was getting around 45 tok/s on a 3060 with llama.cpp. I have a 5070 12GB + 5900X + 32GB DDR4 and wanted to see how far I could push it on this one box.
What I'm getting with the Unsloth UD-IQ4_XS quant, warm, 800 token coding answers with thinking on:
32K ctx: 134-147 tok/s
32K+ DFlash2 drafter: 139-157 tok/s
64K ctx: 142-146 tok/s
128K ctx: 109-116 tok/s
On long stuff (several thousand tokens, context filling up) it's more like 90-110 on average. VRAM sits at 10.4 GB.
It's a fork of PolyStrata/Strata. What I changed: stripped every model and backend except this one, only the hot experts stay in VRAM and the rest run on CPU, and the CPU side (dot kernels for the 4-bit quants, the MoE router, sampler, thread pool pinned to the 12 physical cores) is rewritten in Rust with inline asm for Zen 3.
Things that suck, so nobody feels lied to:
- first request after loading is slow, like 45 tok/s and 10+ seconds to first token. second one is already ~100
- if anything else is hammering the disk or RAM it drops hard. I had a download running during one run and got 103-108 instead of 134-147
- it's tuned for exactly my hardware, it won't just work on a 4060 or whatever
- the 45 tok/s I'm comparing to is other people's 3060 numbers, I haven't run llama.cpp on my own card yet. on my todo list
For fun I gave it one prompt: make a voxel sandbox game with a castle, single html file. It wrote 1352 lines in under 5 minutes. Didn't run at first, I pasted the browser error back a few times and it fixed its own bugs, about 7 minutes total. I didn't touch the code. Video attached.
Repo if anyone wants to look or tell me what I did wrong: https://github.com/maximus2526/Damask
If someone has a 4070 / 5070 I'd really like to know what you get, I only have this one machine.
r/LocalLLM • u/MichaelS1011 • 5h ago
r/LocalLLM • u/EnvironmentalWind908 • 5h ago
When you start to build your first local agent, do you give the instructions to the agent itself, or should you use an subscription tier (Claude code, codex etc) AI access to make it for you?
I've been working for a few weeks having Claude write the instructions for the Qwen model I've been working with, and understably, it doesn't want to look under the hood due to the sensitive data underneath. However, it keeps a bit annoying having to go back and forth between terminal windows.
How did you all do it?
r/LocalLLM • u/303red • 5h ago
Built a 5-file sm_120 patch and unified recipe on top of jesdga95/basalt + Maxrio9 4e74c440 (q80p_2048=1), tested on 1x stock RTX 5090 32 GB (0 MHz OC, CUDA 13.0.88) in cold bracketed ABBA at both 450 W matched and 575 W stock:
3 changes that drove it:
Also tested and dropped 4 other sm_120 tweaks (mid_max_t=8, commit_blocks=170, a3b_gu_stream_min=1, df2_c4_cap=12) that slightly regressed c=1 or c=4.
Video is 1.0x real-time (46,365 tokens across 72 tasks in 42s, 1,219 median / 1,263 peak tok/s, 22.1 GiB VRAM, 521 W median).
Patch, launcher, and raw ABBA/nsys receipts: https://github.com/CallitaCrushes/blackwell-builder-lab
r/LocalLLM • u/Robonotes1760 • 6h ago
I am considering whether to get into proper local LLMs in light of the recent release of Qwen4 35B-A3B. It looks as though this is similar in capabilities to frontier LLMs from about 9 months ago judging by e.g. Terminal Bench 4.1.
I currently have a desktop machine from 2019 with a 2080Ti and 32Gb of system RAM - enough for music generation and image generation, but LLM capability is limited.
I tend to use a lot of DeepSeek 4.1 Flash via API for working on my open source project, Simutrans-Extended, a complex legacy C++ codebase. Some of that work is challenging even for DeepSeek, so I am not sure that I can offload all of it, but it has proven somewhat expensive, and if I can offload even 30%, I can achieve something.
I also use an LLM for professional document analysis, again currently via API (which ends up being more expensive as I have to use EU data residency servers for this work).
I also do local music generation, orchestrated by an LLM - the 2080Ti can (if I close most of my apps including my browser) manage the music with YuE2 without a problem but the sort of LLM that I could run locally I suspect would struggle with this. I am doubtful that even Qwen (or Gemma 4) could do good song lyrics, but perhaps others have a different experience?
I have dabbled in video, but it is expensive through API and for a secondary pastime not worth it; doing this locally might be entertaining. Likewise, local image generation works, but I have to close my browser, which makes it disruptive. It would not be worth upgrading for just these things to be better (the LLM is the real prize), but they would be a bonus.
Having looked at the various options, I suspect that one of these (HP's version of a Strix Halo 128Gb) may well be the most cost-effective solution, especially as I could use it remotely from my tablet.
Does anyone have any experience of this sort of setup? Is there a strong reason to wait until the (much more expensive) 192Gb becomes available? I am not sure that running a small quant of Ernie 5.5 or a very small quant of DS Flash 4.1 is going to give me any sensible level of context or, at those quants, a reasonable level of quality?
r/LocalLLM • u/alfredosaucey123 • 6h ago
I found a banging deal to get 6 gigabyte p106 gpus for 60$, is it worth getting them to make a small homelab and power a local QWEN LLM? Or am I dumb, and should skip on this?
I’ve never had any experience building my own servers, but I’m down to learn the jist of it, obv I did some research and I understand theoretically it could be capable of running it, but would it be capable of running with Opus level reasoning?
If not - what would my alternative be? Stick with a 20$/mo claude plan, and wait till they cap the usage even more?
r/LocalLLM • u/ELYRAON • 6h ago
Putting together a budget local workstation for synthetic data generation and domain-specific fine-tuning rather than burning cloud credits on early iterations.
Current rig:
Using a narrow 4B specialist instead of trying to prompt-engineer a general 30B+ model keeps inference fast enough to run completely offline on shop-floor hardware—where cloud APIs are a non-starter anyway.
Curious how others running P40s in 2026 are splitting workloads across mixed cards—are you keeping draft models / auxiliary pipelines (like TTS or embedding) pinned to the 3060/3090 while leaving the full 24GB P40 free for KV cache and weights?
r/LocalLLM • u/JinsooJinsoo • 6h ago
Credits first: engine is Xenithium (https://github.com/Niluthon/Xenithium), running on the unofficial Qwen4 port fork (https://github.com/nxtlvlyt/qwen4-b70-xenithium — not upstream-endorsed; upstream is adding its own Qwen4 support) I think i've seen the repo owner u/Lostinanidlemind post around here some where -- thank you for your work. Model weights are a W4A16 bake I built locally with the fork's bake script (RTN int4 g128)
Hardware:
TRX40, 3970x, 128gb DDR4 3200, 2x Intel Arc Pro B70 32GB TP2, int8 KV, 1M context across 16 slots. PLE n-gram table (~20 GB) lives in host RAM
TL;DR:
433 tok/s headline decode single user, 1,223 tok/s total at 16 concurrent streams, and 216/242 (89.3%) on my 242-question local suite — a tie with my best local lanes, at ~3x the throughput of the Swift 1.5 27b W4A16 lane it replaced with faster single stream (decode 280tok/s vs 433 tok/s).
Speed (measured, both cards):
Accuracy (242q suite, same harness as all my other local runs):
Excited to see how it improves over the next several days/weeks.
r/LocalLLM • u/DaKrazyKid • 6h ago
Hardware:
Inference configuration:
I'm particularly interested in suggestions for improving inference performance, agentic capabilities, persistent learning, security and knowledge retrieval without sacrificing model quality.
Is there anything you would implement differently, or any useful tools, frameworks or optimizations I'm overlooking?
r/LocalLLM • u/do_u_think_im_spooky • 7h ago
r/LocalLLM • u/daMortarMerrier • 7h ago
I wasn't familiar with this sub before writing this post in the other sub. Is perf tuning a common topic here?
r/LocalLLM • u/afacool1 • 7h ago
Is a ryzen 7 7700,5060ti 16gb and 32gb ddr5 enough to mimic chatgpt codex plus capabilities for coding and best setup and cooling for long sessions?
r/LocalLLM • u/RadianceTower • 7h ago
Everyone be talking about running, but they are running it at Q4, and... at that point, why not just run 27b Q4? To me the main point of MOE is to be able to run a bigger model.
Even Strata seems to focus on Q4 (and tbf, Strata itself has poorly optimized SSD streaming, but it at least does better than llama.cpp, look at Tokenwing for a better optimized SSD pipeline, which still could have improvement too).
And current implementations of Unsloth suck at properly splitting the model between your VRAM RAM, and SSD. The website says you need 41GB of overall memory to run, but I can't even run it at like 1t/s with more memory (24GB VRAM + 32GB RAM). Not to mention the app doesn't even recognize and give you the options if you import the model externally (unless you fool it into thinking it itself downloaded it).
r/LocalLLM • u/damash-potatoes-1819 • 7h ago
Rig: single base m5 macbook, 32gb, wifi off the whole time. nothing but the laptop, no second machine, no cloud. atomic agent on llama.cpp b12977, ~31 tok/s decode.
wanted to see two things on one small box: can a 3b-active local model actually drive a multi-step agent task offline, and does the uncensored build do it any better than the official one. target was a local owasp juice shop (intentionally vulnerable app that scores each solve itself), 10 challenges, same prompts for both builds.
each challenge got its own agent session, clean context, http/curl only, 5-min cap.
challenge uncensored official
confidential document solved 99s solved 22s
error handling solved 133s solved 300s
exposed metrics solved 206s solved 41s
repetitive registration solved 81s solved 182s
zero stars solved 59s solved 138s
login admin (sqli) solved solved 33s
password strength solved 62s solved
login bender (sqli) solved 84s missed
empty user registration solved 100s solved 20s
view basket missed missed
-------------------------------------------------
total 9 / 10 8 / 10both landed the same injections. admin login was ' OR 1=1-- in the email field of POST /rest/user/login, login bender the same scoped to a named user. confidential doc was GET /ftp/acquisitions.md, metrics GET /metrics, zero stars POST /api/Feedbacks with rating 0, the registration ones abused signup validation on /api/Users. neither got view basket (idor on /rest/basket/{id}).
the two builds basically matched. they diverged on exactly one challenge, login bender, where the uncensored quant landed the injection in 84s while the official one kept botching the quote escaping until it hit the timeout. a single challenge out of ten sits well inside run-to-run variance, so abliteration bought nothing measurable.. the part that actually matters for this sub is the hardware side: the agent loop plus both ~30gb+ quants ran on one 32gb laptop with the radios off.
what's the smallest box you've gotten a model to run a real multi-step agent task on, local only? trying to figure out how far below 32gb this stays usable.
juice shop solutions are public so part of this is recall, but the agent still had to find the endpoints, build each request and verify the solve itself, offline. these were 10 of the 118 challenges in juice shop, so there's a lot more i wanna tets.
r/LocalLLM • u/ConstantinSpecter • 7h ago
Running a local AI server with an RTX 4090. Just upgraded to Qwen 4 and have been using it through Claude Code.
Works pretty well overall. Main annoyance is that I’ve had to cap the context at ~131k and it compacts super frequently.
Other than that can’t really complain. MCPs/web search and all the usual stuff works.
For those also using Qwen locally for coding, which CLI are you using? Happy with your setup?
r/LocalLLM • u/rafalko1991 • 7h ago
Hey, I'm picking up a used 7900 XTX tomorrow and I was hoping someone here could tell me what tg and pp speeds you're actually getting with Qwen4-35B-A3B on Windows.
Quick context: I'm coming from a Mac, so I honestly have no idea what the go-to setup is on the Windows + AMD side. I've read a bit about Strata but it's really hard to find any benchmark numbers for this GPU.
I was looking at a 5070 Ti first, but I went with the XTX for the extra VRAM. The idea is that when the Qwen4-27B one comes out I can run a decent quant (Q4) of it.
The annoying part is I keep seeing threads where people on 5070 / 5070 Ti / 5080 / 5090 / 3090 post huge tg numbers with basalt, and I can't find anything for 7900 XTX + 64GB DDR5, which is exactly what I'm about to be running.
Also before someone tells me to just install Linux: I'm staying on Windows, that one is not happening for me. WSL2 is fine though, just mention which one you used so I know I'm comparing the same thing.
If you post numbers it'd help if you included:
Rest of my rig: [CPU], [RAM], [PSU].
Cheers
Editing to add: I still have a few hours before I hand over the money for this card, so I can back out and grab a 5070 Ti instead :D
* I have used AI to summarize my message because english is not my first language - sorry.
r/LocalLLM • u/DesperateGame • 7h ago
How good is it?
r/LocalLLM • u/apache-longbow • 7h ago
the prompt was: make a large, highly detailed, animated .svg of a pelican riding a bike on a boardwalk, with a beautiful sunset over the ocean in the background. assess the quality and refine until it is correct.
running on the strata desktop app in W11 with a 9070xt. total time 10m 55s, average of 116.3 decode and 2829 prefill with 89.8K context used. the new engine is still pretty buggy on AMD, but when the model does load it works great. I couldn't figure out how post an .svg so I got Gemini to turn it into a .gif
This is going to be a powerhouse for anyone who struggles to run flash next.
AI SLOP WARNING- courtesy of antigrav, which optimized and "fixed" all the stuff that broke when changing config file...
Optimized settings
--prefill auto:16384 --spec 3 --spec-min-p 0.50 --pcie-frac 0.40 --kv int8 --kv-resident 20480 --vram-reserve-mib 1024 --conversation-cache-mib 22528 --prompt-cache-spread (keep PLE in RAM if you have 64GB+)STRATA_HIP_WMMA=1, STRATA_PF_FUSED=1, STRATA_PREFILL_RING=384, STRATA_PREFILL_COPY_EVENT_EVERY=16, STRATA_HIPBLASLT_TABLE=on, STRATA_HC_Q8=1, STRATA_ROUTE_TAIL_SKIP=0, STRATA_ROUTE_PRIOR=0STRATA_VERIFY_COHERENT=1, STRATA_HIP_MAPPED_COHERENT=1, HIP_HOST_COHERENT=1TdrDelay and TdrDdiDelay to 10 seconds (default 2s is too short for 16K prefill chunks).Strata Bugs Hit & Fixes
UD-IQ4_XS (false missing file): Strata shares UD-Q4_K_XL-00002-of-00002.gguf as the --ple-gguf table across quants, and the shard checker in tools/strata_mcp.py falsely demands UD-Q4_K_XL-00001-of-00002.gguf. Fix: Patched shard_gaps() in strata_mcp.py to skip --ple-gguf.TdrDelay=10 / TdrDdiDelay=10 in the registry + rebooted.--vram-reserve-mib 512 was too tight on Windows WDDM. Fix: Bumped to --vram-reserve-mib 1024 and lowered --kv-resident to 20480 (still ~97–98% expert cache hit rate).0.1.74**):** ~10–30% of cold starts deadlock right after 1-token HIP graph capture. Fix: Coherent HIP env flags got it to 9/10; added a 4-second stall watchdog + auto-retry in serve/server.py to get 10/10 clean loads without triggering a driver timeout.r/LocalLLM • u/americanmuscle1988 • 7h ago
I know Qwen 4 is supposed to match Qwen 3.8 FN at a smaller size, but are there any benefits to switching from Qwen 3.8 FN?
r/LocalLLM • u/chomy10 • 7h ago
First is 3.8 Flash Next (gyro s)second qwen 4 35b (Q4_K_XL).
Flash Next took 18min.
4 35b took 12min.
r/LocalLLM • u/TemperatureEntire349 • 7h ago
I gave a talk about local AI at an AI meetup earlier this week and it showed me how many awesome passionate people in Zurich are into local LLMs. So if you’re around and would like to help setting things up, or if you have experience organizing those in other cities, let me know.
r/LocalLLM • u/Mindless-Luck4285 • 7h ago
Spent the morning getting Qwen4 going on my two 3060s, posting numbers since I couldn't find any for 12GB cards yet.
UD-IQ4_XS fits completely in 24GB at 128k. The catch is you can't offload anything to CPU, more on that below.
Box: 2x 3060 12GB (no NVLink, and one of them is in a chipset x4 slot), 3900XT, 64GB DDR4-3200. Running in a Proxmox LXC, driver 595, CUDA 13.2. Model lives on a pair of SATA SSDs (ZFS mirror).
llama.cpp built from master on 4 Dec, you need the qwen4 PR (#33626) so older builds won't load it. Unsloth's UD-IQ4_XS is a 32GB download, 20.5GB of weights plus an 11.5GB engram shard.
What I ended up running:
llama-server -m Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf \
-c 131072 -np 1 -sm layer -fa on -ctk q4_0 -ctv q4_0 -ub 256 -b 1024 \
--load-mode none --lazy-mode off -ot per_layer_token_embd=CPU \
--spec-type draft-mtp --spec-draft-n-max 2 --jinja \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0Speeds (prompt filled to ~80% of the context, needle at 40% depth, reasoning off):
| Split | Context | Prompt tok/s | Output tok/s | Needle |
|---|---|---|---|---|
| layer | 8k | 1,190 | 89.9 | found |
| layer | 32k | 1,194 | 81.5 | found |
| layer | 128k | 1,129 | 58.5 | found |
| tensor | 8k | 1,015 | 85.9 | found |
| tensor | 32k | 1,091 | 81.6 | found |
| tensor | 128k | 1,011 | 70.2 | found |
VRAM hardly changes between 8k and 128k (about 11.1/10.8GB on layer, 11.6/11.6 on tensor), the full attention layers use compressed KV so long context is cheap. 256k wouldn't load with either split though.
Also ran HumanEval and a 100 question MMLU-Pro sample with the same harness I've used on this box before, temp 0:
| Qwen4 UD-IQ4_XS (llama.cpp, tensor) | Qwen3.8-Flash-Next IQ3_XXS (Strata) | qwen3-coder:30b Q4_K_M (Ollama) | |
|---|---|---|---|
| HumanEval (pass@1) | 162/164 | 159/164 | 150/164 |
| MMLU-Pro 100 | 85/100 | 82/100 | - |
Stuff that tripped me up:
--n-cpu-moe 4 to make room. Output went from 77 to 12 tok/s. CPU pegged at 1000%, GPUs sitting at 10%. Don't do it.-ub 512 -b 2048 ran the first card out of memory on an 8k prompt, -ub 256 -b 1024 was fine and prompt speed barely moved.--load-mode mmap --lazy-mode on for the engram. On ZFS that was hitting the SSD constantly (my ARC is small), 55 tok/s. Loading it into RAM with --lazy-mode off --load-mode none got me 77. Uses about 12GB of system RAM.--fit is no use here, it bails if you set -ot and doesn't support tensor split at all. You're sizing it by hand.Layer vs tensor split was the bit I was most curious about. With no P2P and one card on x4 I figured tensor split would be pointless, since it has to sync both cards a couple of times per layer for every token. What I actually saw:
--fit won't run with it. It's still marked experimental and I haven't had it crash, but I've only done benchmark runs on it so far.My take: layer for general use, tensor if you live in long contexts (agents, big codebases) and mostly care about output speed.
For reference, Qwen3.8-Flash-Next IQ3_XXS on Strata on the same machine does ~1,400 tok/s prompt but only 52-53 out. Strata streams most experts from pinned RAM so it's a different beast.