cd /news/large-language-models/running-qwen4-35b-a3b-on-two-rtx-309… · home › topics › large-language-models › article
[ARTICLE · art-182522] src=doug.sh ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Running Qwen4-35B-A3B on Two RTX 3090s with vLLM and llama.cpp

A hands-on test found that Qwen4-35B-A3B, released December 4, runs on two Ampere-generation RTX 3090 GPUs from the stock vllm/vllm-openai:qwen4 image at tensor parallel 2 with a 433K-token context, despite vLLM's announcement naming only Ada, Hopper and Blackwell cards. The author ran RadixArk's 43.67 GiB NVFP4 checkpoint and Qwen's FP8 checkpoint on vLLM, where vLLM's Marlin kernels keep weights quantized and compute at 16 bits because Ampere lacks native FP8 math, and also got a llama.cpp setup working. The setups fall back to NCCL communication because SymmMem and P2P are unavailable, and the author advises leaving out --kv-cache-dtype nvfp4, which needs Ada or newer.

recommendation

On Ampere cards, serve Qwen4-35B-A3B with --max-model-len auto and --kv-cache-dtype auto, skipping nvfp4 KV cache, and rely on Marlin kernels to compute FP8/NVFP4 weights at 16 bits.

more in playbook: Inference and self-hosting
by read11 min views5 publishedDec 5, 2026
Running Qwen4-35B-A3B on Two RTX 3090s with vLLM and llama.cpp
Image: Doug (auto-discovered)

Qwen4-35B-A3B came out December 4. vLLM runs it, but its announcement names Ada, Hopper, and Blackwell cards, and my RTX 3090s are Ampere, the generation before Ada. I wanted to see if the two in the six-GPU box could run it anyway.

They can, from the stock vllm/vllm-openai:qwen4 image, with a 433K-token context. That’s room for roughly 320,000 words at once. The rest of this post is the three setups I got working, two on vLLM and one on llama.cpp, with the commands for each and the numbers side by side.

What Ampere is missing 🔗 #

I’d assumed an unlisted card wouldn’t load the model at all. It loads, and every start logs what it can’t use. Capability 8.6 in the first line is CUDA’s number for Ampere, also written SM86.

SymmMemCommunicator: Device capability 8.6 not supported, communicator is not available.
Custom allreduce is disabled because your platform lacks GPU P2P capability or P2P test failed.
Your GPU does not have native support for FP8 computation but FP8 quantization is being used.
Weight-only FP8 compression will be used leveraging the Marlin kernel.

vLLM runs the model at tensor parallel 2 (TP2), which splits every layer across both cards, so the cards have to swap partial results. They do it through NCCL (NVIDIA’s GPU-to-GPU communication library) instead of SymmMem, a communicator vLLM has for newer cards, or P2P (peer-to-peer, one card copying straight into the other’s memory).

The P2P line isn’t about Ampere. You get it from the stock NVIDIA driver on a GeForce card of any generation, and the P2P post covers it.

Both checkpoints (the published weight files) I ran on vLLM are quantized, or stored in fewer bits. Qwen’s own is FP8 (8-bit floats), and RadixArk’s is NVFP4, NVIDIA’s 4-bit float format.

The last two lines mean Ampere can’t do FP8 math itself. vLLM’s Marlin kernels (compiled GPU routines) keep the weights quantized and compute at 16 bits. That covers NVFP4 too.

The KV (key-value) cache is the GPU memory holding what the model has already read. NVFP4’s format for it is the part that needs Ada or newer, so I’d leave --kv-cache-dtype nvfp4 out, though vLLM’s recipe has it. I didn’t test it.

NVFP4 on vLLM 🔗 #

NVFP4 was the easy one. The command comes from vLLM issue 71952, where someone was already running RadixArk’s checkpoint on two 3090s. I just added --max-model-len auto.

Download the checkpoint, which is 43.67 GiB:

hf download RadixArk/Qwen4-35B-A3B-NVFP4 --local-dir ~/models/qwen4-nvfp4

Then start the server from the stock image, which is 24.8 GB:

docker run -d \
  --name qwen4-vllm \
  --gpus all \
  --shm-size 16g \
  -p 8000:8000 \
  -v ~/models/qwen4-nvfp4:/models/qwen4:ro \
  -v ~/models/vllm-cache:/root/.cache \
  -v ~/models/vllm-cache/triton:/root/.triton \
  -e HF_HUB_OFFLINE=1 \
  -e VLLM_USE_RUST_FRONTEND=1 \
  vllm/vllm-openai:qwen4 \
  /models/qwen4 \
  --served-model-name qwen4-35b-a3b \
  --trust-remote-code \
  --tensor-parallel-size 2 \
  --max-model-len auto \
  --kv-cache-dtype auto \
  --attention-config.indexer_kv_dtype bf16 \
  --mamba-ssm-cache-dtype bfloat16 \
  --speculative-config '{"method":"mtp","num_speculative_tokens":3,"index_share_for_mtp_iteration":false}' \
  --max-num-batched-tokens 8192 \
  --max-num-seqs 64 \
  --gpu-memory-utilization 0.95 \
  --compilation-config '{"max_cudagraph_capture_size": 64}' \
  --enable-prefix-caching \
  --disable-flashinfer-autotune \
  --enable-auto-tool-choice \
  --tool-call-parser qwen4 \
  --reasoning-parser qwen4

