Qwen4-35B-A3B can run locally, and 24GB of VRAM is a workable starting point — but don't pull the default setup: the official BF16 weights are 114GB, far more than a home GPU can hold. Use a 4-bit quantized GGUF build, keep the 20-billion-parameter n-gram embedding table in system memory or on disk, start with a short context, and lengthen it gradually. The model was released on December 4 under Apache 2.0, with 35 billion total parameters, about 3 billion active per token, and a native context window of 1 million tokens.
Check the quantization tier before downloading
| Quantized build | Disk space | Memory needed | Best for |
|---|---|---|---|
| UD-IQ3_XXS | About 28.7GB | About 18GB, short context | Tight VRAM, first try |
| UD-IQ4_XS | About 32GB | 24GB GPU or 24GB unified memory | The starting pick for 24GB cards |
| UD-Q4_K_XL | About 36.2GB | Needs more headroom | Try once you have spare VRAM |
| Ollama default q4_K_M | About 36–37GB | 32GB or more | Don't use directly on a 24GB machine |
Whether your VRAM is enough depends on the quantization tier plus context length, not total parameters. On a 24GB card, UD-IQ4_XS with an 8K context is the safe start; measure usage at 8K before lengthening the window. 12GB and 16GB cards aren't entirely out of the question either: llama.cpp can keep some expert layers in system RAM — slower, but it can stretch the window to 256K or even 512K.
Get it running in three steps
- Install a llama.cpp build that supports Qwen4 — release b12969 or newer; older builds don't recognize this architecture.
- Start the server with Unsloth's GGUF, using UD-IQ4_XS, a context of 8192, and the embedding table offloaded to the CPU:
llama-server -hf unsloth/Qwen4-35B-A3B-GGUF:UD-IQ4_XS --ctx-size 8192 --no-mmproj -ot per_layer_token_embd=CPU. - Run a round of Q&A first to confirm it answers, then lengthen the context step by step; if VRAM runs short, add
--n-cpu-moeto move more expert layers into memory, or drop down a quantization tier.
Three pitfalls to watch. First, don't cram the embedding table into VRAM: it takes about 11GB, and keeping it in memory or reading it from disk on demand is the key to saving VRAM. Second, the KV cache is about 20KiB per token, so a full 1-million-token window needs roughly another 20GB — don't max it out in one go. Third, Ollama's default tags need more than 36GB, so a 24GB machine can't pull them directly; check the tag size first.
If you don't want to wrestle with hardware, skip local deployment: Alibaba Cloud's API charges about $0.06 per million input tokens — try it in the cloud first, and only buy a GPU once the model proves useful. The flagship Qwen4-Max from the same family takes a different path: How to use Qwen4-Max on Together AI covers its free allowance and calling methods, while Qwen4-Max officially released lists its 2.4T parameters and million-token context — don't compare the two versions as if they were the same thing.