# Qwen-4-35B-A3B-12gbvram-files

> Source: <https://gist.github.com/anshulsingh8326/3151a35c4494bc1abd1d4e101dda6db3>
> Published: 2026-12-04 14:33:18+00:00

**Recommendation:** On a 12GB GPU running a large MoE GGUF, offload MoE layers to CPU with --n-cpu-moe and quantize the KV cache to q8_0 to fit a 65k context while keeping generation fast.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

|  | # Qwen 4 35B-A3B (IQ4_XS) — 63 t/s on RTX 4070 (12GB) | 
|  | - **Model:** [unsloth/Qwen4-35B-A3B-GGUF](https://huggingface.co/unsloth/Qwen4-35B-A3B-GGUF) (`Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf`) | 
|  | - **GPU:** RTX 4070 12GB (`10.8 GB` total VRAM used incl. Windows) | 
|  | - **RAM:** 32GB DDR5 (`24 GB` total RAM used; Windows 11 + browser = `10 GB`) | 
|  | - **Speed:** `63 t/s` generation speed on `llama.cpp` (1-shot in normal chat, no harness) | 
|  | ## Prompt | 
|  | ``` text | 
|  | Create a single-file HTML Three.js (three.min.js CDN) semi-realistic 3D room diorama (100vw x 100vh, overflow: hidden, full native resolution). Build procedural 3D models (MeshStandardMaterial with subtle procedural CanvasTexture surfaces) for a dimly lit room with a desk, PC tower, and monitor whose glowing CanvasTexture screen clearly reads "Qwen 4 35b moe". Through a large window, show drifting clouds, distant trees, and warm yellowish street lights that turn on at night. Use ACESFilmicToneMapping, PCFSoftShadowMap, FogExp2, and subtle mouse-parallax camera sway. Keep the interior dark, lit mainly by the monitor's cool PointLight glow and changing daylight/moonlight through the window. Add a compact translucent HUD with Time of Day and Auto-Speed sliders, plus weather buttons (Clear, Rain, Thunderstorm with lightning flashes, Snow). | 
|  | ``` | 
|  | ## `llama.cpp` Launch Command | 
|  | ``` bash | 
|  | llama-server -m "Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf" --no-mmproj -ngl 99 -fit off -np 1 -c 65536 -fa on --cache-type-k q8_0 --cache-type-v q8_0 --cache-ram 0 -t 8 -tb 12 -b 2048 -ub 512 -lm dio -ot "per_layer_token_embd=CPU" --n-cpu-moe 27 --spec-type draft-mtp --spec-draft-n-max 2 --jinja --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 --presence-penalty 0.0 --repeat-penalty 1.0 | 
|  | ``` | 
|  | ## `llama-swap` Config (`config.yaml`) | 
|  | ``` yaml | 
|  | healthCheckTimeout: 120 | 
|  | macros: | 
|  | "llama-base": > | 
|  | llama-cpp\llama-server.exe | 
|  | --host 127.0.0.1 | 
|  | --port ${PORT} | 
|  | -ngl 99 | 
|  | -fa on | 
|  | --cache-type-k q8_0 | 
|  | --cache-type-v q8_0 | 
|  | --jinja | 
|  | models: | 
|  | "qwen4-35b": | 
|  | ttl: 600 | 
|  | cmd: > | 
|  | ${llama-base} | 
|  | -m "C:\YourFolder\Qwen4-35B-A3B-UD-IQ4_XS-00001-of-00002.gguf" | 
|  | --no-mmproj | 
|  | -fit off | 
|  | -np 1 | 
|  | --cache-ram 0 | 
|  | -c 65536 | 
|  | -t 8 | 
|  | -tb 12 | 
|  | -b 2048 | 
|  | -ub 512 | 
|  | -lm dio | 
|  | -ot "per_layer_token_embd=CPU" | 
|  | --n-cpu-moe 27 | 
|  | --spec-type draft-mtp | 
|  | --spec-draft-n-max 2 | 
|  | --temp 1.0 | 
|  | --top-p 0.95 | 
|  | --top-k 20 | 
|  | --min-p 0.0 | 
|  | --presence-penalty 0.0 | 
|  | --repeat-penalty 1.0 | 
|  | ``` |
