Skip to content
E
Educatum
Daily

Cloud Progress Sync

Sign in to Educatum

Sync your Daily AI/ML streaks, Stanford CS329Z progress, and study bookmarks across devices. Your existing browser progress will merge automatically.

🦙
Guest Alias
Alibaba QwenVerified Qwen/Qwen4-35B-A3B config.json ·

Qwen4-35B-A3B VRAM & GPU Requirements Calculator

Qwen4-35B-A3B requires 67.7 GiB in FP16, 33.8 GiB in FP8, and 20.6 GiB in GGUF Q4_K_M for GPU weights alone (with 20.48B layer-2 n-gram table (Host RAM / mmap) on Host RAM / mmap) (40L · 30 Gated DeltaNet + 10 Qwen Sparse Attn (16Q/2KV, 2K budget) · 36.3B GPU core (35B+ViT+MTP) + 20.5B Host-RAM n-gram table · 3.0B active MoE). At 8K context (batch=1, FP16 KV), KV-cache adds 0.16 GiB (31.5× smaller than MHA) plus 61.4 MiB/seq linear SSM state.

FP16 Inference (8K)
69.3 GiB
67.7 GiB weights
FP8 Weights + FP8 KV
35.4 GiB
33.8 GiB weights
GGUF Q4_K_M (8K)
22.3 GiB
20.6 GiB weights
32K KV-Cache (FP16)
0.63 GiB
31.5× vs MHA + 61.4 MiB SSM
Host-RAM / mmap Offload Split: 36.34B GPU-resident weights (67.7 GiB BF16 / 20.6 GiB Q4_K_M) + 20.48B 20.48B layer-2 n-gram table (Host RAM / mmap) (~38.1 GiB BF16 / ~11.6 GiB Q4_K_M in Host RAM or mmap; 105.8 GiB BF16 weights if forced all-on-GPU). On Apple Silicon Unified Memory, GPU & Host RAM share physical RAM unless SSD-mmap'd.

Can Your GPU or Mac Run Qwen4-35B-A3B? (8K Context, Batch=1)

Pre-computed fit verdict and estimated decode speed across RTX 4090, Apple Silicon Unified Memory, and NVIDIA H100/H200 clusters. Column headers show 1× GPU baseline (incl. 1.0 GiB runtime; multi-GPU rows add per-GPU NCCL overhead). Apple Silicon runs Q8_0 (Metal/llama.cpp) instead of datacenter FP8.

Hardware RigQ4_K_M (22.3 GiB)FP8 / Q8_0* (35.4 GiB FP8)FP16 (69.3 GiB)
1× RTX 4090 (23.9 GiB usable)FIT · ~230 tok/sOOM (-12G)OOM (-45G)
2× RTX 4090 (47.8 GiB usable)FIT · ~131 tok/sFIT · ~118 tok/sOOM (-24G)
Apple M4 Max (128 GiB Unified · 96 GiB GPU)FIT · ~145 tok/sQ8_0 FIT · ~97 tok/sFIT · ~57 tok/s
Apple M3 Ultra (256 GiB Unified · 192 GiB GPU)FIT · ~192 tok/sQ8_0 FIT · ~134 tok/sFIT · ~82 tok/s
1× H100 SXM (79.6 GiB usable)FIT · ~390 tok/sFIT · ~333 tok/sFIT · ~240 tok/s
4× H100 SXM (318.4 GiB usable)FIT · ~154 tok/sFIT · ~151 tok/sFIT · ~144 tok/s
8× H100 SXM (636.8 GiB usable)FIT · ~116 tok/sFIT · ~115 tok/sFIT · ~113 tok/s
8× H200 SXM (1,123.2 GiB usable)FIT · ~116 tok/sFIT · ~116 tok/sFIT · ~114 tok/s
vLLM Serve · 1× H100 (79.6 GiB)

Ready-to-run deployment commands for Qwen4-35B-A3B

vllm serve Qwen/Qwen4-35B-A3B --tensor-parallel-size 1 --trust-remote-code --reasoning-parser qwen4 --enable-auto-tool-choice --tool-call-parser qwen4 --max-model-len 8192 --gpu-memory-utilization 0.90

Sized at 69.3 GiB total BF16 VRAM (including CUDA/NCCL overhead) out of 79.6 GiB usable. Assumes 38.1 GiB 20.48B layer-2 n-gram table (Host RAM / mmap) stays on Host RAM / mmap.

llama.cpp GGUF Q4_K_M · Needs 22.3 GiB
llama-server -m /path/to/qwen4-35b-a3b-Q4_K_M.gguf -c 8192 -ngl 999 -fa on -ot per_layer_token_embd=CPU --load-mode mmap --lazy-mode on --jinja

