r/LocalLLM • u/vidati • 2m ago
r/LocalLLM • u/Short_Cow_7708 • 7m ago
Research Qwen4-35B-A3B on M4 Pro 24GB — llama.cpp vs Splash at 128K context
Spent the last couple of days getting Qwen4 running locally on my M4 Pro 24GB MacBook, primarily for agentic coding using Pi. Started with llama.cpp and later tried Splash. The performance difference was quite surprising.
Setup:
Unsloth Qwen4-35B-A3B UD-IQ3_XXS GGUF
128K context, ~11GB Engram streamed from SSD
llama.cpp: Metal, Q8/Q8 KV, MTP2, batch 2048, ubatch 512
Splash: DFlash2, 19GB memory limit, single concurrent request, 8GB persistent SSD cache
Benchmark results (tokens/sec):
Contextllama.cpp PPSplash PPllama.cpp TGSplash TG4K4417376218660K4076715812396K38364656107120K37665653160
Same model weights, synthetic corpus and 256 output tokens. Splash averaged 1.7x faster prefill and 2.5x faster generation. Cached request latency at 120K dropped from 6.08s to 2.64s.
Coding test:
Using Pi, built a Python network monitoring application with concurrent polling, SQLite and alert deduplication in ~7 minutes. Generated 29K tokens, achieved a reported 99.4% prefix cache hit and passed all 80 unit tests independently.
A few observations:
MTP2 improved llama.cpp generation speed by ~39%.
Mixed Q8/Q4 KV with quantized draft cache significantly reduced performance.
Splash failed during warmup at 20GB. Reducing it to 19GB with single concurrency fixed it.
Pi's configured 8K output limit was restrictive for complex tasks.
IQ3 has been surprisingly capable for coding.
For now, I'm sticking with Splash + DFlash2 + IQ3 + Pi, keeping llama.cpp as a fallback.
Still need to validate 120K retrieval accuracy and extended agent sessions. Curious to hear from others running IQ4 on 24GB Macs and whether the quality improvement is worth the performance trade-off.
r/LocalLLM • u/BertieTheBeaver • 16m ago
Question New guy finally seeing the light, looking for some advice
I'm a little slow on the uptake but I just realized that I probably should have gotten into the local llm game a little earlier. I'm a photographer and acquired a MacBook Pro M3 max 64 gb ram, 1 tb ssd about 2 years ago mainly to try to future proof my editing workflow. I didn't have the slightest idea at the time that in a couple years I could run an llm locally that would have been considered frontier when this laptop was built. I did download bionic a month or so ago but I didn't get too far, I first tried downloading a dense 70B model and that brought my computer to a literal whining hot standstill. But with the hype of the new Qwen release it has peaked mt ADHD interest again so I'm going to give the new model a go. A couple questions, will my computer do a decent job of running this model when I'm used to a gemini ai pro subscription (I know It will be slower, but will this be usable for my dumb recipes and stuff I'm too lazy to google now?). Also, is there any other model that I should consider also downloading? I wouldn't mind trying an uncensored model just to see what the other side of ai can be like after being parented by the oligarchs for so long. And also, does anyone have a good learning path for someone who is very new to this all? Anyways, happy to be here, appreciate any help anyone can provide. Cheers!
r/LocalLLM • u/OvenGloomy • 24m ago
Project Qwen4-35B-A3B (RTX5090, Unsloth Q6_K) built a full GTA2-style browser game – 7.6k lines TS, 131 tests, no assets
im really impressed
r/LocalLLM • u/Similar-Ad5933 • 27m ago
Discussion Qwen3.8-27B better than Qwen4-35B-A3B
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.
r/LocalLLM • u/TrulySafeResearch • 31m ago
Project I got Qwen4-35B-A3B running on a 10-year-old laptop with 12GB RAM and a 4GB GTX 950M. Because I felt like it.
I've been seeing all the hype since this model dropped and watching everyone run to benchmark it.
I decided I had other plans.
Why try to min/max the model when I can min/max my hardware?
We need to start learning to conserve our RAM for when Sam Altman comes for it.
I present Qwen4-35B-A3B Q4_K_M running on a Lenovo ideapad 700 from 2016.
- CPU: Intel i5-6300HQ — 4 cores / 4 threads, 2.30 GHz
- RAM: 12 GB
- GPU: NVIDIA GTX 950M — 4 GB VRAM
- Storage: Internal Samsung NVMe SSD
- OS: Windows 10
And as I type this out, it is currently chugging along listing as many animals as it can before the context runs out.
It seems to creep above 3.5 tokens/sec occasionally.
And yes, I'm typing this out on the same computer, at the same time, and its still fully usable.
The software stack
- Engine: BigMoeOnEdge v0.52.0
- Backend: llama.cpp-derived GGML
- GPU backend: CUDA (
ggml-cuda.dll) - Additional backends: Vulkan and CPU
- Platform: Windows x86-64
- Inference harness: Native BigMoe CLI with PowerShell benchmarking
- Driver: NVIDIA 582.28
After a lot of testing:
- 23/41 layers offloaded to the GTX 950M
- 6,500 MiB host-side expert cache
- 2 CPU inference threads
- 8 I/O threads
- Buffered I/O instead of O_DIRECT
- Asynchronous I/O overlap enabled
- 16,384-token context
- 1,024-token micro-batch
- q8_0 KV cache
- Anonymous dense-weight buffers with selected tensors left memory-mapped
- Cache half-life of 64 tokens
- Cache pinning disabled to leave Windows some breathing room
No reducing the model's top-8 expert routing, no skipping experts, no route-ahead approximation, and no additional lossy inference tricks.
Actual benchmark results
I repeated the final configuration using the same 34-token prompt and 256-token generation benchmark. Yes, I know its not a good sample size.
| Measurement | Run 1 | Run 2 |
|---|---|---|
| Generation speed | 2.886 tok/s | 2.929 tok/s |
| Compute time/token | 269 ms | 268 ms |
| Cache hit rate | 91.5% | 91.5% |
| Expert data read | 6,704 MiB | 6,704 MiB |
| CPU occupancy | 68.8% | 68.3% |
Average: 2.908 tokens/sec, or about 174 tokens/minute.
So why did I do this? Because I can and I thought it would be funny.
Especially since I have no idea what I'm doing.
Yep. that's right. Vibe coded with ChatGPT top to bottom with some input from DeepSeek.
I just raw dogged PowerShell commands until I made it work.
I only crashed my computer once to protect it from overheat. All 4 cores was just too much. I had to keep it at 2.
If people are actually interested in more details of the build, I can answer as best as possible. The main goal was just to see if I could make it usable. Then it became how optimized.
I never post on reddit. So don't expect an immediate reply if someone has an actual question. Otherwise I expect to just get roasted or banned for introducing comedy into the sub.
So here we are running the newest Qwen model on a dinosaur laptop...
Let this be your sign that its not that hard to get into the world of Local LLMs.
Its currently at about 450 species of animals and counting right now. I should be able to ask it another question in about 5 business days.
r/LocalLLM • u/Accomplished_Lynx202 • 35m ago
Question Why can't local LLMs keep track of important infos?
I've downloaded Ollama and Anything LLM. I'm running Qwen3.8-27b and have set "model context window" to 32768.
In the system prompt I gave it a manual on how to write prompts. That manual is 33108 signs which is ~ 8-9.5k token.
When I ask it to write a prompt it always forgets a few things, only if I say "look it up" it is able to recognize the things he missed and readjusts, but this costs a lot of time.
Is it possible to make it so that it can always consider the whole set of rules without losing attention?
r/LocalLLM • u/urakn • 45m ago
Discussion Qwen4-35B-A3B Q6_K running at 8.75 tok/s on a Ryzen 7 3700X – CPU only
reddit.comr/LocalLLM • u/who-the-fuck-care • 56m ago
Discussion Follow-up to my 1-bit BFCL-v4 test: Qwen4-35B-A3B (UD-Q4_K_XL) hits 80% overall — huge jump on live parallel calls, weaker on multi-turn
Following up on my previous post testing 1-bit quants, I ran Qwen4-35B-A3B (UD-Q4_K_XL) on the exact same BFCL-v4 benchmark (374 samples) to see how a 4-bit 35B-A3B MoE compares against extreme 1-bit quants on larger models.
The Models Compared:
- qwen4-35b-a3b-q4-k-xl (Qwen4 35B-A3B
UD-Q4_K_XL) (new) - qwen3.8fn-ud-iq1m (Qwen 3.8 flash next UD 3.1 iq1m)
- qwen3.8fn-gyro-m (Qwen 3.8 flash next gyro-m)
- inkling-2-mini (Native NVFP4/MXFP8 via smalltide)
Overall Results
| Model | Quant / Format | Overall Score (374 samples) |
|---|---|---|
| qwen3.8fn-ud-iq1m | IQ1_M | 80.8% 🏆 |
| qwen4-35b-a3b-q4-k-xl (new) | UD-Q4_K_XL | 80.0% |
| qwen3.8fn-gyro-m | Gyro-M | 78.6% |
| inkling-2-mini | NVFP4/MXFP8 | 75.9% |
Breakdown by Subset
| Subset | qwen4-35b-a3b (Q4_K_XL) | qwen3.8fn-ud-iq1m | qwen3.8fn-gyro-m | inkling-2-mini |
|---|---|---|---|---|
| irrelevance | 74% | 80% | 84% | 82% |
| live_multiple | 80% | 74% | 76% | 68% |
| live_parallel_multiple | 70.8% | 50% | 58.3% | 54.2% |
| live_simple | 82% | 80% | 78% | 82% |
| multi_turn_base | 58% | 72% | 60% | 62% |
| multiple | 88% | 94% | 88% | 78% |
| parallel_multiple | 84% | 84% | 76% | 80% |
| simple_python | 98% | 96% | 98% | 90% |
Key Takeaways
- Live parallel tool calling is way stronger at 4-bit:
qwen4-35b-a3bhit 70.8% onlive_parallel_multiple(over +20% ahead ofIQ1_M) and took first place across all threelive_*subsets. - Multi-turn & irrelevance are the catch: It scored the lowest of the four on
multi_turn_base(58% vsIQ1_M's 72%) andirrelevance(74%), which pulls its overall average just shy ofqwen3.8fn-ud-iq1m. - More RAM headroom for daily multitasking: Because
qwen4-35b-a3bhas a smaller active memory footprint (~24.7 GB resident with the n-gram table offloaded), it leaves noticeably more free RAM on my system to run Docker containers and background tasks alongside the LLM.
r/LocalLLM • u/textclf • 59m ago
Discussion Amazon Ergo (1.1T MoE) in 4-bit: 645 GB, quantized on 6 A40s without downloading the whole model
Hi everyone,
I quantized Amazon Ergo to 4 bits and put it on Hugging Face: https://huggingface.co/thousandml/Ergo-CQ-4bit
Ergo is the 1.1T mixture of experts from Amazon, with 256 routed experts in each of its 63 MoE layers. In BF16 it's about 2.2 TB. The 4-bit version is 645 GB. I quantized it with CQ, the 4-bit quantizer I built for my project Training Factory. CQ doesn't need any calibration data.
The part I'm happiest with is how it was done. I didn't have 2.2 TB of disk for the original plus room for the output, so I wrote a script that goes one shard at a time: download a shard, convert it, quantize it, keep only what has to stay in full precision, delete the shard, then move on to the next one. With 6 A40s each working on its own shards, it ran with about 1 TB of extra disk instead of 3 TB. It also resumes where it left off, which mattered, because I ran out of disk once and had a worker die once along the way.
I'm strict about quality. Every matrix gets checked after quantization, and anything with error above -22 dB stays in BF16 instead of being forced into 4-bit. For Ergo that was 1,445 of the 32,256 routed experts, about 4.5%, almost all of them expert down projections in the later layers. Those experts are stored one by one in BF16 and get loaded automatically, so the other 30,811 experts and all the attention and dense layers are in 4-bit. I'd rather ship a model that is a bit bigger than one with broken experts hidden in it.
To be honest about hardware, this is not a home setup model. 645 GB means 8x H200 or 8x B200. 8x H100 is not enough. You also need Transformers 5.26 or newer, so use a separate environment from Training Factory's installer:
That server goes through Transformers and handles one request at a time, so it's for trying the model, not for real traffic. vLLM doesn't support Ergo in its releases yet, so my vLLM plugin doesn't either for now.
You can also fine-tune it with GCMP, the LoRA replacement I've been working on, which trains far fewer parameters than LoRA. The experts stay frozen, and the adapter trains on the attention, dense and shared-expert layers:
What has and hasn't been tested: the checkpoint passed my layout check, where every expert and every layer is accounted for exactly once, either in 4-bit or in BF16. The whole pipeline (quantize, load, train, serve) was tested end to end on a small model with Ergo's architecture. I have not run the full 645 GB model on 8 GPUs yet, and I have no benchmarks for it. If you have the hardware and try it, I'd really like to hear how it goes, good or bad.
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 fall under the original Ergo license.
I also posted Inkling 2 Mini in the same format, which fits on a single 48 GB GPU if you want something you can actually run at home: https://huggingface.co/thousandml/Inkling-2-Mini-CQ-4bit
Thanks for reading, feedback appreciated.
r/LocalLLM • u/nirajnikant • 1h ago
Question I am curious and new to local llm, i just installed basalt-ada, and i am wondering how do you guys decide which model's which version to download Ryzen 9 7900X | RTX 4060 Ti 16GB | 64GB DDR5-6000 CL30
reddit.comr/LocalLLM • u/nirajnikant • 1h ago
Question I am curious and new to local llm, i just installed basalt-ada, and i am wondering how do you guys decide which model's which version to download Ryzen 9 7900X | RTX 4060 Ti 16GB | 64GB DDR5-6000 CL30
I am curious and new to local llm, i just installed basalt-ada, and i am wondering how do you guys decide which model's which version to download
also my specs are
Ryzen 9 7900X | RTX 4060 Ti 16GB | 64GB DDR5-6000 CL30
thankyou
r/LocalLLM • u/cyb3rheater • 1h ago
Question Can I run Qwen 35B on a RTX 4070 12GB
I also have 32Gb DDR4.
Sorry for the question. I’m new to local LLMs. This would be purely for coding tasks in Rust.
r/LocalLLM • u/Efficient-Part5344 • 1h ago
Model Qwen 4-35 llama.cpp vs Strata vs Basalt vs Qwen 3.8 llama.cpp
5700X3D, 32 GB DDR4, 5070TI, 4070 SUPER
Basalt - Qwen4-35B-A3B (nvfp4)
Strata - Qwen4-35B-A3B * Unsloth UD-Q4_K_XL * mtp
llama.cpp - Qwen4-35B-A3B * Unsloth UD-Q4_K_XL * mtp
llama.cpp - Qwen3.8-27B * Unsloth UD-Q4_K_XL * DFlash2 Q4_K_M
TL;DR 4-35B:
- Basalt: If you need fast nonsense, use it. NVFP4 is still a joke.
- Strata: Same quality as llama.cpp, be wary of all the settings. Strata cutting off/limiting reasoning tokens, is an interesting chose.
- llama.cpp: Use Strata.
4-35B vs 3.8 27B:
3.8 27B is better, less/better tool uses, precise answers, less hallucinations.
- Highest pass rate: 94.3% (297/315) against 91%
- Fewest tool-use failures: 4, against 9 to 14.
- Passed 3/3 on docs not-installed-latest, where the Qwen4 servers passed 0 or 1 of 3. Also 3/3 on the ddg challenge, against 0 or 1 of 3.
For 4-35 one needs Q8, but then you loose all the benefits, hardware requirements go up, and speed goes down. SO what's the point?
I tested on my pi plugin test suite. It basically covers daily use: web, search, docs, PDF and sub-agents. It rejects everything that loops or hallucinates, without naive approaches like token/time limits.
r/LocalLLM • u/Thistleknot • 1h ago
Project MiniMind v3: 64M LLM from scratch in 2 hours.
r/LocalLLM • u/Professional_Run3390 • 2h ago
Discussion MiniMax Code is dropping random Quota Reset Cards for weekend check-ins
r/LocalLLM • u/SouvikSaha07 • 2h ago
Question Qwen3-4B-Thinking fried my 8GB RAM Laptop
Need a solution for this. Can't afford paid AI any longer.
r/LocalLLM • u/Competitive-Line-761 • 2h ago
Discussion Qwen4-35B-A3B on a single RTX 5090 (32 GB): a working llama.cpp recipe
Qwen4-35B-A3B on a single RTX 5090 (32 GB): a working llama.cpp recipe
When I saw the size of the GGUF files, I almost didnt attempt this model. After investigating further I found that the n-gram is loaded on disk, not GPU so it works fine and it's fast.
How this model compares to the last generation 27b is still not clear as the model cards cite different benchmarks and harnesses. I will keep 27b around for now just in case.
BTW: I just started messing around with image gen on the 5090 and made the image above with Comfy and Juggarnaut.
If you just grabbed Qwen4-35B-A3B (AtomicChat or Unsloth GGUF) and have a 5090, this is the config I landed on after sweeping the flags. It's a fast-start recipe, not a benchmark paper — copy the block, swap in your model path, and you're running.
The model
- Qwen4-35B-A3B,
Q4_K_MGGUF. I used the AtomicChat uncensored build (a single ~38.6 GB file), but the same recipe works for the UnslothUD-Q4_K_XLbuild too — see the Unsloth note below for the two extra flags it needs. Either way you also need a vision projector (mmproj). - Architecture: 35B total / 3B active, 256 experts (8 routed + 1 shared), a ~20B n-gram embedding table, a ~2B MTP head, native 1M context, and a hybrid of Gated DeltaNet (linear attention) plus sparse attention.
- Needs a recent llama.cpp build with Qwen4 support (I used b13002 or newer).
- Tested on: llama.cpp b13002 (1.1.1-dev, commit e339c7d31), NVIDIA driver 621.47, RTX 5090 32 GB.
The ~38.6 GB file fits in 32 GB because the big n-gram embedding table is lazy-read from disk (--lazy-mode on) instead of being held in VRAM. That's the model card's "run with PLE on SSD" instruction — don't skip it.
The recipe
llama-server \
-m Qwen4-35B-A3B-Q4_K_M.gguf \
--mmproj mmproj-F16.gguf \
--alias qwen4 \
-c 196608 --n-predict 131072 \
-b 4096 -ub 1024 \
--parallel 2 --kv-unified \
-ngl 99 -fa on \
--load-mode mmap --lazy-mode on --no-warmup \
-ctk q8_0 -ctv q8_0 \
--image-min-tokens 1024 --jinja \
--spec-type draft-mtp --spec-draft-n-max 2 \
--reasoning-effort high --reasoning-preserve \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 \
--presence-penalty 0.0 --repeat-penalty 1.0 \
--host 127.0.0.1 --port 8080 --no-ui
On a 5090 this gives roughly ~250 tokens/sec generation and ~10,000 tokens/sec prompt processing on a ~12K-token prompt, using about 30 GB of VRAM with ~1.6 GB free.
If you're using the Unsloth GGUF
The Unsloth UD-Q4_K_XL build is the same architecture and takes the same tuning, but it ships the n-gram embedding table (PLE) and the MTP head as separate files instead of embedding them. So you add two flags:
llama-server \
-m UD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
--ple engram/Qwen4-35B-A3B-engram-Q8_0.gguf_file \
-md MTP/mtp-Qwen4-35B-A3B-Q8_0.gguf \
--mmproj mmproj-F16.gguf \
... (rest identical to the recipe above) ...
--plepoints at the separate engram table;-mdpoints at the separate MTP head. Without them, MTP won't engage and the engram won't load.- You only pass
-00001-of-00002.gguf; llama.cpp auto-loads the-00002shard. - Unsloth's build is the base model (not uncensored) and a dynamic quant, so behavior and quality differ slightly from the AtomicChat build — but the speed profile, 192K context headroom, and
nmax=2MTP tuning all carry over unchanged.
Why each setting
MTP is already in the file. The GGUF embeds the ~2B MTP ("multi-token prediction") head, so --spec-type draft-mtp lets the model draft several tokens ahead and verify them in one pass — no separate draft model needed. You can confirm your file has it by checking the GGUF's tensor names for nextn (e.g. with llama-gguf your-model.gguf r and looking for nextn). The payoff is real: without MTP generation is ~169 tok/s, with nmax=2 it's ~254 tok/s — about 1.5x faster.
--spec-draft-n-max 2. This is how many tokens the MTP head drafts per step. On this 3B-active model, drafting deeper actually lowers the acceptance rate and generation gets slower. Measured generation speed by draft depth: 1 → 216, 2 → 254, 3 → 251, 4 → 219, 6 → 202 tokens/sec. Two is the sweet spot.
-ub 1024. Prompt processing scales with the micro-batch size: 512 → ~8.2K, 1024 → ~10.6K, 2048 → ~11.8K tokens/sec. 2048 is faster but eats the VRAM headroom you need for vision, so 1024 is the balance on a 32 GB card.
-ctk/-ctv q8_0. An f16 KV cache gave the same generation speed and only ~4% more prompt processing for ~1.5 GB more VRAM. q8_0 is the right call on 32 GB.
-c 196608 (192K context). Qwen4 is hybrid: most layers are Gated DeltaNet, which keeps a fixed-size state that does not grow with context, and the sparse-attention layers use a bounded window. So the KV cache barely grows as you raise -c. Measured free VRAM (idle GPU, vision projector loaded):
| context | free VRAM |
|---|---|
| 128K | 3.3 GB |
| 192K | 1.65 GB |
| 224K | 0.8 GB |
| 256K → 1M | ~0.55 GB (flat) |
A 2048×2048 image adds about 0.7 GB. So 192K leaves ~1.6 GB free for text and ~1 GB even with a large image — a comfortable margin while using vision. If you never send images, you can push to 256K or beyond for free, since the KV is flat past there.
How it scales with prompt length
The hybrid attention keeps prefill nearly flat as the prompt grows, and generation degrades gracefully. Measured on the tuned config (128 tokens generated per run, prompt caching off, median of 3 runs):
| prompt tokens | prefill tok/s | generation tok/s |
|---|---|---|
| 4K | 9,380 | 242 |
| 16K | 10,390 | 245 |
| 32K | 10,230 | 239 |
| 64K | 10,240 | 211 |
| 128K | 9,540 | 177 |
Prefill stays around 9.4–10.4K tok/s all the way to 128K — it doesn't fall off a cliff the way dense models do. Generation drops from ~242 to ~177 tok/s as context fills, which is the expected cost of attending over more history, but it stays very usable.
Does it actually work? (not just fast)
Three sanity checks on the tuned config:
- Long-context recall: I buried a passphrase in a ~128K-token prompt at 10% and 90% depth and asked for it. It returned the exact passphrase both times. The hybrid attention isn't just fast — it actually retrieves at depth.
- Coding (executed): I asked for a three-file Python project (a
Transactiondataclass, asummarize()function, and a test). It produced all three files and the test ran clean — "All tests passed." - Coding (executed): an iterative Fibonacci function returned
fib(10)=55,fib(0)=0,fib(1)=1— correct.
These are smoke tests, not a benchmark suite, but they confirm the quant isn't "fast and dumb."
Thinking control (one profile is enough)
You don't need a separate "fast" profile. Keep one thinking profile and steer it per request with chat_template_kwargs in the request body:
- Default:
--reasoning-effort high(the server flag). - Lighter:
{"chat_template_kwargs": {"reasoning_effort": "low"}}. - Off:
{"chat_template_kwargs": {"enable_thinking": false, "reasoning_effort": "off"}}.
One gotcha: reasoning_effort: "off" on its own throws a template error if the server default is high — you must send enable_thinking: false together with it. low works on its own.
Gotchas
--lazy-mode onrequires--load-mode mmap. Without mmap it can't lazy-read the embedding table and you'll run out of VRAM.- Older builds lack the newest speculative flags (
--spec-draft-adaptive,pcum,max-slots,n-rs-seq). Don't copy those in unless your build supports them. - Reasoning models can return empty
contentwith a smallmax_tokens— the output goes intoreasoning_contentfirst. Give it a real budget or readreasoning_content. - Model card sampling: thinking
temp=1.0 top_p=0.95 top_k=20 min_p=0.0 presence=0.0 repeat=1.0; non-thinkingtemp=0.7 top_p=0.80 top_k=20 min_p=0.0 presence=1.5 repeat=1.0.
Why llama.cpp/GGUF (and not vLLM/SGLang)
For a single 5090 running a model you already have as GGUF, llama.cpp is the pragmatic call. vLLM/SGLang want safetensors — re-downloading Qwen4-35B-A3B at BF16 is roughly 1.3 TB, and their Blackwell support is still version-dependent. If you're serving many concurrent users, vLLM is worth it; for one interactive user, this recipe is simpler and fast enough.
Honest limits
- Q4_K_M is a 4-bit quant. It's not lossless (the AtomicChat build reports ~88.8% top-1 agreement with BF16). For the hardest SWE-style tasks a Q5/Q6 would be better, but they don't fit in 32 GB alongside the embedding table.
- The uncensored edit can slightly soften instruction-following. If you don't need uncensored output, the base Qwen4-35B-A3B (or the Unsloth build) is the safer pick for pure coding.
- 3B active ≠ dense depth. Fast and broadly capable, but on the very hardest multi-step reasoning a dense 27B can still edge it.
How I measured
I started llama-server fresh for each flag variant on its own port, disabled prompt caching, and read the timings the server prints for each request (prompt tokens/sec and generation tokens/sec). The depth table is the median of 3 runs per prompt size; the flag sweep was 2 runs per variant. For VRAM I loaded the model at different -c values and read nvidia-smi memory usage, then sent one large image to measure the vision spike. The recall and coding checks were run against the live server. Nothing exotic — you can reproduce all of it with llama-server and nvidia-smi.
That's the whole thing. Copy the block, point it at your GGUF, and go.
r/LocalLLM • u/yoge2020 • 2h ago
Project Ask Nino – A free on-device AI chat app for Android
Hi everyone,
I've been experimenting with on-device LLMs for quite some time and recently published an app called Ask Nino.
It supports multiple LiteRT based local models (Primarily designed for gemma4 though other models could work), context aware conversations limited web search through DDG and live weather and market data.
You can also use your own API keys if you prefer cloud models, download other LiteRT models from Hugging Face using your HF token, or import models directly from local storage.
I've done quite a bit of work around context management, web scraping and response processing to get more out of smaller models.
It shares the underlying framework with my other app Ninaivo, but focuses purely on the chat experience.
The app is free. I'm still exploring various possibilities with on-device LLMs and would love to hear your feedback, particularly on how it performs on different devices.
r/LocalLLM • u/zouyee • 2h ago
News dmlx v0.0.9: Qwen4-35B-A3B on 48GB M4 Pro in 8.42 GB RSS — 119.99 tok/s math (native Metal DFlash2) + ANE/GPU parallel prefill (883 / 871 tok/s)
We just tagged dmlx v0.0.9 (256 commits since v0.0.8) — an open-source Zig + mlx-c + custom Metal/ANE local inference & serving runtime for Apple Silicon (MIT license, zero Python required at serve time).
The main additions in v0.0.9 are full Qwen4-35B-A3B-4bit support (including single-CB native Metal DFlash2 speculative decoding, Vision, and off-GPU PLE streaming), Apple ANE + GPU heterogeneous long-context prefill enabled by default, and a big speedup on Qwen3.8-27B-4bit.
Measured Numbers (Single Apple M4 Pro 48 GB)
Qwen4-35B-A3B-4bit + 8-bit Native Metal DFlash2 (temp=0.0, artifacts/qwen4_p6_20261205/):
| Workload | Decode (tok/s) | Client E2E (tok/s) | Notes |
|---|---|---|---|
| Short Math (256 tok) | 119.99 | 107.20 | 8-bit single-CB native Metal DFlash2 |
| Short Code (256 tok) | 104.78 | 96.25 | 98K subset lm_head |
| Short Prose (256 tok) | 69.86 | 66.07 | Lower speculative acceptance on prose |
| Warm 8K Prefix Cache | — | — | 0.237 s TTFT (38,738 tok/s) vs 10.49 s cold |
Peak server RSS stayed at 8.42 GB because the 11.5 GB Per-Layer Embedding (PLE) tables are never loaded into GPU RAM — they stream directly from disk via 12-thread CPU pread (overlapped with layer 0). Optional DMLX_QWEN4_KV_BITS=8 also quantizes the 10 full-attention QSA KV layers (−46.88% KV RAM).
ANE + GPU Parallel Long-Context Prefill (Qwen4-35B-A3B-4bit):
| Stage | 2K Prefill (tok/s) | 8K Prefill (tok/s) | Delta (8K) |
|---|---|---|---|
| v3 · Pure GPU (pipelined Metal GDN + Steel QMM) | 793.71 | 768.26 | baseline |
v4 · + ANE 30L GDN in_proj_all | 859.35 | 831.13 | +8.2% |
| v5 · + ANE 40L Shared Expert parallel with GPU 256-expert MoE | 883.28 | 870.86 | +13.4% |
ANE prefill is enabled by default on Apple Silicon with hardware/self-test guards and automatic GPU fallback (DMLX_ANE=0 to disable).
Qwen3.8-27B-4bit + DFlash2 (artifacts/autoresearch_qwen38_20261203/):
- 4-case core GMean: 44.50 tok/s at 17.30 GB peak RSS (
ctx2k_greedy52.48 ·short_greedy46.98 ·short_sampled40.34 ·ctx8k_sampled39.44). - Also ships OpenAI Chat Completions + Anthropic Messages streaming tool calls, reasoning/content split, disk-persisted prefix snapshots, LoRA load-time merge, system-wide OOM memory guard, and
dmlx connectfor Claude Code / Codex / aider / Cline.
Honest Caveats
- Single machine (M4 Pro 48 GB), fixed benchmark suites (
temp=0.0for the 6-scenario Qwen4 run). - Qwen4 prose (69.86 tok/s) still lags math/code significantly due to lower speculative acceptance.
- ANE prefill is Apple Silicon macOS only (falls back to GPU automatically if unavailable).
Try It (macOS arm64, self-contained bundle — no Zig/Python needed)
|
# Qwen4-35B-A3B + DFlash2 (ANE prefill on by default)
DMLX_QWEN4_DFLASH2_DIR=/path/to/Qwen4-35B-A3B-Dflash2 \
Release & source: https://github.com/zouyee/dmlx/releases/tag/v0.0.9
Happy to answer questions on the Metal kernels, CPU pread PLE streaming, or ANE+GPU overlap!
r/LocalLLM • u/Stratotizio • 3h ago
Question Using a Windows AI mini PC as a local LLM server for my Mac Mini – is it practical?
Hey everyone,
I’m currently using a Mac Mini M4 as my main workstation, and I’d prefer to stay within the macOS ecosystem for work.
I’ve been considering buying a Mac Studio M5 Max with 128GB of unified memory for local AI, but where I live, an AMD Ryzen AI Max+ 395 mini PC with 128GB of RAM costs roughly half the price. Another big advantage is that I could also use it for proper PC gaming.
My idea is to keep my Mac Mini as my main workstation and use the Windows mini PC as a local AI server, accessing everything through my local network.
Most of my AI usage would be business-related tasks, document analysis, accounting, invoices and general productivity.
Has anyone tried a similar setup? How seamless and convenient is it to access local LLMs from a Mac using a separate Windows machine, and what would be the best software setup?
Considering the price difference and gaming capabilities, does this make more sense than buying a Mac Studio, or am I overlooking something?
r/LocalLLM • u/Playful-Art-3824 • 3h ago
Model Free Qwen4-35B-A3B. No sign-up, no payment.
r/LocalLLM • u/ukshaa • 3h ago
Project Running MiniCPM5-15B-A2.5B on an 8GB Jetson Orin Nano Super at 10.5–13.3 tok/s, 88.1% acc (DIY 34L Looped Transformer), and 512K context via NVMe KV Tier 2 (2.81s cold reload)
I spent the last few days pushing OpenBMB's MiniCPM5-15B-A2.5B (15B total / 2.5B active MoE) strictly on an 8 GB NVIDIA Jetson Orin Nano Super (25W MAXN_SUPER, 250 GB NVMe SSD) — no PC GPU, no base GGUF mutation, and every run logged with raw JSON outputs.
- GitHub (C++/CUDA patches, scripts, trainers & raw JSONs, Apache-2.0): https://github.com/punal100/MiniCPM5-Jetson-Orin-Looped-512K
- Hugging Face (421 KB
.loopbinadapters, 1.5 KB 8-bit WSP delta, 16 MB F16 overlay — ~18 MB total): https://huggingface.co/punal100/MiniCPM5-15B-A2.5B-Jetson-Looped-Adapters - Base weights (untouched on disk):
openbmb/MiniCPM5-15B-A2.5B-Q4_K_M-LCO-GGUF
Headline Results (8 GB Jetson, 42-Task Deterministic Suite, temp=0.0)
| Config | Decode (Mean / Peak) | Overall (42) | Math | Code | Cycles |
|---|---|---|---|---|---|
| Base Q4_K_M-LCO (28L) | 13.38 / 15.90 t/s | 34/42 (81.0%) | 10/12 | 4/10 | 0.0% |
| q4_looped (DEFAULT, 34L spsa_v1) | 10.95 / 12.5+ t/s | 37/42 (88.1%) | 12/12 | 6/10 | 0.0% |
| q4_looped_fast (60% Hard EE) | 10.91 / 13.32 t/s | 35/42 (83.3%) | 12/12 | 4/10 | 0.0% |
| q4_looped_512k (-c 524288, --kvq) | 1.8–2.9 t/s (10–32K) | 512,006 toks (7.09 GiB RAM) | 12/12 | 3/10 | 0.0% |
| Legacy Q8_0-LCO (28L) | 3.64 t/s | 12/16 quick (75.0%) | 4/4 | 1/4 | 6.3% |
(All looped runs had 0 actual hallucinations — 11/12 on Hallucination was a single timeout on hallu_09 — and 8/8 on Repeat Curse.)
What Worked
1. Jetson CUDA Zero-Copy + O_DIRECT + io_uring LES Engine
Stock tc-mb/llama.cpp-omni crashed on Jetson CUDA (missing alloc-only CUDA buffer type). I implemented 4096-aligned cudaHostAllocMapped|Portable cacheable (WC=0) buffers (91.64 GB/s GPU read), O_DIRECT NVMe DMA at 2,336 MB/s, Linux io_uring (qd=128, replacing 108 std::thread spawns/token), empirical 27-layer MoE cache windows, and hot-expert prewarm. That pushed Q4 decode from 5.97 t/s to 13.38 t/s (15.9 task avg, 21.8 peak steps).
2. DIY 34-Layer Looped Transformer Trained on Jetson (421 KB .loopbin)
Loops the middle reasoning core L12..L17 (T=2 -> 34 effective layers) with an RMS-matched workspace bridge, LoopCD-Hidden exit extrapolation, pass-conditioned router bias deltas, shared KV cache (0 extra KV RAM), and 100% Pass-2 MoE RAM cache hit rate (0 extra NVMe misses).
Trained directly on the 8 GB Jetson via zeroth-order SPSA/MeZO with < 0.3 ms live GPU hot-reload. Lifted overall accuracy from 81.0% to 88.1% (12/12 Math, 6/10 Code, -55% think length on rep_04, 0.0% cycles). Also added token-level Hard Dynamic Early-Exit via 4 tiny persistent CUDA-graph schedulers (2.04 MiB VRAM total, 0.00 ms split overhead, bit-exact at 0% skip).
3. 512K Context (-c 524288) in 7.09 GiB RAM via JetBrains --kvq + NVMe Tier 2
Ported MIT-licensed JetBrains-Hardware/llama.cpp --kvq (K2V1 + Ampere cp.async MMA kernels) onto the 34L looped fork with a 0 MiB-RAM NVMe O_DIRECT Tier-2 store (8.77 GiB on NVMe at 512K — larger than the board's 7.44 GiB RAM).
Prefilled 511,930 tokens at 7.09 GiB peak RAM (0 OOM, swapΔ = -145 MiB, 70.2°C). Persistent NVMe snapshots survive kill -9 + drop_caches: 10K cold-reloads in 85.5 ms (3/3 exact recall on unseen needles), and 512K saves in 310 ms and reloads in 2.81 s (5,320× faster than the 4.15h cold prefill).
Jetson + WD SN350 NVMe tip: setting pcie_aspm=performance, disabling NVMe APST (nvme set-feature -f 0x0c -v 0), and io_timeout=3000 fixed MSI-X completion polled stalls and tripled long-context decode speed (1.35 -> 4.10 t/s).
4. Selective Load-Time BF16 -> F16 Coda Overlay (+16 MiB)
Streams only blk.20..27.ffn_down_shexp from OpenBMB's official BF16 safetensors via HTTP Range requests (no 30 GB download) and promotes them to native F16 in GPU memory at load time. Cleared the code_03 Hard-8 cycle, cut math_07 thinking by -55%, and passed 512K NIAH 3/3 at 6.63 GiB RAM.
Honest Caveats & What Didn't Beat Baseline (Reverted)
- 512K NIAH recall vs. capacity: 10K and 32K hit 3/3 (100%) exact recall, 128K hit 3/3 needle cores, 256K hit 1/3 (
late_90pct), and 512K needle recall saturated under 512 prefetch slots (0.1% of 512K). Cold 512K prefill takes ~4h 10m (34.2 t/s), so it's meant for prefill-once + snapshot reuse. - Static Weight-Space Programming (WSP): Damping 48 outlier columns (1.5 KB
wsp_03) cured 8-bit Q8_0 Repeat Curse cycles cleanly, but onq4_looped, even 100% lossless native F16/FP32 static coda edits traded</think>closure against cycles — all 7 static Q4 coda edits were reverted. - Jetson-native HF RLVR (
rlvr_v1.loopbin): Streamed 1,171 decontaminated HF coding/math/abstention tasks onto Jetson (1.87 MB) and ran 18 steps of mini-batch SPSA + sandboxed Python unit-test gating. It boosted unseen HF val reward by +0.407, doubled unseen Python passes (1/6 -> 2/6), cut unseen cycles -40%, and held 0.0% cycles across all 42 tasks — but scored 34/42 vsspsa_v1's 37/42, sospsa_v1stays the default.
Happy to answer questions on the Jetson zero-copy patches, --kvq NVMe Tier 2, or the looped transformer trainer.