# Qwen3 (4B)

> Mid-size dense Qwen3 model used here as a clean baseline against SmolLM3 and Tiny Aya.

| Property | Value |
| --- | --- |
| Lab | Alibaba Cloud (China) |
| Released | 2025-04-28 |
| Decoder type | Dense |
| Family | Dense |
| Scale | 4B parameters |
| Context window | 32,768 tokens |
| Attention | GQA with QK-Norm |
| Layer mix | 36 GQA |
| KV cache / token (bf16) | 144 KiB (Moderate) |
| License | Apache License 2.0 |

**Key detail:** Compact Qwen3 dense stack with QK-Norm and a 151k vocabulary.

## Architecture concepts

- [QK-Norm (QK-Norm)](https://llm-atlas-7or.pages.dev/concepts/qk-norm.md): RMSNorm applied to queries and keys before attention to keep logits well-behaved.
- [Grouped-Query Attention (GQA)](https://llm-atlas-7or.pages.dev/concepts/gqa.md): Several query heads share one key/value head, shrinking the KV cache with little quality loss.

## Benchmark (Artificial Analysis Intelligence Index)

- AA Intelligence Index v4.3.2: total 6.6

## Links

- Architecture diagram: https://sebastianraschka.com/llm-architecture-gallery/images/architectures/qwen3-4b.webp
- View in article: https://magazine.sebastianraschka.com/p/the-big-llm-architecture-comparison#%C2%A77-smollm3
- From scratch: https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/11_qwen3
- config.json: https://huggingface.co/Qwen/Qwen3-4B/blob/main/config.json
- License: https://huggingface.co/Qwen/Qwen3-4B/blob/main/LICENSE
- Tech report: https://arxiv.org/pdf/2505.09388
- Source card (source of truth): https://sebastianraschka.com/llm-architecture-gallery/#card-qwen3-4b
- Web page: https://llm-atlas-7or.pages.dev/models/qwen3-4b/
- JSON: https://llm-atlas-7or.pages.dev/api/models/qwen3-4b.json

_Data from Sebastian Raschka's LLM Architecture Gallery (https://sebastianraschka.com/llm-architecture-gallery/). Synced 2026-11-04._
