How to Run Qwen4-35B-A3B Locally: The Complete Guide
Most frontier AI models live behind an API: you send a prompt to someone else’s server and pay per token. Qwen4-35B-A3B is different. Released on December 4, 2026, it is the first open-weight model in Alibaba’s Qwen4 family, published under the Apache 2.0 licence with the weights free to download from Hugging Face and ModelScope. It reads text, images and video, reasons over a 1-million-token context window, and — according to its maker — runs on a single GPU once quantized. This guide explains what the model is, what hardware you actually need, and how to run it locally with llama.cpp, MLX, Transformers or a vLLM server, plus the hosted API option if you would rather not run it yourself.
What is Qwen4-35B-A3B?
Qwen4-35B-A3B is the first production model of the Qwen4 generation, the successor to the Qwen3 family. It follows Qwen4-Max, the flagship of the same generation, which launched on November 16 and is available only through an API. The 35B model is the open one: anyone can download the weights, run them on their own hardware, fine-tune them, and build commercial products on top of them, thanks to the permissive Apache 2.0 licence.
The name describes the shape of the model. It is a mixture-of-experts (MoE) design with about 35 billion main parameters, of which only about 3.8 billion are active for any given token. A further 20.5 billion parameters sit in a per-layer embedding table, bringing the total to roughly 56 billion. Like other MoE models, it keeps a large team of specialist sub-networks — 256 routed experts, eight of which switch on per token, plus one shared expert — and only the relevant few do the work on each step. That is why a model with tens of billions of parameters can answer at the cost of a much smaller one.
It is natively multimodal: text, images and video go in, and text comes out. The context window is 1 million tokens natively — about 1,048,576 tokens, to be exact — which means it can hold an entire codebase, a shelf of long documents, or hours of conversation in mind at once. Checkpoints are published in BF16, FP8, OMLX and GGUF formats, so there is a version for nearly every way of running a model.
The architecture, in plain terms
Three design choices define Qwen4, and all three are about making a long-context model cheap to run. First, the attention mechanism is a hybrid: three out of every four layers use Gated DeltaNet, a form of linear attention that updates a fixed-size memory as it reads each token, instead of keeping a growing record of everything it has seen. The fourth layer uses Qwen Sparse Attention, which lets the current token look back at individual tokens from anywhere in the context. A small indexer groups tokens in fours and picks the most relevant groups, so the model can reach back across a million tokens without reading all of them.
Second, information moves through the model along four parallel residual streams — four copies of each token’s representation, mixed by learned gates before every block and updated separately afterwards. Third, the second decoder layer carries a per-layer embedding table of 20.5 billion parameters: each token reads just 16 rows of it, eight encoding the last two tokens and eight encoding the last three, which gives the model a cheap way to remember exactly what came just before.
For images, a vision transformer reads pictures in 16-by-16 patches and merges each 2-by-2 group into a single visual token. For video, the processor samples two frames per second and groups consecutive frames into pairs. None of this is something you need to configure — it is the reason the model can take a screenshot or a short clip as part of a prompt and answer questions about it.
What hardware do you need?
The honest answer depends on which version of the weights you run. The full-precision BF16 download is over 100 GB — the 56 billion parameters at two bytes each — and serving it needs a data-centre card: Hugging Face’s own reference recipe runs it on a single NVIDIA H200 with 141 GB of memory. That is the server option, not the laptop option.
The laptop option is the quantized version. Qwen publishes GGUF quants at 4-bit, 6-bit and 8-bit precision, and its launch announcement says the model “runs on a single GPU when quantized.” It does not name a specific card, so treat that as the maker’s claim rather than a tested fact — but the 4-bit quant is a fraction of the full size, which puts it within reach of a good consumer graphics card and, with offloading, a well-equipped laptop. On Apple Silicon, the model runs through MLX, with the large embedding table offloaded to SSD when memory runs short.

