Parameters
4B
Context Length
33K
Modality
Text
Architecture
Dense
KV Cache Rate
160 KB/tok
License
Apache 2.0
Release Date
29 Apr 2025
Knowledge Cutoff
Mar 2025
API Pricing (per 1M)
Input: $0.03 · Output: $0.15
Precision
Context
Workload Memory: 5.61 GB
INT4 · 8K context
Base Weights: 1.86 GB
KV Cache: 1.25 GB
Runtime & Graphs: 2.50 GB
1x NVIDIA L4 24GB
5.6 / 21.6 GB usable
1x RTX 3060 12GB
5.6 / 10.8 GB usable
Apple M4 24GB
5.6 / 18.0 GB usable
Determine requirements for your specific workload:
Open in VRAM Calculator
Checkpoint format
FP16
CUDA
>= 11.8
PyTorch
>= 2.1
Transformers
>= 4.51.0
| Architecture | Precision | Attention kernel |
|---|---|---|
Blackwell, Hopper | Native FP16 | FlashAttention-3 |
Ada Lovelace, Ampere | Native FP16 | FlashAttention-2 |
Rank
#209
| Benchmark | Score | Rank |
|---|---|---|
Intelligence Index | auto 0.07 Standard 0.07 | 279 287 |
Overall Rank
#209
Coding Rank
-
Qwen3-4B is a compact dense language model by Alibaba Cloud engineered with native dual-mode reasoning for mathematics, coding, and interactive dialogue. It supports dynamic thinking budget allocation across an extensible 131K token context window.
Attention
Attention Structure
Grouped-Query Attention
Attention Heads
48
Key-Value Heads
8
Attention Head Dimension
128
Position Embedding
ROPE
RoPE Theta
1,000,000
Normalization
RMS Normalization
Activation Function
Swish
Dimensions
Base Precision
FP16
Hidden Dimension Size
4,096
Number of Layers
40
FFN Intermediate Size (Dense)
9,728
Tokenizer
Vocabulary Size
151,936
The Alibaba Qwen 3 model family comprises dense and Mixture-of-Experts (MoE) architectures, with parameter counts from 0.6B to 235B. Key innovations include a hybrid reasoning system, offering 'thinking' and 'non-thinking' modes for adaptive processing, and support for extensive context windows, enhancing efficiency and scalability.