Hybrid Thinking Mode in Qwen3 8B
Alibaba Qwen3 8B is an 8.2B Apache 2.0 open-weight model with built-in hybrid thinking and non-thinking modes, strong coding performance and native tool calling. Its 36-layer GQA architecture (8 KV heads, 128 head_dim) fits comfortably inside an 8 GB GPU at Q4_K_M while delivering reasoning quality that previously required 14B–32B weights.
Run ollama run qwen3:8b to download the default 4-bit GGUF (~5.2 GB download, ~7.0 GB total VRAM at 8K context). Toggle thinking mode inline with /think or /no_think when you want faster direct answers without chain-of-thought tokens.
# Pull and launch Qwen3 8B (default 4-bit GGUF, ~5.2 GB download)
ollama run qwen3:8b
# Inside chat, toggle chain-of-thought reasoning per prompt:
# /think -> enable step-by-step reasoning for coding & math
# /no_think -> disable thinking tokens for fast direct answersfrom openai import OpenAI
client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
res = client.chat.completions.create(
model="qwen3:8b",
messages=[{"role": "user", "content": "/no_think Write a concise Python binary search."}],
)
print(res.choices[0].message.content)# Save as Modelfile, then run: ollama create qwen3-32k -f Modelfile
FROM qwen3:8b
PARAMETER num_ctx 32768
PARAMETER temperature 0.6Memory Needed per Quantization
| Quantization | Weights | Total at 8K | Fits on |
|---|---|---|---|
| FP16 | 16.4 GB | 18.9 GB | Mac Studio 128GB, Mac Studio 64GB, RTX 4090, RTX 5090 |
| Q4_K_M | 5.0 GB | 6.9 GB | Mac mini 24GB, Mac Studio 128GB, Mac Studio 64GB, RTX 4060, RTX 4060 Ti 16GB, RTX 4070, RTX 4090, RTX 5090 |
| Q5_K_M | 5.8 GB | 7.9 GB | Mac mini 24GB, Mac Studio 128GB, Mac Studio 64GB, RTX 4060, RTX 4060 Ti 16GB, RTX 4070, RTX 4090, RTX 5090 |
| Q8_0 | 8.7 GB | 10.9 GB | Mac mini 24GB, Mac Studio 128GB, Mac Studio 64GB, RTX 4060 Ti 16GB, RTX 4070, RTX 4090, RTX 5090 |
Apache 2.0 License Terms
Permissive Apache 2.0 license with full commercial use, fine-tuning and redistribution rights and no MAU ceiling. Review the official license at huggingface.co/Qwen/….