Before you pick a route, decide what you want the model for. Chatting with documents and images, coding help, and agent-style work all run well on a quantized local copy. If you need the full-precision model at high speed for many users at once, you want the server setup — or the hosted API, which costs nothing to set up.
Option 1: llama.cpp — the quickest local start
The simplest way to run Qwen4-35B-A3B on your own machine is llama.cpp, which had day-0 support for the model. The 6-bit quant is a good starting point: better quality than the 4-bit version, still far smaller than full precision. One command starts a local server:
llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q6_K
For a chat session in the terminal instead, use:
llama cli -hf ggml-org/Qwen4-35B-A3B-GGUF:Q6_K
Two details are worth knowing. First, the model supports multi-token prediction, which llama.cpp can use for speculative decoding: add the draft-model flags and generation speeds up. Hugging Face reports a 22% speed increase on an Apple Silicon M5 with the 4-bit quant using three draft tokens:
llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M --spec-type draft-mtp --spec-draft-n-max 3
Second, the model has an adjustable reasoning effort — four levels, “xhigh”, “high”, “low” and “off”, defaulting to high. Higher effort means the model thinks longer before answering; lower effort answers faster but can fail and retry, which the model card warns can raise the total time a task takes. For quick questions, “low” is fine; for hard coding or maths problems, leave it on high.