Without --max-model-len auto, vLLM asks for the model’s full one million tokens and stops with a ValueError. That was my one failed start. With it, the server cut the context to the 433K tokens it had cache for and was ready in 107 seconds.

The weights take about 13 GiB a card with the vision encoder (the part that reads images) and the multi-token prediction (MTP) draft head loaded, and 12 without them. The draft head guesses a few tokens ahead for the model to keep or reject.

If you want a longer context, drop --speculative-config, which turns the draft head off. That frees enough for 612K tokens.

The .triton mount keeps compiled kernels between starts, so the second start skips the compile.

A chat request and a tool call came back right, and so did a code hidden in a 200K-token prompt. That’s all the quality testing I did, so I can’t tell you what these quantizations cost in answers.

FP8, the official checkpoint 🔗 #

Qwen’s own checkpoint is a tighter fit. The other two-3090 setup I found says “Qwen’s official checkpoints do not fit two 24 GB cards”, but the FP8 one does, with image input on or off.

It’s 56 GiB on disk. With image input off it puts about 18.4 GiB of weights on each card, against NVFP4’s 12 to 13, which leaves you about 1.4 GiB a card for cache.

It took one fix to start. By default vLLM plans for 256 requests at once (it calls them sequences), and each needs a block of state memory, the Mamba cache. I had room for 150: max_num_seqs (256) exceeds available Mamba cache blocks (150). Set --max-num-seqs yourself. I used 16.

Download the checkpoint:

hf download Qwen/Qwen4-35B-A3B-FP8 --local-dir ~/models/qwen4-fp8

Then start the server:

docker run -d \
  --name qwen4-vllm \
  --gpus all \
  --shm-size 16g \
  -p 8000:8000 \
  -v ~/models/qwen4-fp8:/models/qwen4:ro \
  -v ~/models/vllm-cache:/root/.cache \
  -v ~/models/vllm-cache/triton:/root/.triton \
  -e HF_HUB_OFFLINE=1 \
  -e VLLM_USE_RUST_FRONTEND=1 \
  vllm/vllm-openai:qwen4 \
  /models/qwen4 \
  --served-model-name qwen4-35b-a3b \
  --trust-remote-code \
  --enable-prefix-caching \
  --tensor-parallel-size 2 \
  --max-model-len auto \
  --max-num-seqs 16 \
  --kv-cache-dtype fp8 \
  --limit-mm-per-prompt '{"image":0,"video":0}' \
  --disable-flashinfer-autotune \
  --enable-auto-tool-choice \
  --tool-call-parser qwen4 \
  --reasoning-parser qwen4

It was ready in 71 seconds with a 230K-token context. By the end of benchmarking, each card was at 21.9 of 24 GiB.

--limit-mm-per-prompt turns image and video input off. Leave it out and the server still starts, and mine answered a question about an image, but the context drops to 146K tokens.

For more context, set the cache size yourself. --kv-cache-memory 2400M gave me 405K tokens. I checked that one with a 394K-token prompt and with 16 clients, which left each card at 22.9 of 24 GiB. I didn’t run the full benchmark on it.

An FP8 KV cache still works on Ampere, and you want it. A 600 MB cache held about 43K tokens as BF16 (16-bit floats) and about 80K as FP8. At 1,100 MB it was 91K and 171K.

The recipe’s --attention-config.indexer_kv_dtype fp8 puts one more cache in FP8: the indexer’s, a small attention pass that picks which earlier tokens the full attention reads. These cards can’t compile the kernel for that: type fp8e4nv not supported in this architecture. Leave the flag out or set bf16. The fix, which rejects fp8 there on cards older than Ada, merged after the image I pulled was pushed.

With FP8, MTP needs the cache sized by hand. Add --speculative-config and automatic sizing stops with Cannot auto-fit max_model_len: not enough GPU memory available to serve even a single token. vLLM’s log suggested a 2.2 GiB cache. That answered its health check and then ran out of memory on a 2K prompt. --kv-cache-memory 1400M held, with a 174K-token context.

llama.cpp with a Q4_K_M GGUF 🔗 #

llama.cpp was the boring one. It worked on the first launch and was ready in 13 seconds. GGUF is llama.cpp’s file format, and Q4_K_M is one of its 4-bit quantizations.

Download the three Q4_K_M files, which are 30.6 GiB together:

hf download ggml-org/Qwen4-35B-A3B-GGUF \
  --include "Qwen4-35B-A3B-Q4_K_M-*" \
  --local-dir ~/models/qwen4-gguf

Then start the server. The digest is the server-cuda tag from December 4, build 12977:

