ToolNavs Find Useful AI Tools
Submit Sign in
Back to AI Q&A
How Do You Run Qwen4-35B-A3B Locally? Check the Quantization Tier and Context Length Before Judging 24GB of VRAM

How Do You Run Qwen4-35B-A3B Locally? Check the Quantization Tier and Context Length Before Judging 24GB of VRAM

AI Q&A • Admin • • 2 views

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 buildDisk spaceMemory neededBest for
UD-IQ3_XXSAbout 28.7GBAbout 18GB, short contextTight VRAM, first try
UD-IQ4_XSAbout 32GB24GB GPU or 24GB unified memoryThe starting pick for 24GB cards
UD-Q4_K_XLAbout 36.2GBNeeds more headroomTry once you have spare VRAM
Ollama default q4_K_MAbout 36–37GB32GB or moreDon'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

  1. Install a llama.cpp build that supports Qwen4 — release b12969 or newer; older builds don't recognize this architecture.
  2. 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.
  3. 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-moe to 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.

Recommended Tools

More