Qwen4-35B-A3B vs Qwen3.8-27B
| Feature | Qwen4-35B-A3B | Qwen3.8-27B |
|---|---|---|
| Type | Mixture of experts | Dense |
| Parameters | 35B, plus 20B n-gram table and 2B drafting head | 27B |
| Used per token | 3B | 27B |
| Context | 1,048,576 tokens | 262,144 tokens, extensible to 1,000,000 |
| Input | Text, images, video | Text, images, video |
| 4-bit file (Q4_K_M) | 36 GB | 19.4 GB |
| 8-bit file (Q8_0) | 59.4 GB | 28.6 GB |
| Reasoning effort | xhigh, high (default), low, off | xhigh (default), medium, low |
| Licence | Apache 2.0 | Apache 2.0 |
From Qwen's cards for Qwen4-35B-A3B and Qwen3.8-27B, and the files in llama.cpp's own builds. Qwen4 files are bigger than the model needs in GPU memory, because they include the n-gram table.
Qwen4 on Our GPU Servers
Based on Unsloth's figures of 21 to 25 GB for 4-bit weights and 41 GB for 8-bit with the n-gram table out of GPU memory. Longer contexts and more users need more.
| Plan | GPU | Total GPU memory | System memory | Qwen4-35B-A3B | Price |
|---|---|---|---|---|---|
| Intel Core Ultra 9 285K w/ NVIDIA Tesla P4 | NVIDIA Tesla P4 · 8 GB | 8 GB | 192 GB | 4-bit, experts on the CPU | $589.00/mo |
| NVIDIA DGX Spark | NVIDIA DGX Spark · 128 GB | 128 GB | 128 GB | 8-bit on the GPU | $609.00/mo |
| AMD EPYC 7443P w/ NVIDIA RTX 3090 | NVIDIA RTX 3090 · 24 GB | 24 GB | 256 GB | A smaller 4-bit build on the GPU | $659.00/mo |
| AMD Ryzen 9 9950X w/ NVIDIA RTX 3050 | NVIDIA RTX 3050 · 6 GB | 6 GB | 192 GB | 4-bit, experts on the CPU | $699.00/mo |
| AMD Dual EPYC 7702 w/ NVIDIA RTX 3050 | NVIDIA RTX 3050 · 6 GB | 6 GB | 256 GB | 4-bit, experts on the CPU | $749.00/mo |
| AMD Ryzen 9 9950X w/ NVIDIA RTX 5090 | NVIDIA RTX 5090 · 32 GB | 32 GB | 64 GB | 4-bit on the GPU | $789.00/mo |
| AMD Ryzen 9 9950X w/ NVIDIA RTX 5090 | NVIDIA RTX 5090 · 32 GB | 32 GB | 96 GB | 4-bit on the GPU | $829.00/mo |
| AMD Dual EPYC 7702 w/ NVIDIA RTX 5070 | NVIDIA RTX 5070 · 12 GB | 12 GB | 256 GB | 4-bit, experts on the CPU | $859.00/mo |
| AMD EPYC 7702 w/ 4x NVIDIA RTX 3090 | 4× NVIDIA RTX 3090 · 24 GB each | 96 GB | 128 GB | 8-bit on the GPU | $929.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 16GB | 4× NVIDIA V100 · 16 GB each | 64 GB | 128 GB | 8-bit on the GPU | $1,059.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 32GB | 4× NVIDIA V100 · 32 GB each | 128 GB | 128 GB | 8-bit on the GPU | $1,059.00/mo |
| AMD EPYC 7443P w/ 4x NVIDIA V100 | 4× NVIDIA V100 | — | 256 GB | — | $1,189.00/mo |
| Intel Dual Xeon Platinum 8260 w/ 8x NVIDIA V100 | 8× NVIDIA V100 · 32 GB each | 256 GB | 1 TB | 8-bit on the GPU | $1,319.00/mo |
| 2x NVIDIA DGX Spark | 2× NVIDIA DGX Spark · 128 GB each | 256 GB | 256 GB | 8-bit on the GPU | $1,449.00/mo |
| AMD EPYC 9B14 w/ 2x NVIDIA RTX 5090 | 2× NVIDIA RTX 5090 · 32 GB each | 64 GB | 384 GB | 8-bit on the GPU | $2,639.00/mo |
| AMD EPYC 9355 w/ NVIDIA RTX PRO 6000 | NVIDIA RTX PRO 6000 · 96 GB | 96 GB | 768 GB | 8-bit on the GPU | $2,639.00/mo |
| AMD EPYC 9254 w/ 4x NVIDIA RTX 5090 | 4× NVIDIA RTX 5090 · 32 GB each | 128 GB | 384 GB | 8-bit on the GPU | $3,819.00/mo |
Qwen4 Without a GPU
With 3 billion parameters read per token, Qwen4-35B-A3B is one of the more practical models for a processor. The table adds 8 GB for the system and the conversation to each file size and compares it with the largest memory option of each server.
| Server | Memory | 4-bit | 8-bit | From |
|---|---|---|---|---|
| AMD Ryzen 5 7600 | 32 GB | Too large | Too large | $139.00/mo |
| AMD Ryzen 5 9600X | 32 GB | Too large | Too large | $199.00/mo |
| AMD EPYC 4245P | 32 GB | Too large | Too large | $199.00/mo |
| Intel Xeon E3-1270 v5 | 64 GB | Fits | Too large | $79.00/mo |
| AMD Ryzen 9 5950X | 128 GB | Fits | Fits | $399.00/mo |
| Intel Core Ultra 9 285K | 128 GB | Fits | Fits | $399.00/mo |
| AMD Ryzen 9 7950X | 128 GB | Fits | Fits | $479.00/mo |
| AMD EPYC 4585PX | 128 GB | Fits | Fits | $849.00/mo |
| AMD Ryzen 9 9950X | 192 GB | Fits | Fits | $349.00/mo |
| AMD EPYC 9B14 | 192 GB | Fits | Fits | $1,189.00/mo |
| AMD Dual EPYC 7502 | 256 GB | Fits | Fits | $529.00/mo |
| AMD EPYC 9334 | 256 GB | Fits | Fits | $829.00/mo |
| AMD EPYC 9754S | 256 GB | Fits | Fits | $1,319.00/mo |
| AMD Dual EPYC 9174F | 384 GB | Fits | Fits | $1,319.00/mo |
| AMD Dual EPYC 7702 | 512 GB | Fits | Fits | $869.00/mo |
| AMD EPYC 7443P | 512 GB | Fits | Fits | $969.00/mo |
| AMD EPYC 9455P | 512 GB | Fits | Fits | $999.00/mo |
| AMD Ryzen Threadripper 9960X | 512 GB | Fits | Fits | $1,269.00/mo |
| AMD EPYC 9455 | 512 GB | Fits | Fits | $2,299.00/mo |
| AMD EPYC 9254 | 768 GB | Fits | Fits | $1,189.00/mo |
| AMD Ryzen Threadripper 9970X | 768 GB | Fits | Fits | $3,289.00/mo |
| AMD Dual EPYC 7443 | 1 TB | Fits | Fits | $519.00/mo |
| AMD EPYC 9275F | 1 TB | Fits | Fits | $929.00/mo |
| AMD Dual EPYC 7742 | 1 TB | Fits | Fits | $1,059.00/mo |
| AMD EPYC 9355P | 1 TB | Fits | Fits | $2,109.00/mo |
| AMD EPYC 9755 | 1 TB | Fits | Fits | $2,109.00/mo |
| AMD Ryzen Threadripper 7960X | 1 TB | Fits | Fits | $3,159.00/mo |
| AMD Dual EPYC 9B14 | 1.5 TB | Fits | Fits | $6,059.00/mo |
| AMD Dual EPYC 7H12 | 2 TB | Fits | Fits | $2,639.00/mo |
| AMD Dual EPYC 7763 | 4 TB | Fits | Fits | $3,949.00/mo |
1. Run Qwen4 With llama.cpp
Qwen4 support was merged into llama.cpp on December 3, 2026, so use a current build. The project's installer sets up the llama command:
curl -LsSf https://llama.app/install.sh | sh llama serve --list-devices # your GPU should be listed openssl rand -hex 24 > ~/.llm-key # your API key llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M \ -c 65536 --host 127.0.0.1 --port 8080 \ --api-key "$(cat ~/.llm-key)" \ --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0
- The n-gram table: by default llama.cpp reads tables like this from disk on demand (
--lazy-mode auto). A fast NVMe drive helps. To hold it out of GPU memory explicitly, Unsloth adds-ot per_layer_token_embd=CPU. - A small GPU: add
--n-cpu-moe 40to keep the experts of all 40 layers in system memory, then lower the number until the GPU is nearly full. - Faster answers: add
--spec-type draft-mtp --spec-draft-n-max 3to turn on the built-in drafting head, as Hugging Face's Qwen4 post suggests.
The server answers on /v1/chat/completions and has a chat page at the same address. Reach it from your computer with ssh -L 8080:127.0.0.1:8080 you@203.0.113.10.
2. Serve Qwen4 to Many Users With vLLM
vLLM's Qwen4 recipe uses its own Docker image. The FP8 version puts 39.7 GB on the GPU and the n-gram table in 20.5 GB of system memory; one RTX PRO 6000 is among the recipe's configurations. With the NVIDIA driver and Container Toolkit installed:
docker run -d --name qwen4 --restart unless-stopped \ --gpus all --ipc=host -p 127.0.0.1:8000:8000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -e VLLM_USE_RUST_FRONTEND=1 \ vllm/vllm-openai:qwen4 Qwen/Qwen4-35B-A3B-FP8 \ --trust-remote-code --enable-prefix-caching \ --tensor-parallel-size 1 --max-model-len auto \ --disable-flashinfer-autotune \ --kv-cache-dtype nvfp4 --attention-config.indexer_kv_dtype fp8 \ --enable-auto-tool-choice --tool-call-parser qwen4 --reasoning-parser qwen4 \ --api-key "$(cat ~/.llm-key)"
--max-model-len auto uses the full context when memory allows and otherwise lowers it to fit. --trust-remote-code runs code from the model's repository, so download only from Qwen. For HTTPS in front, see serving an LLM API.
3. Run Qwen3.8-27B With Ollama or vLLM
The quickest start is Ollama, an 18 GB download:
curl -fsSL https://ollama.com/install.sh | sh ollama run qwen3.8:27b
On an RTX 5090, vLLM's recipe has tested settings. Two cards hold the FP8 version with its full 262,144-token context; one card holds a 4-bit build at a shorter context:
# two RTX 5090s vllm serve Qwen/Qwen3.8-27B-FP8 \ --tensor-parallel-size 2 --max-model-len 262144 --kv-cache-dtype fp8 \ --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)" # one RTX 5090 vllm serve Inferact/Qwen3.8-27B-NVFP4 \ --max-model-len 32768 --kv-cache-dtype fp8 --enforce-eager \ --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder \ --host 127.0.0.1 --api-key "$(cat ~/.llm-key)"
On a single card, the recipe found that --enforce-eager decides whether it starts: without it, startup ends in torch.OutOfMemoryError: Tried to allocate 784.00 MiB while capturing CUDA graphs, and changing --gpu-memory-utilization does not help. More fixes in fixing CUDA out of memory.
Reasoning Effort and Settings
- Sampling, thinking on:
temperature=1.0,top_p=0.95,top_k=20. Thinking off:temperature=0.7,top_p=0.80,top_k=20,presence_penalty=1.5. Qwen recommends the same for both models. - Effort: send
reasoning_effortwith the request. Qwen warns that in agent work a lower effort can take longer overall, because of failed attempts and retries. - A chat interface: point Open WebUI at Ollama or at the OpenAI-compatible address above.
- Is Qwen4 on Ollama? Qwen's card links to a page in Ollama's library, but that page was not live when we checked on December 4, 2026. Until it is, use llama.cpp.
Qwen, NVIDIA, GeForce and RTX are trademarks of their respective owners. Virteche is not affiliated with or endorsed by them. Details about their products come from their public documentation as of the date at the top of this guide.