IMAGE=ghcr.io/ggml-org/llama.cpp@sha256:e401af28fa80f68225d6190cec7e7d4c2743bb14cbfa0ec201a36abf12a4a620

docker run -d \
  --name qwen4-llamacpp \
  --gpus all \
  -p 8000:8000 \
  -v ~/models/qwen4-gguf:/models:ro \
  "$IMAGE" \
  -m /models/Qwen4-35B-A3B-Q4_K_M-00001-of-00003.gguf \
  --alias qwen4-35b-a3b \
  --host 0.0.0.0 \
  --port 8000 \
  -ngl 999 \
  -fa on \
  --jinja \
  -c 262144 \
  -np 8 \
  -kvu

-c 262144 -np 8 -kvu gives you eight slots, llama.cpp’s word for requests served at once, that share one 262K-token cache.

All 41 layers fit on a single 3090 if you give it a smaller context. It’s the same flags with one card, a 115K-token context, and four slots:

docker run -d \
  --name qwen4-llamacpp \
  --gpus device=0 \
  -p 8000:8000 \
  -v ~/models/qwen4-gguf:/models:ro \
  "$IMAGE" \
  -m /models/Qwen4-35B-A3B-Q4_K_M-00001-of-00003.gguf \
  --alias qwen4-35b-a3b \
  --host 0.0.0.0 \
  --port 8000 \
  -ngl 999 \
  -fa on \
  --jinja \
  -c 114688 \
  -np 4 \
  -kvu

That loaded at about 23.2 GiB, and -c 131072 failed with cudaMalloc failed: out of memory.

Numbers on the same two cards 🔗 #

I ran five setups on the two cards, each card capped at 350 W: NVFP4 and FP8 with and without MTP, and llama.cpp. Every figure is one run.

Prefill is the server reading your prompt, and decode is it writing the answer, both in tokens per second (tok/s). Thinking was on, so decode counts reasoning tokens.

One request at a time:

Setup Context Prefill, 32K prompt First token, 125K prompt Decode
NVFP4, MTP 433K 8,253 tok/s 16 s 183 tok/s
NVFP4, no MTP 612K 8,588 tok/s 15 s 129 tok/s
FP8, no MTP 230K 7,027 tok/s 18 s 118 tok/s
FP8, MTP 174K 7,263 tok/s 18 s 172 tok/s
llama.cpp Q4_K_M 262K 4,453 tok/s 29 s 111 tok/s

NVFP4 prefills about twice as fast as llama.cpp, and stays near 8K tok/s from a 2K prompt to a 125K one. Two of the box’s Radeon AI PRO R9700s prefill this model at 11K to 13K tok/s, per the R9700 post.

MTP adds 42% to one request’s decode.

llama.cpp on one 3090 decoded at 115 tok/s, against 111 on two. The second card gets you context but no speed.

Many requests at once, in total tok/s:

Setup 1 client 4 8 16 Power at 8 Tokens per joule at 8
NVFP4, MTP 157 410 582 826 646 W 0.90
NVFP4, no MTP 125 380 620 923 625 W 0.99
FP8, no MTP 115 338 542 793 627 W 0.86
FP8, MTP 143 374 361 372 642 W 0.56
llama.cpp Q4_K_M 95 216 281 not run 448 W 0.63

With more clients MTP costs you: at 16, NVFP4 gave 923 tok/s without it and 826 with it.

FP8 with MTP stopped scaling at 4 clients. It gave about 370 tok/s at 4, 8, and 16, and the server didn’t have more than 5 requests running at once. I don’t know what limits it.

Host RAM 🔗 #

With tensor parallel, count host RAM as well as VRAM (the cards’ own memory). The model ships a 20.5 GB n-gram table, a lookup of two- and three-token sequences. vLLM runs one worker per card, and each pins (locks) its own copy in host RAM.

The container used between about 39 and 53 GiB across these configs, page cache included. llama.cpp reads the table from disk as needed and used about 4 GiB once loaded.

Which one I’d run 🔗 #

If you have two 3090s serving several clients or an agent, I’d run NVFP4 on vLLM with MTP. It has the best decode for one request, about twice llama.cpp’s prefill, and vision, and you don’t have to size the cache by hand. Drop MTP if you want the longer context or serve many clients.

For one 3090, or if you want to be serving in twenty seconds, use llama.cpp. I didn’t try either vLLM checkpoint on a single card, because the weights alone are about 25 GiB for NVFP4 and about 37 GiB for FP8.

I’d run FP8 only if you need Qwen’s own checkpoint. You get about half the context of NVFP4 with MTP, and a third of it with image input on.

I had help with this one. Claude ran the tests on the box and helped me draft this post. I read all the words and checked the numbers, so the mistakes are mine.

Sources 🔗 #

── more in #large-language-models 4 stories · sorted by recency
── more on @qwen4-35b-a3b 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/running-qwen4-35b-a3…] indexed:0 read:11min 2026-12-05 · —