Model reference · open weights

phi-4

LLMs microsoft Text gen 3 builds Open weights 640k dl/mo

phi-4 is an open-weight language model from microsoft. phi-4 (BF16) weighs 29.3 GB; the smallest configuration that runs it is L40S 48 GB.

  • phi-4 is a 14.7B parameter text-generation model developed by Microsoft Research.
  • It is designed for general-purpose AI applications, reasoning, and logic tasks in memory or compute-constrained environments.
  • The model supports a 16K token context length, is trained primarily on English data, and is released under the MIT license.

Summary of the microsoft/phi-4 model card, 2026-10-01

What it is

Released bymicrosoft
Released2024-12-11
Parameters14.7B
VRAM29.3 GB for the weights

What it runs on

Memory and cards for phi-4 (BF16)

29.3 GBweights, file size
205 MBcache per 1K tokens
763 MBruntime overhead, at least
16,384 tokenscontext max
CardRequests at onceContext maxMemory
8K each
RTX 3060 12 GB … RTX 4090 24 GB
4 smaller cards
——
RTX 5090 32 GB—4K31.0 GB
L40S 48 GB8all 16K44.0 GB
A100 80 GB28all 16K78.2 GB
H100 80 GB26all 16K78.1 GB
RTX PRO 6000 Blackwell 96 GB35all 16K93.8 GB
DGX Spark (GB10) 128 GB unified43all 16K107 GB
H200 141 GB61all 16K138 GB
B200 180 GB84all 16K176 GB
2× RTX 4090 24 GB
tensor parallel
9all 16K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
9all 16K23.4 GB a card
2× RTX 5090 32 GB
tensor parallel
18all 16K31.0 GB a card
Memory needed at each load
Requests at once8K tokens each
131.8 GB
538.5 GB
843.5 GB
1656.9 GB
3283.8 GB
64137 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
phi-4 (above) ↗ 14.7BBF16 29.3 GBL40S 48 GB
phi-4-FP8-dynamic ↗
packaged by RedHatAI
14.7BFP8 15.7 GB2× RTX 3060 12 GB
phi-4-GGUF ↗
packaged by unsloth
8 builds: Q2_K 5.6 GB … F16 29.3 GB
—GGUF 8.9 GBRTX 3060 12 GB

From the model card

What microsoft says about phi-4

Read the model card

Phi-4 Technical Report

Model Summary

DevelopersMicrosoft Research
Descriptionphi-4 is a state-of-the-art open model built upon a blend of synthetic datasets, data from filtered public domain websites, and acquired academic books and Q&A datasets. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning.phi-4 underwent a rigorous enhancement and alignment process, incorporating both supervised fine-tuning and direct preference optimization to ensure precise instruction adherence and robust safety measures
Architecture14B parameters, dense decoder-only Transformer model
InputsText, best suited for prompts in the chat format
Context length16K tokens
GPUs1920 H100-80G
Training time21 days
Training data9.8T tokens
OutputsGenerated text in response to input
DatesOctober 2024 – November 2024
StatusStatic model trained on an offline dataset with cutoff dates of June 2024 and earlier for publicly available data
Release dateDecember 12, 2024
LicenseMIT

Intended Use

Primary Use CasesOur model is designed to accelerate research on language models, for use as a building block for generative AI powered features. It provides uses for general purpose AI systems and applications (primarily in English) which require:1. Memory/compute constrained environments.2. Latency bound scenarios.3. Reasoning and logic.
Out-of-Scope Use CasesOur models is not specifically designed or evaluated for all downstream purposes, thus:1. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios.2. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case, including the model’s focus on English.3. Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.

Data Overview

Training Datasets

Our training data is an extension of the data used for Phi-3 and includes a wide variety of sources from:

  1. Publicly available documents filtered rigorously for quality, selected high-quality educational data, and code.

  2. Newly created synthetic, “textbook-like” data for the purpose of teaching math, coding, common sense reasoning, general knowledge of the world (science, daily activities, theory of mind, etc.).

  3. Acquired academic books and Q&A datasets.

  4. High quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness.

Multilingual data constitutes about 8% of our overall data. We are focusing on the quality of data that could potentially improve the reasoning ability for the model, and we filter the publicly available documents to contain the correct level of knowledge.

Benchmark datasets

We evaluated phi-4 using OpenAI’s SimpleEval and our own internal benchmarks to understand the model’s capabilities, more specifically:

  • MMLU: Popular aggregated dataset for multitask language understanding.

  • MATH: Challenging competition math problems.

  • GPQA: Complex, graduate-level science questions.

  • DROP: Complex comprehension and reasoning.

  • MGSM: Multi-lingual grade-school math.

  • HumanEval: Functional code generation.

  • SimpleQA: Factual responses.

Safety

Approach

phi-4 has adopted a robust safety post-training approach. This approach leverages a variety of both open-source and in-house generated synthetic datasets. The overall technique employed to do the safety alignment is a combination of SFT (Supervised Fine-Tuning) and iterative DPO (Direct Preference Optimization), including publicly available datasets focusing on helpfulness and harmlessness as well as various questions and answers targeted to multiple safety categories.

Safety Evaluation and Red-Teaming

Prior to release, phi-4 followed a multi-faceted evaluation approach. Quantitative evaluation was conducted with multiple open-source safety benchmarks and in-house tools utilizing adversarial conversation simulation. For qual

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms