Quick answer: Run Qwen 4 in Ollama with ollama run qwen4. The official library entry is Qwen4-35B-A3B with a 1M context window and text and image input. The default tag (qwen4:latest = qwen4:35b-a3b) is 36–37GB, so it suits 48GB+ machines or Macs with plenty of unified memory. On a 24GB GPU, the default tag usually won't fit cleanly. Use an Unsloth GGUF that keeps the engram on SSD instead (or llama.cpp / Unsloth Desktop directly). Update Ollama first. Older versions don't know the Qwen4 architecture.
"Is this too fancy to run in regular Ollama?" was one of the most upvoted beginner questions in the launch threads. It runs fine in Ollama. The catch is that Ollama's one-command convenience comes with a big default package, and Qwen 4's main memory trick (keeping a 20B lookup table on disk) is easier to control in other runtimes. This guide shows both paths and how to choose between them.
Sources: tag names and sizes come from the Ollama library page. The architecture comes from the Hugging Face model card. The alternatives come from Unsloth's docs and Hugging Face's launch post. Checked December 5, 2026.
Step 1: Install or update Ollama
Qwen 4 needs a recent Ollama build. If ollama run qwen4 returns an "unknown architecture" or similar error, update Ollama from ollama.com and try again. Check your version with:
ollama --version
Step 2: Pull and run Qwen 4
ollama run qwen4
That downloads the default tag and opens an interactive chat. To call it from code:
curl http://localhost:11434/api/chat \
-d '{"model": "qwen4", "messages": [{"role": "user", "content": "Hello!"}]}'
Or from Python:
from ollama import chat
response = chat(model="qwen4", messages=[{"role": "user", "content": "Hello!"}])
print(response.message.content)
Every Qwen 4 Ollama tag
| Tag | Size | Notes |
|---|---|---|
qwen4:latest | 36–37 GB | Same as 35b-a3b |
qwen4:35b-a3b | 36–37 GB | Default quantization |
qwen4:35b-a3b-q4_K_M | 37 GB | Explicit Q4_K_M |
qwen4:35b-a3b-nvfp4 | 36 GB | MLX build |
qwen4:35b-a3b-bf16 | 114 GB | Full precision |
qwen4:35b-a3b-gguf-bf16 | 114 GB | Full-precision GGUF |
qwen4:35b-a3b-mlx-bf16 | 114 GB | Full-precision MLX |
All tags list a 1M context window and text and image input. The library page says Qwen 4 supports vision, tools and thinking. It is licensed Apache-2.0.
When the 36GB tag won't fit
The default tag includes the model's ~20B-parameter engram table. Qwen 4 reads only 16 rows of that table per token, so other runtimes can leave it on your SSD and save 30%+ of memory. If your machine has less than ~40GB of RAM + VRAM, this is the route that works:
Option A: Unsloth GGUF in llama.cpp
llama serve -hf unsloth/Qwen4-35B-A3B-GGUF:UD-IQ4_XS \
--load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU
Pick the quant by memory: UD-IQ2_XXS for 12GB, UD-Q3_K_XL for 16GB, UD-IQ4_XS for 24GB, UD-Q4_K_XL for 32GB. Your llama.cpp build must include PR #33626 (merged December 3, 2026). The full sizing table is in Qwen 4 VRAM requirements.
Option B: Unsloth Desktop. Search for Qwen4-35B-A3B, download the quant it suggests, and it handles engram offloading, the expert cache and MTP for you.
Option C: ggml-org GGUF. Hugging Face's post lists official Q4_K_M, Q6_K and Q8_0 builds: llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M.
All three expose an OpenAI-compatible local server, so any tool that works with Ollama's OpenAI endpoint can point at them instead.
Use Qwen 4 with coding agents
Ollama's library page lists one-line launchers:
ollama launch claude --model qwen4
ollama launch opencode --model qwen4
ollama launch hermes --model qwen4
ollama launch openclaw --model qwen4
Tips for agent use:
- Leave thinking on for multi-step coding. Qwen's model card warns that low effort can cause more retries in multi-turn agent work.
- Give it room to answer. Qwen recommends large output budgets for agent tasks.
- Expect weaker results on very hard repos. On Qwen's own chart, the 35B trails Qwen3.8-Flash-Next on FrontierCode and Terminal-Bench. See Qwen 4 35B benchmarks.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| "unknown model architecture" | Old Ollama | Update Ollama |
| Out of memory on 24 GB | 36 GB default tag | Use an Unsloth GGUF with the engram on SSD |
| Very slow (single-digit tok/s) | Model spilling to RAM without an expert cache | Use llama.cpp with --moe-cache-mib, or a smaller quant |
| Endless repetition | Very small quant | min_p=0.01, presence_penalty=1.5 |
| Long wait before text appears | Reasoning at default high effort | Lower effort for quick replies |
Try it before you download 36GB
If you only want to see whether Qwen 4 is good at your kind of work, skip the download for now. Chat with Qwen 4 35B on glm5.app in your browser, upload an image if you like, and switch to Qwen 4 Max to see what the flagship does with the same prompt.
FAQ
What is the Ollama command for Qwen 4? ollama run qwen4. It pulls Qwen4-35B-A3B.
How big is Qwen 4 in Ollama? The default tag is 36–37GB. The full-precision bf16 tags are 114GB.
Is Qwen4-Max on Ollama? No. Qwen4-Max has no public weights. Ollama's qwen4 entry is the 35B-A3B model.
Does Qwen 4 support images in Ollama? Yes. The library lists text and image input for every tag.
Is there a Qwen4-27B Ollama tag? Not yet. Qwen has not released 27B weights. Track it in our Qwen4 release date page.
Next step
ollama run qwen4 is the fastest path if you have 40GB+ of memory to spare. On smaller machines, an Unsloth GGUF with the engram on SSD gets you the same model in far less memory. Either way, it is worth a 2-minute test in glm5.app chat first, so you know the model suits your work before you spend the bandwidth.
Sources
Checked December 5, 2026. Tag names and sizes may change.
- Ollama library, qwen4: https://ollama.com/library/qwen4
- Hugging Face model card, Qwen4-35B-A3B: https://huggingface.co/Qwen/Qwen4-35B-A3B
- Unsloth documentation, Qwen4 35B-A3B: How to Run Locally: https://unsloth.ai/docs/models/qwen4
- Hugging Face, Welcome Qwen 4: https://huggingface.co/blog/qwen4




