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

> vLLM lists Ada and newer GPUs for Qwen4-35B-A3B, but its stock image runs on two RTX 3090s: NVFP4 at 433K context, FP8 at 230K, plus the commands.

- URL: https://doug.sh/posts/qwen4-vllm-llamacpp-rtx-3090/
- Author: Doug Calobrisi
- Date: 2026-12-05
- Tags: linux, gpu, nvidia, llm, vllm, llama-cpp, qwen, self-hosted


Qwen4-35B-A3B came out December 4. vLLM runs it, but its
[announcement](https://vllm.ai/blog/2026-12-04-qwen4-35b-a3b) 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](/posts/six-gpus-one-x16-slot/) 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](#numbers-on-the-same-two-cards).

![Cartoon: a grey robot doorman in a peaked cap stands by a velvet rope, pointing at a clipboard guest list that reads Ada, Hopper, Blackwell, with a question mark over its head. Behind its back, two scuffed blue graphics cards labelled 3090, each with a strip of tape on one corner, stroll through a doorway under a sign reading Qwen4, and one of them waves. A person in an orange hoodie watches from the left with a coffee mug and raised eyebrows.](/images/qwen4-vllm-llamacpp-rtx-3090/not-on-the-list.png)

## 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](/posts/gpu-p2p-tensor-parallel/) 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](https://recipes.vllm.ai/Qwen/Qwen4-35B-A3B) has it. I didn't test it.

## NVFP4 on vLLM

NVFP4 was the easy one. The command comes from
[vLLM issue 71952](https://github.com/vllm-project/vllm/issues/71952), where someone was already
running [RadixArk's checkpoint](https://huggingface.co/RadixArk/Qwen4-35B-A3B-NVFP4) 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.

![Cartoon: a blue graphics card labelled 3090 stands on a fitting stool, swamped in a huge orange overcoat with sleeves down to the floor and a tag reading 1,048,576. It looks down at the coat, unimpressed, with one sweat drop. Next to it a grey robot tailor with a tape measure round its neck and a plaque reading auto holds up a small blue jacket on a hanger, tagged 433K. On the right a second card labelled 3090 already wears the same blue jacket, which fits, and gives a thumbs up.](/images/qwen4-vllm-llamacpp-rtx-3090/too-much-context.png)

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](https://github.com/lulakien/qwen4-35b-a3b-2x3090) 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.

![Cartoon: a grey robot waiter in a bow tie, with a plaque reading vLLM, cheerfully wheels in a hand truck stacked with a tall, wobbling tower of orange chairs, tagged 256. Facing it, a blue graphics card labelled 3090 in a blue jacket holds up one hand to stop it and a small sign reading 16, with a sweat drop and a worried look. Behind that card, a second card labelled 3090 sits smiling at a small round wooden table with three blue chairs.](/images/qwen4-vllm-llamacpp-rtx-3090/too-many-seats.png)

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](https://github.com/vllm-project/vllm/pull/71748), 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.

![Bar chart headed Qwen4-35B-A3B on two RTX 3090s, with four groups of four bars, each group on its own scale. The setups are NVFP4 with MTP, NVFP4 without MTP, and FP8 without MTP on vLLM in blue, and llama.cpp Q4_K_M in grey. Context in tokens: 433,152, 611,712, 230,208, and 262,144. Prefill on a 32k prompt in tok/s: 8,253, 8,588, 7,027, and 4,453. Decode for one stream at 2k context in tok/s: 183.0, 128.5, 117.7, and 111.1. Total with 8 clients in tok/s: 581.6, 620.3, 541.5, and 280.9. A note reads one run each, both cards at a 350 W limit, FP8 is text only.](/images/qwen4-vllm-llamacpp-rtx-3090/four-setups.svg)

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](/posts/qwen4-35b-a3b-r9700-benchmarks/).

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

- [vLLM's Qwen4-35B-A3B launch post](https://vllm.ai/blog/2026-12-04-qwen4-35b-a3b), the supported GPU list
- [vLLM recipe for Qwen4-35B-A3B](https://recipes.vllm.ai/Qwen/Qwen4-35B-A3B), the serving flags by hardware
- [vLLM issue 71952](https://github.com/vllm-project/vllm/issues/71952), the baseline NVFP4 command for two RTX 3090s and the FP8 indexer crash on SM86
- [vLLM PR 71748](https://github.com/vllm-project/vllm/pull/71748), the fix that rejects the FP8 indexer cache below SM89 (Ada)
- [RadixArk/Qwen4-35B-A3B-NVFP4](https://huggingface.co/RadixArk/Qwen4-35B-A3B-NVFP4), the 4-bit checkpoint
- [Qwen/Qwen4-35B-A3B-FP8](https://huggingface.co/Qwen/Qwen4-35B-A3B-FP8), the official FP8 checkpoint
- [ggml-org/Qwen4-35B-A3B-GGUF](https://huggingface.co/ggml-org/Qwen4-35B-A3B-GGUF), the Q4_K_M files
- [Hugging Face discussion 69](https://huggingface.co/Qwen/Qwen4-35B-A3B/discussions/69) and [its repo](https://github.com/lulakien/qwen4-35b-a3b-2x3090), a patched vLLM with a custom 4-bit checkpoint on two RTX 3090s

