Model datasheet · Qwen3
Qwen3 4B
SupersededSuperseded by Qwen3.5 4B, the same size one generation on. Kept as the record of what the previous generation scored: with thinking on, it reasoned like models twice its size, and it was the default answer for 8GB laptops.
- Vendor
- Alibaba
- Architecture
- Dense · 4B
- Context
- 32,768 tokens
- License
- Apache-2.0
- Released
- 2025-04-29
- Vision
- No
→ GGUF (llama.cpp / LM Studio / Ollama) → MLX (Apple Silicon)
Architecture, from its own config.json
36 layers · 36 full attention
32 attention heads over 8 KV heads (GQA 4:1), head dim 128 · dense feed-forward · vocabulary 151,936
Where the memory goes: weights by band above, plus a KV cache of 1.1GB at 8K · 4.5GB at 32K, plus the runtime's own working memory — dominated by the output projection over that vocabulary.
Inside one layer, from its own tensors
36 × full-attention layer
The green line down the right of each half is the residual: it leaves the spine above the norm, skips the operation entirely and rejoins at the +. Where attention is drawn open, q, k and v are scaled to their real output widths — a model that shares key and value heads across many query heads shows one wide box beside two narrow ones.
Around the stack: an embedding of 151,936 × 2,560, a final norm, and an output projection that reuses the embedding (tied weights).
On the norm names: despite what it is called, post_attention_layernorm is drawn after the residual add here, which is where this family applies it — it normalises the input to the feed-forward, not the output of attention. Models that carry a separate pre_feedforward_layernorm use it the other way, and are drawn that way.
§1 Characteristics by quantization band
— Not yet rated · contributions welcome —
Q4–Q5 — 4–5 bit
2.5GB weights · e.g. Q4_K_M , Q5_K_M , mlx-4bit + KV: 1.1GB at 8K · 4.5GB at 32K · 4.5GB at 128Kdata checked Aug 2026
- quant-degradation-community — KLD/perplexity delta vs bf16 @ Q4_K_M · aggregated · 2026-08-30
Editorial derivation: small models lose proportionally more at 4-bit.
data checked Aug 2026
- quant-degradation-community — KLD/perplexity delta vs bf16 @ Q4_K_M · aggregated · 2026-08-30
Editorial derivation: small loss at 4-bit.
data checked Aug 2026
- quant-degradation-community — community consensus @ Q4_K_M · aggregated · 2026-08-30
Editorial derivation: small loss at 4-bit.
data checked Aug 2026
- quant-degradation-community — community consensus @ Q4_K_M · aggregated · 2026-08-30
Editorial derivation: IF is not quant-sensitive.
data checked Oct 2026
- quant-degradation-community — editorial band derivation @ Q4_K_M · aggregated · 2026-10-04
Editorial derivation: carried from the EQ-Bench-anchored full band; creative writing is not quant-sensitive.
— Not yet rated · contributions welcome —
FP16 — full precision (fp16/bf16)
8GB weights · e.g. bf16 + KV: 1.1GB at 8K · 4.5GB at 32K · 4.5GB at 128Kdata checked Aug 2026
- vendor-model-card — AIME'24 (thinking mode) = 73.8 @ bf16 · vendor-reported · 2026-08-30
MATH-500: 97.0 thinking. Non-thinking drops to 25.0 — thinking mode is doing the lifting.
data checked Aug 2026
- vendor-model-card — LiveCodeBench v5 (thinking) = 54.2 @ bf16 · vendor-reported · 2026-08-30
Non-thinking: 21.3. Absent from Aider polyglot.
data checked Aug 2026
- vendor-model-card — BFCL v3 (thinking) = 65.9 @ bf16 · vendor-reported · 2026-08-30
Non-thinking: 57.6.
data checked Aug 2026
- vendor-model-card — IFEval strict prompt (thinking) = 81.9 @ bf16 · vendor-reported · 2026-08-30
data checked Aug 2026
- vectara-hallucination — HHEM hallucination rate % (lower is better) = 5.7 @ bf16 · aggregated · 2026-08-30
Grounds well; open-domain knowledge is thin for the whole family.
data checked Aug 2026
- vendor-model-card — RULER avg 4K–128K (thinking) = 83.5 @ bf16 · vendor-reported · 2026-08-30
85.2 non-thinking. Native window is 32K; 128K needs YaRN.
data checked Oct 2026
- eqbench-creative — EQ-Bench Creative Writing Longform score (0-100) = 17 @ bf16 · aggregated · 2026-10-04
Row qwen/qwen3-4b: the lowest Longform figure of any model on this site. Not on the short-form Creative Writing v3 board, so this longform figure is the only measurement; scored against Gemma 3 12B (41.8, scored 5) and Gemma 3 4B (34.4, scored 4) on the same board. Quant not stated by EQ-Bench (presumed full-precision API serving). Data file behind the Longform page on eqbench.com.
§2 Known issues & what fixes them
Falls into endless repetition loops under greedy decoding — the card itself warns against it — and quantized builds hit it hardest at this size.
Use the card's samplers (temp 0.6 / top_p 0.95 / top_k 20 thinking; 0.7 / 0.8 / 20 non-thinking); presence_penalty up to 1.5 if loops persist.
Evidence · 2 sources · community-consensus
- Qwen3-4B card ('DO NOT use greedy decoding') (vendor, 2026-08-30)
- llama.cpp issue: Qwen3 GGUF repetition (github, 2026-08-30)
The family's math/code tilt comes at the cost of world knowledge — a 4B slice of it especially. Expect confident wrong answers on open-domain facts.
Grounding fixes most of it — its HHEM consistency (94.3%) shows it respects provided text.
Evidence · 2 sources · community-consensus
- Family-wide knowledge-gap discussion (other, 2026-08-30)
- Qwen3 release analysis (SimpleQA weakness) (blog, 2026-08-30)