Qwen 3#
The third generation of Alibaba’s Tongyi Qwen models (released April 2025). It supports a hybrid thinking mode and spans parameter sizes from 0.6B to 235B.
Model Specs#
| Model | Parameters | Type | Notes |
|---|---|---|---|
| Qwen3-235B-A22B | 235B (22B active) | MoE | Flagship model |
| Qwen3-32B | 32B | Dense | Balances performance and cost |
| Qwen3-14B | 14B | Dense | Mid-size |
| Qwen3-8B | 8B | Dense | Lightweight and efficient |
| Qwen3-4B | 4B | Dense | On-device deployment |
| Qwen3-1.7B | 1.7B | Dense | Ultra-lightweight |
| Qwen3-0.6B | 0.6B | Dense | Minimal use cases |
Key Features#
Hybrid Thinking Mode#
- Thinking mode: reasons deeply before answering (similar to o1), suited to complex problems
- Non-thinking mode: fast responses, suited to simple conversations
- Switch with
/thinkor/no_think
MoE Architecture (235B)#
- 235B total parameters, only 22B active per inference
- Inference cost close to a 22B Dense model
- Quality close to much larger models
Quick Start#
Transformers#
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Qwen/Qwen3-8B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
messages = [{"role": "user", "content": "What is quantum computing?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
vLLM Deployment#
vllm serve Qwen/Qwen3-8B --max-model-len 8192
Ollama#
ollama run qwen3:8b