What Qwen4-35B-A3B is and why its MoE layout matters
Released on December 4, 2026 under the Apache 2.0 license, Qwen4-35B-A3B (Qwen/Qwen4-35B-A3B) is Alibaba Qwen's ultra-sparse multimodal Mixture-of-Experts model supporting text, image, and video inputs across a native 1,048,576-token (1M) context window. It interleaves Gated DeltaNet linear attention with Qwen Sparse Attention to keep long-context memory growth manageable.
Understanding the parameter breakdown prevents hardware sizing mistakes:
- 35B core MoE backbone with only ~3B active parameters per generated token (giving 3B-class inference speed alongside 35B MoE knowledge).
- ~20B per-layer n-gram embedding table (Engram) plus a 2B Multi-Token Prediction (MTP) speculative decoding module (~56B-57B total parameters in source BF16 checkpoints).
- Because Ollama and
llama.cppmemory-map (mmap) or offload that 11.5-21.8 GB n-gram table to NVMe SSD or system RAM, only the core backbone and active experts need to sit in GPU VRAM.
Qwen4-35B-A3B API pricing & benchmark snapshot
| Metric | Verified Value | Notes / Source |
|---|---|---|
| API Input (Intl) | $0.06 / 1M tokens | Alibaba Cloud Model Studio (Official) |
| API Output (Intl) | $0.36 / 1M tokens | Alibaba Cloud Model Studio (Official) |
| Cached Input Read (Intl) | $0.003 / 1M tokens | 95% cache hit discount (explicit write $0.075 5m / $0.12 1h) |
| Intelligence Index v5 | 25 | third-party (Artificial Analysis) |
| DeepSWE v1.1 | 61.8% | Coding agent suite (Official / Model Card) |
| Context & License | 1,048,576 tokens · Apache 2.0 | Hugging Face Qwen/Qwen4-35B-A3B |
Compare these numbers against heavier MoEs in our LLM API pricing table or model monthly costs in the token cost calculator.
GGUF quantization sizes and actual VRAM requirements
Choosing the right GGUF quant for Qwen4-35B-A3B depends on separating total disk size from resident GPU VRAM (thanks to n-gram SSD/RAM offloading):
| Format / Quant | Total Size on Disk | Resident VRAM (Core + Active Experts) | Recommended Hardware |
|---|---|---|---|
| GGUF Q4_K_M / UD-Q4_K_XL | ~36.0 - 37.0 GB | ~21.9 - 25.0 GB (n-gram table on NVMe/RAM) | 24 GB GPU (RTX 3090 / 4090) + fast NVMe SSD, or 32-48 GB Mac |
| GGUF Q8_0 / UD-Q8_K_XL | ~59.4 - 63.0 GB | ~40.5 - 42.0 GB | 48 GB - 64 GB VRAM (L40S / RTX 6000 / 64 GB Unified Memory) |
| FP8 (Qwen/Qwen4-35B-A3B-FP8) | ~60.2 GB | ~60+ GB (full residency w/o offload) | 1x 80 GB A100/H100 or 2x 48 GB GPUs |
| BF16 (Qwen/Qwen4-35B-A3B) | ~114 GB | ~114+ GB | 2x 80 GB A100/H100 |
Quant selection rule: Pick Q4_K_M (or unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_XL) when targeting a single 24 GB RTX 4090 / 3090 — keep 32K context (-c 32768) and place the n-gram embeddings on PCIe Gen4/5 NVMe or DDR5 host RAM. Step up to Q8_0 on a 48 GB L40S or 64 GB Mac Studio if you want near-lossless coding and tool-calling precision without dropping to FP8 multi-card setups.
Three ways to run Qwen4-35B-A3B locally (Ollama, llama.cpp, vLLM)
1. Ollama (simplest desktop setup)
Make sure Ollama is updated to a build supporting the Qwen4 architecture and n-gram offloading:
ollama run qwen4:35b-a3b
# Or pull explicit Q4_K_M tag:
ollama run qwen4:35b-a3b-q4_K_M
2. llama.cpp (llama-server with remote GGUF & Flash Attention)
Run an OpenAI-compatible local server directly from Hugging Face GGUF weights:
llama-server -hf unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_XL \
-ngl 999 \
-c 32768 \
--fa on \
--jinja
For 48-64 GB GPUs or Unified Memory systems, swap :UD-Q4_K_XL for :UD-Q8_K_XL and raise -c toward 65536 or 131072 as VRAM allows.
3. vLLM (production FP8 serving with MTP speculative decoding)
For high-concurrency multi-user serving with prefix caching and Multi-Token Prediction (MTP) enabled:
docker run --gpus all \
--privileged --ipc=host -p 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 \
--kv-cache-dtype nvfp4 \
--enable-auto-tool-choice \
--tool-call-parser qwen4 \
--reasoning-parser qwen4 \
--speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":true}'
Self-hosted cost vs. Alibaba Cloud API ($0.06 / $0.36)
Should you rent GPUs to self-host Qwen4-35B-A3B or simply pay $0.06 input / $0.36 output per 1M tokens via API? Using our transparent hourly-GPU formula $/1M tokens = (GPU $/hr / (Sustained tok/s * 3,600)) * 1,000,000 with verified RunPod rates (2026-12-05):
- Single-stream RTX 4090 (RunPod Community $0.34/hr) sustaining
100 tok/s(0.36M tok/hr): $0.94 per 1M tokens (or $2.47 / 1M on RunPod Secure at$0.89/hr). That is 2.6x to 6.8x more expensive than paying$0.36per 1M output tokens on Alibaba Cloud! - Batched vLLM throughput on RTX 4090 ($0.34/hr Community / $0.89/hr Secure) sustaining
500 tok/saggregate (1.8M tok/hr): $0.19 per 1M tokens (Community) or $0.49 per 1M tokens (Secure). - 48 GB L40S ($1.09/hr RunPod Secure) running Q8/FP8 batched at
600 tok/s(2.16M tok/hr): $0.50 per 1M tokens.
Bottom line: For intermittent traffic or low concurrency, the $0.06 / $0.36 API is almost impossible to beat on price. Self-hosting Qwen4-35B-A3B makes financial sense only when you hold sustained batched traffic above ~400-500 tok/s, already own a 24GB RTX 4090 / Mac workstation, or require strict local data privacy. See how it compares against other tiers in our best open source LLMs by VRAM guide or step up to MiniMax M4 and Amazon Ergo LLM when you need larger coding capacity.