With 20.5B n-gram table on Host RAM (~11.6 GiB), fits on a single RTX 4090 (23.9 GiB usable) at ~230 tok/s. Offloads the 20.5B n-gram embedding table to Host RAM/mmap; add --mmproj for image/video inputs.

Interactive Qwen4-35B-A3B VRAM & Roofline Simulator

1. Model & Workload

GQA · 56.82B/3B MoE

40L · 30 Gated DeltaNet + 10 Qwen Sparse Attn (16Q/2KV, 2K budget) · 36.3B GPU core (35B+ViT+MTP) + 20.5B Host-RAM n-gram table · 3.0B active MoE

Execution Mode
Weight Precision (Datacenter & GGUF)
KV:
8,192 tok
1 reqs

2. Target GPU / Mac Silicon

79.6 GiB Usable · 3.35 TB/s eff.
GPU Count (Tensor Parallel)
FITS IN VRAM (+10.3 GiB headroom)
69.3 / 79.6 GiB usable (87%)

Host-RAM offload active: ~38.1 GiB (20.5B 20.48B layer-2 n-gram table (Host RAM / mmap)) kept in Host RAM / mmap (toggle off to simulate all-on-GPU).

Total VRAM
69.3 GiB
Weights 67.7 GiB (FP16)
KV + SSM State
0.22 GiB
KV 0.16 + SSM 0.06 · 31.5×
Decode / User
~240.2 tok/s
HBM Bound
Cluster Output
~240 tok/s
AI 1.0 FLOP/B

VRAM Allocation vs. Hardware Capacity

Binary GiB (1 GiB = 2³⁰ B) · Usable VRAM excludes ECC/OS & per-GPU CUDA/NCCL buffers

Dashed line = Usable VRAM
Used: 69.3 GiB · Usable: 79.6 GiB (87%) 79.6 GiB Usable Weights: 67.7 GiBKV-Cache: 0.2 GiBSSM State: 0.1 GiBAct + CUDA: 1.4 GiB educatum.com/kv-cache

Decode Arithmetic Intensity Roofline

AI 1.0 vs Ridge 295 FLOPs/B
1416642561024 Ridge: 295 FLOPs/B · 989 TFLOPS Memory-Bandwidth Bound (1.0 FLOP/B) Arithmetic Intensity (FLOPs / Byte, log scale) educatum.com/kv-cache
Canonical URL stays clean; click Copy Shareable Link to share your exact slider config.
Qwen4-35B-A3B · KV_tok (10 full + 30 DeltaNet linear + FP8 indexer) = 20.3 KiB/tok (31.5× vs MHA) + 61.4 MiB/seq SSM state
Decode Step Read: 5.6 GiB active weights + 0.04 GiB KV (sparse 2048 cap) + 123 MiB SSM R/W → AI = 1.03 FLOPs/Byte (Memory-Bandwidth Bound; BW in decimal GB/s) · 38.1 GiB Host RAM (20.5B 20.48B layer-2 n-gram table (Host RAM / mmap))

Compare Other LLM VRAM Requirements

All 37 Models →

Frequently Asked Questions

Can 1× or 2× RTX 4090 (24 GiB / 48 GiB) run Qwen4-35B-A3B?

At 8K context (batch=1) in GGUF Q4_K_M, Qwen4-35B-A3B needs 22.3 GiB single-GPU VRAM (20.6 GiB weights with the 20.5B n-gram table offloaded to Host RAM/mmap). Single 23.9 GiB usable RTX 4090: Fits at ~230 tok/s. Dual 47.8 GiB usable (2× RTX 4090): Fits Q4_K_M cleanly (~131 tok/s TP).

Can an Apple M4 Max (128 GiB) Mac Studio / MacBook Pro run Qwen4-35B-A3B?

An Apple M4 Max 128 GiB reserves 96 GiB wired GPU memory by default. In GGUF Q4_K_M (22.3 GiB GPU wired at 8K, plus ~11.6 GiB mmap'd/host n-gram table sharing system RAM), it fits on M4 Max 128 GiB at ~145.0 tok/s.

How much KV-cache does Qwen4-35B-A3B use at 32K context?

Qwen4-35B-A3B uses GQA with hybrid attention (30 Gated DeltaNet linear + 10 Qwen Sparse Attention layers), giving a 31.5× KV-cache reduction vs standard MHA. At 32,768 context (batch=1, FP16 KV), KV-cache occupies 0.63 GiB plus 61.4 MiB/seq constant linear-attention recurrent state.

Try keywords like RoPE, FlashAttention, DPO, or Blind 75.