Option 2: Apple Silicon with MLX
On a Mac, MLX is the native route. The model runs through oMLX, which uses custom Metal kernels for the sparse-attention and gated-residual parts of the architecture, and supports image input, multi-token prediction and offloading the embedding table to SSD. A 4-bit text-only version is available for the mlx-lm command-line tool:
mlx_lm.generate --model mlx-community/Qwen4-35B-A3B-4bit-text --prompt "Explain sparse attention like I am 5" --max-tokens 4096
You can change the reasoning effort by passing a chat-template setting — for example, setting it to “low” for faster, lighter answers. The model card also lists Ollama, Unsloth, mlx-vlm and LiteRT-LM as supporting the Qwen4 architecture, so if you already use one of those tools, check its model library for the current Qwen4 entry.
Option 3: Transformers in Python
If you work in Python, the Hugging Face Transformers library loads the model directly. The quickest path is the any-to-any pipeline:
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="Qwen/Qwen4-35B-A3B", processor="huggingface/Qwen4-35B-A3B-processor", device_map="auto")
messages = [{"role": "user", "content": "Who are you?"}]
outputs = pipe(messages, max_new_tokens=2048, return_full_text=False)
print(outputs[0]["generated_text"])
For finer control, load the model and processor with the auto classes — AutoModelForMultimodalLM and AutoProcessor — which lets you set the reasoning effort per request and pass images or video alongside text. The same chat-template call handles tool use too: you can hand the model a function, such as a weather lookup, and it will call it when the conversation needs it.
Option 4: Serve it with vLLM or SGLang
To share the model with a team or an application, run it as a server. Both vLLM and SGLang shipped dedicated Qwen4 support on launch day, and both expose an OpenAI-compatible API, so existing code written for OpenAI’s API works with only the base URL changed. The reference recipe serves the BF16 checkpoint on one NVIDIA H200:
docker run --gpus all --shm-size 16g -p 8000:8000 -v ~/.cache/huggingface:/root/.cache/huggingface -e HF_TOKEN vllm/vllm-openai:qwen4 --model Qwen/Qwen4-35B-A3B --trust-remote-code --max-model-len auto --kv-cache-dtype nvfp4 --enable-auto-tool-choice --tool-call-parser qwen4 --reasoning-parser qwen4
Hugging Face’s own benchmarks for this setup report about 330 tokens per second for a single request, and about 2,660 output tokens per second sustained across 64 concurrent requests. The SGLang recipe is similar and reports about 260 tokens per second for a single request. Both figures are the publisher’s own measurements, not independent tests — but they show the model is built for serving, not just for demos. Managed options exist too: the model is available on AWS SageMaker, Google Cloud’s Vertex AI platform, Hugging Face Inference Endpoints and the Dell Enterprise Hub.
The API option: Qwen Cloud
If you do not want to run anything yourself, the hosted API is live on Qwen Cloud under the model name qwen4-35b-a3b. Pricing is about $0.06 per million input tokens and $0.36 per million output tokens, varying slightly by region. The API allows up to 128,000 output tokens per request without thinking, and 256,000 with thinking enabled. That is the cheapest way to try the model — no download, no GPU — and a sensible first step before committing to a local setup.
What is it good at?
All the benchmark figures so far are Qwen’s own, published on the model card, and none has been independently reproduced yet — so read them as the seller’s claims. With that caveat, the headline result is striking: Qwen says the 35B model outperforms the dense Qwen3.8-27B and matches the much larger Qwen3.8-Flash-Next at roughly a third of the size. On the model card’s own charts, it leads the older 27B model on most of the tests shown, including DeepSWE, Terminal Bench 4.1, NL2Repo, Work360, APEX Agents and HealthBench Professional — a mix of coding, agentic and professional-knowledge tasks.
The launch demonstrations lean into the same strengths. Hugging Face’s team used the model with the Pi coding agent to build an animated introduction video, an educational slide deck and a real-time generated mountain-flight scene — all zero-shot, with the model picking up front-end and animation skills from examples. It is, in other words, aimed at the long, multi-step jobs that are becoming the real test of a modern model: coding, document work and agent tasks rather than short chat answers. Compared with GLM-5.4, the other recent open flagship, Qwen4-35B-A3B’s pitch is not a new transformer design but a practical one — a frontier-generation model you can actually download and run.
Fine-tuning it yourself
Because the weights are open, you can also train the model further. Hugging Face publishes a worked recipe using its TRL library: reinforcement learning with GRPO to teach the model to triage cyber-defence alerts and cite the evidence behind each decision. On twelve held-out test tasks, the base model passed four, an adapter trained for fifty updates passed six, and one trained for a hundred updates passed three — a reminder that more training is not always better, and that you should test checkpoints rather than assume the longest run wins.
The limits to keep in mind
Four caveats matter. First, every benchmark in this guide is Qwen’s own. Independent testing will only become possible now that the weights are public, and the numbers may move when others run them.
Second, the “runs on a single GPU” claim comes with no named card and no tested configuration in the announcement. The quantized versions are genuinely small enough for consumer hardware, but your mileage will depend on your GPU, your memory and how much of the million-token context you actually use — long contexts are hungry for memory, whatever the model.
Third, the hybrid attention design has sharp edges for some serving setups. Hugging Face notes, for example, that its SageMaker recipe disables LMCache because the hybrid attention layers are not supported by it. If you are building a production deployment, check the notes for your serving stack before assuming every optimisation works.
Fourth, the flagship of the family, Qwen4-Max, stays behind the API. The 35B model is the open one — capable, but not the most powerful Qwen4 that exists. That is the usual bargain with open-weight releases, and it is worth knowing before you compare it with closed flagships.
Even with those limits, this is one of the most useful open releases of the year: a current-generation model, free to download, that reads text, images and video, holds a million tokens in mind, and runs on hardware you can actually own. For anyone who has been waiting to run a frontier-generation model locally, the wait is over — the download is the easy part, and choosing the right setup for your machine is the rest.
Frequently asked questions
How do I run Qwen4-35B-A3B locally?
The quickest way is llama.cpp: run llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q6_K for a local server, or llama cli with the same model for a terminal chat. On a Mac, use MLX; in Python, use the Transformers library; to serve it to a team, use vLLM or SGLang. The weights are free under Apache 2.0 from Hugging Face.
How much VRAM does Qwen4-35B-A3B need?
It depends on the version. The full-precision BF16 weights are over 100 GB and need a data-centre card such as an NVIDIA H200. The 4-bit, 6-bit and 8-bit GGUF quants are far smaller — Qwen says the quantized model runs on a single GPU, though it names no specific card. A good consumer GPU handles the 4-bit quant; Apple Silicon Macs run it through MLX with the embedding table offloaded to SSD if needed.
Is Qwen4-35B-A3B free?
Yes. The weights are published under the Apache 2.0 licence, which allows free use, including commercial use. The only cost is your own hardware and electricity. If you prefer a hosted option, the Qwen Cloud API charges about $0.06 per million input tokens and $0.36 per million output tokens, varying by region.
How is Qwen4-35B-A3B different from Qwen4-Max?
Qwen4-Max is the flagship of the Qwen4 family and is available only through Alibaba’s API — its weights are not public. Qwen4-35B-A3B is the first open-weight Qwen4 model: smaller, with 35 billion main parameters against the flagship’s far larger size, but downloadable, runnable locally and free under Apache 2.0.
Can Qwen4-35B-A3B understand images and video?
Yes. It is natively multimodal: it accepts text, image and video inputs and produces text output. Images are read through a vision transformer, and video is sampled at two frames per second. You can ask it about a screenshot, a photo or a short clip as part of an ordinary prompt.