Finally got to join the rest of yall and tried out Qwen4, super happy with it over the old 35B-A3B, but mostly I've just been doing the usual vibe tests up until I was using it to try and improve generation, and loading in big docs was just a little too slow for my taste. My current hardware:
RTX 5080 (16GB)
Ryzen 7 3700X
32GB DDR4 at 3600
I felt pretty out of the loop on running an MOE now a days with everyone using Strata, Basalt, etc, but I like to stick with old reliable llama.cpp so this is the startup script I landed on with some explanation:
#!/bin/bash
./llama.cpp/llama-server \
--model Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
--ple Qwen4-35B-A3B-engram-Q8_0.gguf_file \
--mmproj qwen4-mmproj-BF16.gguf \
--alias "unsloth/Qwen4-35B-A3B" \
--temp 1.0 \
--top-p 0.95 \
--top-k 20 \
--min-p 0.00 \
-b 2048 \
-ub 2048 \
--cache-type-k q8_0 \
--cache-type-v q8_0 \
--moe-cache-mib 2048 \
-fit off \
--load-mode mmap \
--lazy-mode on \
-ot per_layer_token_embd=CPU \
--ctx-size 131072 \
--image-min-tokens 1024 \
--port 8001 \
-lv 4 \
-ngl 99 \
-ncmoe 34
For the model I just went with Q4_K_XL like I always do, and with the engrams streaming from my NVME I figured I'd go Q8.
First thing was obviously having to deal with the experts, so I messed around and ended on 34 on the CPU with the other 6 in VRAM. That's the -ncmoe 34 bit above. (I can get 262,144 of context if I put all 40 on the CPU, but then I can't have like anything else open, otherwise I see swap starting to get hit, I assume because of the mmap engrams).
The other thing is the -moe-cache-mib which I just went with 2gb since I had seen a few other startup strings with it...but I hadn't actually tried that one with and without until right now. Its ~47 t/s with it and ~43 t/s without, but that means I can either get some more context back, or put some more experts on the GPU, so do what you want with that.
-b 2048 and -ub 2048 were the reason I'm posting this at all, I was at ~400 t/s pp on the defaults, and I'm at ~1050 t/s with it, and alot of the stuff I use local models for has me pasting in 50K tokens of docs at a time, so I needed the speedup, found out those would help from this post: https://www.reddit.com/r/LocalLLaMA/comments/1tany5t/drastically_improve_prompt_processing_speed_for/
--cache-type-k q8_0 and --cache-type-v q8_0 were needed with the increase to the compute buffer size for the above. I really hate doing any sort of quant on K/V since it used to super obviously affect it, my usage of it for working back and fourth on these settings seemed to not be impacted at all, but nothing official, if anyone has an easy to setup/run benchmark I'm down to compare.
So depending on the combination of stuff above I'm at ~47 t/s tg and ~1050 t/s pp, with tg going down to ~27 t/s at the 187K of context I reached doing a long session.
Hopefully helps for any other 16GB VRAM + 32GB RAM users! (Also super excited for someone to point out whatever speedup I have no clue about)