LLM Library
Dense decoderOpen weightsArchitecture animation
Phi-4
A small model trained heavily on synthetic and curated data.
At a glance
- Made by
- Microsoft
- Released
- 2024
- Type
- Dense decoder
- Access
- Open weights
- Parameters
- 14B
- Context window
- 16k tokens
- Attention
- Standard decoder attention
How it works
Phi-4 shows that data quality can matter as much as size: much of its training data is synthetic reasoning-style text, giving strong maths and reasoning for 14B parameters.
Architecture, step by step
A token travels from text in to prediction out. The boxed layers repeat many times.
Raw text enters the system, for example "The cat sat on the".
- stage:
- 1/12
- part:
- Text in
1/12
The green dot is one token travelling through the model. The boxed section repeats for every layer.
What stands out
- Synthetic data focus
- Strong reasoning for its size
- Small enough for one GPU
Keep in mind
Weaker on broad world knowledge than much larger models.