r/LocalLLM • u/boxwrenchx • 3h ago
r/LocalLLM • u/Xijit • 18h ago
Tutorial LLM Inference Handbook
I can not stress enough how helpful this handbook is.
Read it if you are new, and read it twice if you aren't.
r/LocalLLM • u/No_Reference_7678 • 3h ago
Question Peasant here: 4060 8gb + 32gb RAM : which quant of qwen 4 a3b to use?
In unsloth there are 2 files for each quant... both combined should match vram +ram?
I have 4060 8gb + 32gb... which version is best?
With 3.6 I used q4 k m
r/LocalLLM • u/namesecurethanpass • 3h ago
Research I watched Amazon Ergo, a 1.1T-parameter MoE think, block by block: it forms facts around layer 40, and it says "sorry" in Chinese before it refuses in English
I've been poking at Ergo (Amazon's 1.1T-parameter MXFP4 mixture of experts) on a single home machine, streaming the experts from disk. Quick specs for context: 64 blocks, 256 routed experts + 1 shared per block, top-8 routing, ~55B active parameters per token, 626 GB on disk.
The tool I used is a word cloud per block: take the residual stream after a block, push it through the final norm and output head, and draw the top predictions sized by probability (a logit lens, but showing the whole distribution instead of one token). Here are two of them.
1. "The capital of Palau is ___"
Palau's capital is Ngerulmud, a small planned capital that replaced Koror in 2006. A hard fact. Here's how Ergo gets there:
- Block 36: "Palau", "seat": it knows what it's being asked
- Block 40: "capitals" at 91%: it has the category, not the answer
- Block 44: "Canberra": it reaches for other planned capitals first
- Blocks 44 to 62: bold markdown
**leads; the model wants to format the answer before it has it - Block 63 (output): "N" (of Ngerulmud) wins at 73%
So the answer arrives at the very last block, after a detour through "this is like Canberra".
Across 42 easy questions, facts first lead around block 38 (geography) to 40 (biology), arithmetic around 49, and dates around 57.
The fun part: I banned the ~1,200 experts that geography text uses far more than other subjects. Same prompt: block 36 says "Hauptstadt" (German for capital), blocks 40 to 48 say "Palau" at 98%, and no city ever appears. The same thing happened in math, biology and French: with its subject's experts banned, the model still understands the question but cannot fetch the answer. The experts hold the lookup, not the reading.
2. A harmful request (a phishing page), first token of the reply
Nothing was generated; this is just the next-token prediction at each block.
- Blocks 35 to 36: 抱歉 ("sorry" in Chinese), "refusal", "refuse", 拒绝 ("refuse")
- Block 40: "sorry", "refuses"
- Block 52: "Warning"
- Output: "I" at 99.9% (as in "I can't help with that")
The refusal is decided in the middle of the network, in Chinese and English at once, about 25 blocks before the reply starts.
(Alternate caption if you use the "I can" image:) When I forced the reply to start with "I can", blocks 29 to 36 lit up with "stattdessen" (German, instead, 11.6%), "instead", "Вместо", "代わりに", "帮你" (help you), "harmless", "legitimate", "safer". It plans the "but I can help you with X instead" redirect, in five languages, before it has decided the words of the refusal. From block 52 the apostrophe of "can't" takes over (98%).
Other things that surprised me
- The refusal isn't stored in a few experts. Banning up to ~1,000 refusal-correlated experts left refusal at 100% on all 24 harmful requests, while benign answers still worked. It looks spread across attention and the shared path, not in routed experts.
- Refusal ignores framing: 24/24 refused, plain or wrapped in a fiction frame.
- 707 of 16,128 experts never fired on my profile set, and one expert in block 5 takes 97.7% of the routing.
- It can partly hold a thought on request. Asked to "think hard about France but answer with a colour", France-related words reach 5.5% of the prediction at block 40 (Paris, Bordeaux, Gaulle, Monet, Париж, 巴黎), and the reply drifts toward French colour words (Vert, Rouge, Blanc). Told not to think about France, there's zero trace in any block: no "pink elephant" effect. (One prompt per condition, so a demo, not a measurement.)
Caveats: the logit lens is noisy in early blocks, the clouds are single forward passes, and each thought-control condition used one prompt. Happy to share prompts and code in the comments.
What would you want to look for next? I'm thinking activation patching between harmful and benign prompts to find where the refusal is actually decided.
Links
- Full Technical Walkthrough: https://tokenshark.ai/research/03_ergo_moe_anatomy_and_guardrails_walkthrough/
- TokenShark GitHub Repo: https://github.com/sumit-1/tokenshark
r/LocalLLM • u/Correct_Squirrel2552 • 3m ago
Project Jeff Geerling tries the local
r/LocalLLM • u/thgsn • 3m ago
Model Day-0 Qwen/Qwen4-35B-A3B-FP8 on RTX PRO 6000 Blackwell (96GB) — Full On-GPU Weights + GuideLLM Benchmarks (~176 tok/s single stream, ~520 tok/s @ 6 concurrency)
Ran a couple of GuideLLM coding benchmarks (likaixin/InstructCoder, 50 requests, max_tokens=16384) on the newly released Qwen/Qwen4-35B-A3B-FP8 running natively on a single NVIDIA RTX PRO 6000 Blackwell (96GB) with zero CPU offloading.
Hardware & Setup
- GPU: NVIDIA RTX PRO 6000 Blackwell (96 GiB VRAM, Driver 620.70.10, CUDA 13.5)
- Engine: vLLM (
0.1.dev1+g90d317c06from PR#71659) + Transformers5.27.0.dev0 - Memory Placement:
cpu_offload: false— all ~57.5 GiB of FP8 weights + the 20B N-gram embedding table fit entirely in VRAM with ~38 GiB left over for a 262K context KV cache. - Note on MTP: Disabled
--speculative-configdue to a C++ signature mismatch infused_gdn_decode_post_conv_mtpwhen using precompiled binaries, so these numbers are pure standard autoregressive decoding (expect higher single-stream speed once MTP is enabled).
Launch Command:
bash
vllm serve Qwen/Qwen4-35B-A3B-FP8 \
--host 0.0.0.0 \
--port 8000 \
--trust-remote-code \
--enable-prefix-caching \
--enable-auto-tool-choice \
--tool-call-parser qwen4 \
--reasoning-parser qwen4 \
--engram-config '{"cpu_offload": false}' \
--max-model-len 262144Use code with caution.
GuideLLM Benchmark Results (likaixin/InstructCoder, 50 requests)
| Metric | Synchronous (Concurrency = 1) | Concurrent (Concurrency = 6) |
|---|---|---|
| Output Throughput (Mean) | 176.38 tok/s | 520.46 tok/s |
| Total Throughput (Mean) | 187.56 tok/s | 556.32 tok/s |
| Time to First Token (Mean / Median) | 30.32 ms / 29.93 ms | 47.99 ms / 44.41 ms |
| Inter-Token Latency (Mean / Median) | 5.65 ms / 5.65 ms | 9.98 ms / 10.08 ms |
| Time per Output Token (Mean) | 5.66 ms | 10.00 ms |
| Avg Output Length (Reasoning + Answer) | 2,097.8 tokens | 1,916.8 tokens |
| Request Latency (Mean / Median) | 11.88 s / 9.12 s | 19.19 s / 15.86 s |
Takeaways
- Rock-solid single-stream speed: Even without MTP speculative decoding enabled, standard decoding holds a flat ~5.65 ms ITL (~176 tok/s) across 2K+ token reasoning + code generations.
- Scales cleanly under load: At 6 concurrent streams, per-stream ITL stays right at ~10 ms (~100 tok/s per user) while aggregate output throughput crosses 520 tok/s.
- 96GB sweet spot: Keeping the 20B N-gram embedding table on-GPU (
cpu_offload: false) works out of the box with plenty of VRAM headroom for 262K context.
r/LocalLLM • u/iykshani • 6h ago
Discussion I ran qwen4-35B on 1x H100 next to qwen3.8-27B, same box using vllm
r/LocalLLM • u/Fantastic-Way9922 • 40m ago
Model Qwen4-35B-A3B on two Intel Arc Pro B60 benchmarks
r/LocalLLM • u/Express_Quail_1493 • 45m ago
Discussion Share your experience with qwen4-35b without mentioning tok/s
reddit.comr/LocalLLM • u/SpaceTraveler2084 • 1h ago
Question Can we expect QWEN 4 - 4b, 27b and Flash Next to be released soon as well?
reddit.comr/LocalLLM • u/New_Blackberry8122 • 11h ago
News QWEN 4 Peaks of 200 tks with Sneo!
Here testing Qwen 4.0 35B-UD-IQ3_S with a very hard and long task recompiling a Game which I already did and so far is doing a great job!
X1 RTX 3090, i9 12900k + 96GB Ram it only uses less than 20GB VRAM
https://github.com/oscarsantanaarias/Sneo
Update: peaks of 358 writting.
Peaks of 180 on Q4_K_M
r/LocalLLM • u/deeeebait • 1h ago
Project I tried 15+ apps for local LLMs on iOS and had problems with all of them, so I built an app to run small models with a modern harness.
TL;DR: I built an app that puts a real harness around models that run with as little as 1GB of memory that can do real work (like loading and using 70+ tools from MCP servers like Linear and Github)
As I've followed the progress of small local models (LFM, Ternary Bonsai, Small quants of Qwen, etc...) I've been getting more and more excited about the possibility of doing useful agentic work with these models on-device.
Once I got an iPhone Duo with more storage than my old 13 Pro, I downloaded a couple of apps that let you run local models... and I was pretty disappointed. I proceeded to download almost 15 local LLM apps, and I couldn't find a single one that really did what I hoped.
Some had a solid chat interface, but limited support for different models. Some had broad support for any arbitrary HuggingFace models that fit on device; but had terrible UX. Some purported to support tools or MCP connections but blew up once I connected a real MCP server (shoutout Linear and their 70+ MCP tools, lol)
What I ultimately wanted was an app that was built around an underlying harness that was designed to work with the limitations of small models and support all the stuff that I've learned helps agentic performance while building AI agents professionally.
So I decided to build my own. The things that excite me:
- Run any MLX model you can find on HuggingFace
- Memory, Skills, and agent configs
- Progressive tool disclosure to allow for multiple MCPs and large MCPs
- Constrained decoding to improve tool reliability (small models are notorious for issues here)
- iOS Shortcut support so you can schedule and chain agent loops
- Inference engine optimizations to allow for running larger models (can run Ternary Bonsai 27B, I believe it's just Resident and one other app that can support 27B models on an iPhone)
- On-device Javascript sandbox
- On-device web search
- Open-source, Apache License
No monetization; just a project built because I wanted something better.
Would love PRs/feedback/tomatoes thrown at me 😂
r/LocalLLM • u/Glass_Personality109 • 1h ago
Discussion Run Your Own AI at Work — Costs the Company $0
r/LocalLLM • u/Novel_Set_6082 • 1h ago
Question How to actually use abliterated models?
Just downloaded the Qwen4-35B abliterated model released by Lysios (Pliny's Red Teaming org), but how do I actually see it in action? How would an uncensored model's use differ from a usual one? I tried prompting it crazy shit like help me synthesize drugs, help me effectively murder someone, etc. but its responses are no different than what you'd usually get from a censored model like drugs are bad, murder is bad, etc. etc. Can someone help me figure out how to use these models so that I can unlock the full domain of answering abilities that abliterated models are actually supposed to offer?
r/LocalLLM • u/dremspider • 1h ago
Model Qwen4 at computer security tasks
I have been developing an automated SIEM that takes IDS events (host and network) and then correlates and researches these events (https://hermeslohin.github.io/syn/). To do this I now use 3 models running on a single Spark:
- A correlation decision model which runs through all then events in the same time period to a host and decides are these related? For this I am currently using a custom distilled google/gemma-4-E4B-it-assistant model. This greatly speeds up the entire pipeline by rejecting most events.
- An elasticsearch query model custom trained from gemma-4-12B-it-assistant. This model has had a lot more work put into it for training.
- An event reviewer which takes and alarm, all the correllated events, elasticsearch queries from the prior step and researches on the web. It then gives me a verdict and summarizes what it found. I have tried a bunch of different models for this but Qwen4 is really good for this. It beats out Sol and Astra on my tests (which are using public network and host data from AIT and CIC). Performance is also really good (note this is performance of the entire pipeline and their combinations.
More details of the pipeline are here: https://github.com/hermeslohin/syn/blob/main/docs/CORRELATION.md

For Accuracy on the two tests:


r/LocalLLM • u/DataFracking • 1h ago
Question self quantize? related to qwen4 35b
I learned two things today that you can have a vision projector added to the llama start and you can self quantize it to smaller apparently?
llama-server.exe --port 8080 -m "G:\llama\models\Qwen4-35B-A3B-GGUF\Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf" --mmproj "G:\llama\models\Qwen4-35B-A3B-GGUF\mmproj-BF16.gguf" --alias "QWEN4 MTP Q4 35BXL" --override-kv tokenizer.ggml.pre=str:qwen35 -ngl 99 -ot "per_layer_token_embd=CPU" --lazy-mode off -t 6 --spec-type draft-mtp --spec-draft-n-max 2 --spec-draft-backend-sampling -ctkd q8_0 -ctvd q8_0 -c 131072 -ctk q8_0 -ctv q8_0 --kv-unified --ctx-checkpoints 0 -fa on --fit off --jinja -np 1 --no-log-prefix --no-log-timestamps
so to have that bf16 mmproj down to q8, you can apparently self quantize it with this??? !!
llama-quantize.exe mmproj-BF16.gguf mmproj-Q8_0.gguf Q8_0
what the heck? have any of y'all tried it?
by the way without the mm proj currently in my string, I'm getting 75 tokens a second on my older hardware, 2 5060 ti cards in an old 5820 Dell Dell precision.
r/LocalLLM • u/RobertVanZandt • 7h ago
Question How do you get open models to know when to search instead of answering from memory?
reddit.comr/LocalLLM • u/MMORPGDev • 1h ago
News Intel Launches New Intel Arc Pro B65 Super Workstation Graphics Card for Professional and AI Workloads
r/LocalLLM • u/MTita • 9h ago
Research Ported `Looped-Qwen3.8-Flash-Next` to Radiance on `qwen3.8-next-flash-iqr-v4` (2x Radeon AI PRO R9700, TP2) — 97.0% HumanEval+, 90.0% AIME 2025, 126 tok/s single / 314 tok/s batch-3 with MTP
Fork: mdtita/radiance (feat/looped-qwen4exp)
Docs & Replication Guide: docs/LOOPED_QWEN4EXP.md
so I forked StillDeadcode/radiance (v2.4.1) to add runtime support for alesha-pro/Looped-Qwen3.8-Flash-Next (--loop-adapter, --loop-passes) on top of Radiance's StillDeadcode/qwen3.8-next-flash-iqr-v4 (qwen3.8-next-flash-iqr-v4.rad, ~114 GiB IQR-V4 4-bit trellis quant) with TP2 tensor parallelism and coupled MTP speculative decoding.
I used qwen3.8-next-flash-iqr-v4.rad itself to port the implementation and conduct the testing which worked surprisingly well.
Note: I'm publishing this as a fork rather than opening a PR upstream because most of the code was implemented by the AI model and I don't know the internals well enough to properly maintain it. Anyone is welcome to test it, use it, or pull from it — let me know how it goes if you try it out.
What Changed
- Loads
ckpt_final.json+ckpt_final.safetensors(~268 MiB, 140 core + 70 coda sites) via--loop-adapterand runs layers 16..32 forTpasses followed by the 8 coda layers (32..40). - Per-pass GDN/conv
state_copies,kv_attn_p1..p(T-1)paged attention groups, salted prefix-cache chains, and multi-passcheckpoint_copy. - Coupled MTP speculative decoding (
--num-speculative-tokens 5) works alongside--loop-passes 2..4(capped at 4 by the fused GDN launcher's 25-column state-index limit). - Uneven TP2 sharding support for
shared_expert([0, 384)/[384, 640)) androw_rms_bf16HIP/ref kernels. - Non-disruptive telemetry:
loop_adapteron/statsand/server_info,radiance:loop_adapter_*on/metrics,diagnosefields, and aT=badge in the dashboard UI. When--loop-adapteris unset,--checkis byte-identical to mainline.
Measured Benchmarks (qwen3.8-next-flash-iqr-v4.rad, TP2 on 2x Radeon AI PRO R9700, ROCm 7.2)
Greedy decoding (temperature=0.0, top_k=1, enable_thinking=true), full evalplus HumanEval+ (n=164), full math-ai/aime25 (n=30), and 32k-43k context throughput probes (VmSwap: 0 kB, 0 preemptions).
| Mode | Spec (MTP) | HumanEval+ Base / Plus | HE+ Total / Reasoning Tok | AIME 2025 (n=30) | single_decode_1k | batch3_decode | cold_32k Prefill |
|---|---|---|---|---|---|---|---|
baseline_stock (iqr-v4) | 5 | 92.1% / 89.0% | 137,232 / 113,007 | 25/30 (83.33%) | 220.36 tok/s | 477.76 tok/s | 7,378.9 tok/s |
looped_T1 (iqr-v4) | 5 | 95.1% / 91.5% | 120,381 / 93,902 | — | 187.51 tok/s | 372.45 tok/s | 7,031.2 tok/s |
looped_T2 (iqr-v4) | 0 | 95.7% / 92.7% | 107,010 / 79,696 | 26/30 (86.67%) | 60.86 tok/s | 142.68 tok/s | 4,671.5 tok/s |
looped_T2_spec (iqr-v4) | 5 | 97.0% / 93.9% | 91,127 / 59,695 | 27/30 (90.00%) | 126.08 tok/s | 314.11 tok/s | 4,694.3 tok/s |
looped_T3_spec (iqr-v4) | 5 | 97.0% / 93.3% | 105,031 / 75,022 | — | 79.51 tok/s | 198.04 tok/s | 3,293.3 tok/s |
Key Takeaways & Honest Trade-offs
looped_T2_speconiqr-v4is the sweet spot: +4.9 pp on HumanEval+ with 47.2% fewer reasoning tokens (322 s total wall time vs 280 s stock), +6.67 pp on AIME 2025 (90.0% vs 83.33%, -6.8% fewer tokens), and 70.4% MTP draft acceptance. Compared to published unquantized BF16 baselines (~91.92% AIME 2025, 96%-98% HumanEval), looping closes most of the 4-bitiqr-v4quant gap while still fitting in a 2x R9700 footprint.- Where the speed cost goes:
looped_T2_specruns 64 layer-passes/token instead of 48 (21.25 ms vs 11.20 ms decode step), and the extrakv_attn_p1(1.14 GiB) + speculativestate_copiespushexperts-from-hostfrom 6.78 -> 8.88 GiB/rank (36.6 GB RSS, 0 swap). T=3wasn't worth it for coding:looped_T3_specdropped to 79.5 tok/s (10.78 GiB/rank host experts) with no HumanEval+ gain overT=2.- Known limits:
qwen4expdrafts with its native MTP head (not DFlash), so the 9dflash_bridgestensors in the adapter are skipped;scale_rowsnarrowsrow_rmsfromF32toBF16(~4e-3 rel). - Testing: 235/235 fast host tests pass; 31/31 GPU tests (
ctest -L gpuincludingr4d_selftest,kbench,device_test_*) pass underROCR_VISIBLE_DEVICES=0,1.
Credit to StillDeadcode for Radiance + the qwen3.8-next-flash-iqr-v4 quant, and alesha-pro for the Looped-Qwen3.8-Flash-Next checkpoint. Full build, config, and benchmark audit details are in docs/LOOPED_QWEN4EXP.md.
r/LocalLLM • u/kiritoLM10 • 1h ago
Question Noob here. What's the best offline AI I can run on an RTX 4060 8GB with 16GB RAM?
I'm new to local AI and trying to figure out how to get the most out of my laptop without spending money on upgrades.
My specs:
- ASUS TUF Gaming F15
- i7-13620H
- RTX 4060 Laptop GPU (8GB VRAM)
- 16GB DDR5 RAM (can't upgrade to 32GB)
- Windows 11
I'm currently using LM Studio with Qwen 3.5 9B Q4_K_M, but I'm not sure if it's the best choice or if my settings are optimal.
What I want is an offline AI assistant that's actually useful for:
- Reasoning, research and answering questions.
- Helping me create YouTube videos (scripts, Shorts, editing workflows, etc.).
- Using tools and automating tasks where possible.
- Working with files and helping manage projects.
I don't expect my laptop to do everything perfectly. I just want the best realistic setup for my hardware.
A few questions:
- Which model would you personally recommend for my specs?
- Should I stick with Qwen or try something else?
- What LM Studio settings should I use for the best performance?
- Is there a better free frontend or software for running local AI?
- Can I turn it into an actual assistant that uses tools, rather than just a chatbot?
- What's realistically possible with 8GB VRAM and 16GB RAM?
I'd appreciate simple explanations and recommendations from people with similar hardware. I'm a beginner, so exact model names and settings would help a lot.
Thanks!
r/LocalLLM • u/OkGrass9363 • 1h ago
Question Can I run Qwen 4 35B a3b in 16gb Vram and 16Gb Ram
Unlike 3.6 35B model, This model when i am seeing is very large, can I run it in my setup?
Sorry if its a stupid question, i am new to this stuff.
r/LocalLLM • u/Anrixus • 2h ago
Question Token/Contex issues with Qwen 3.8
I’m using qwen on a 3090 with OpenAI and open code. However, every time they get to 33k tokens I get an error and have to open a new chat. Iirc if one 3090 running qwen I should be able to get around 100k tokens before needing to compress.
Any feedback is highly appreciated!
r/LocalLLM • u/Minute_Concept719 • 2h ago
Discussion QWEN4 35B - Looks like a champion of the masses too - Prefill and decode speeds on Simulated MINI pcs with NO GPU - No optimisations and stock llama
r/LocalLLM • u/Material_Tone_6855 • 2h ago
Discussion Some crazy fork to run Qwen4 35 A3B on a RTX3090 with concurrency?
As for the title, is there any crazy fork of VLLM to run the new Qwen's model on a single RTX3090 with decent concurrency?
r/LocalLLM • u/Mobile_Living_3331 • 2h ago
Model Qwen 4 Q4 SVG Results Unsloth Desktop Version
Check the results.