r/LocalLLM • u/hamster_drive • 1h ago
Discussion Help refining the command for qwen4 35b a3b on 5060 ti (16gb)
Hey guys!
I'm running the newest qwen4 model on my humble 5060 ti (+32gb ddr5, 6 core cpu) and gotta say I love it.
I've been seeing some posts about people getting like 150 tokens per second which sounds crazy.
Anyways, I'm gonna post my command I use to run it. I tuned parts of it iteratively with Claude's guidance but I'd love to see what other people used to get this running!
As a prelude - I wanted a single context (for a single long conversation) on my machine with reasoning ON. This turned out to be what I settled on:
- context (-c) at 64k. this was around my limit before it started spilling into RAM
- --n-cpu-moe at 21. This number was tuned so vram was 1gb from being full and shared gpu memory stays near zero.
- --no-mmproj. saves around 1gb of vram
- --spec-type draft-mtp --spec-draft-n-max 1. Apparently depth at 1 helps when experts are offloaded to CPU
40 -70 token/s prompt processing speed
34 - 40 token/s generation speed
Full command:
@echo off
cd /d C:\llama.cpp
set CUDA_MODULE_LOADING=EAGER
llama-server.exe ^
-m "C:\models\Qwen4\Qwen4-35B-A3B-UD-Q4_K_M-00001-of-00002.gguf" ^
--jinja ^
-np 1 -c 65536 ^
-fa on ^
-ctk q8_0 -ctv q8_0 ^
-t 6 -tb 12 ^
-b 2048 -ub 512 ^
-ngl 999 --n-cpu-moe 21 ^
--load-mode mmap --lazy-mode on ^
-ot per_layer_token_embd=CPU ^
--no-mmproj ^
--spec-type draft-mtp --spec-draft-n-max 1 ^
--no-reasoning-preserve ^
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 ^
--alias qwen4-35b-a3b ^
--port 9931 ^
--presence-penalty 0 --repeat-penalty 1.0
pause
1
u/Comfortable-Cry-3261 1h ago
Same on 3090 with llama and different settings. Strata works with the numbers.
With Q4 km, and lower, I found Chinese or Russian chars from time to time. Checking higher.
1
u/aiadrianchase 41m ago
On the 16 GB card, I’d keep your 64k setup as the baseline and try one change at a time. First run the same long conversation at 32k and 64k with the same GGUF and output limit. Then, at the context you actually need, compare MTP off versus depth 1 while keeping --n-cpu-moe fixed. Record time to first token, decode tok/s, and dedicated versus shared GPU memory. That should tell you whether the slow part is prompt processing, CPU expert offload, or low draft acceptance. A short-prompt 150 tok/s result won’t tell you much about your 64k target.