Phi-4

Microsoft Research · 2024-12-12 · analysed 2026-08-10 · skill v0.3.5

dense full-attention text-only undisclosed medium reasoning-specialised

Design overview

Phi-4 is a 14B dense decoder-only transformer that 'closely follows phi-3-medium' with three stated deltas: a tiktoken tokenizer with a padded 100,352-token vocabulary, full attention over the 4K default context instead of phi-3-medium's 2K sliding window, and a midtraining stage that extends the context to 16K. The report discloses almost nothing about the block internals — no layer count, hidden dimension, head counts, normalization, or activation — so the record is deliberately sparse on scale beyond the headline 14B. The report's contribution is the recipe: ~10T tokens with a synthetic-first mixture (~400B unweighted synthetic tokens across 50 dataset types), curated organic data, then one round of SFT and two rounds of DPO, the first built on the novel Pivotal Token Search technique. The framing is explicitly about matching much larger models (Llama-3.1-405B) on reasoning benchmarks with a 14B parameter budget.

What the report claims is novel

Atlas assessment: Within the atlas, phi-4 is a direct refinement of the existing microsoft-phi-3 line: same 'small model, dense, data-centric' intent, with the 2K sliding window dropped for full attention and a tiktoken vocabulary. The architectural novelty is modest; the claimed novelty is in the data and post-training recipes (midtraining, PTS), which the schema records under training/post_training rather than block design.

Relation to the atlas

Lineage in

Influence out

No descendants recorded yet.

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyPhi-4[1]
OrganisationMicrosoft Research[2]
Release date2024-12-12
Report URLhttps://arxiv.org/abs/2412.08905[3]

Scale

Total parameters14B[4]
Active parameters / token14B
Vocabulary size100352[5]

Core block

Block typedense
Attention variantMHA
Attention layer patternuniform
Depth mixingsequential-residual

Context

Trained context length4,096[6]
Deployed context length16,384[7]
Extension methodextended to 16K during midtraining[6]

Tokenizer

Algorithmtiktoken-based BPE[6]
NotesPadded vocabulary of 100,352 tokens including unused tokens (§3)[6]

Training

Training tokens10T[8]
Data compositionSynthetic-first: ~50 broad types of synthetic datasets (~400B unweighted tokens) for pretraining/midtraining; curated and filtered organic data (arXiv, PubMed Central, GitHub, licensed books, filtered web); multilingual coverage (DE/ES/FR/PT/IT/HI/JA) (§2)[9]
Curriculum / stagingPretraining → midtraining (16K context stage)[6]
LR scheduleLinear warm-up and decay; peak learning rate 0.0003; constant weight decay 0.1[6]
Batch scheduleGlobal batch size 5760[6]

Post-training

SFTyes[10]
Preference optimisationDPO[11]
Reasoning trainingnone disclosed
Distillationnone disclosed

Modality

Typetext-only

Inference efficiency

KV-cache designFull attention with no grouping disclosed: KV cache per token scales with all attention heads; 16K deployed context multiplies cache
Quantisation shippednone disclosed[3]
Speculative decodingnone disclosed[3]
Serving optimisationsnone disclosed[3]

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
MMLU84.8Table 1
GPQA56.1Table 1
MATH80.4Table 1
HumanEval82.6Table 1
MGSM80.6Table 1
SimpleQA3.0Table 1
DROP75.5Table 1
MMLU-Pro70.4Table 1
HumanEval+82.8Table 1
ArenaHard75.4Table 1
IFEval63.0Table 1
PhiBench56.2Table 1

Provenance references

  1. stated · Title
  2. stated · Title page byline
  3. stated · pipeline
  4. stated · Abstract / §1 / Table 1
  5. stated · §3 (padded vocabulary size of 100,352 including unused tokens)
  6. stated · §3
  7. stated · §3 (extended to a 16K context length during midtraining)
  8. stated · §3 (pretrained for approximately 10T tokens)
  9. stated · §2
  10. stated · §4.1 (one round of SFT)
  11. stated · §4.2 (two rounds of DPO: first with pivotal-token-search pairs, second with full-length preference pairs)