ModelsReviewed · Microsoft

Microsoft Phi-4

Phi-4 is Microsoft's text-generation model for developers building mainly English AI features, but its reported factual-answering performance is weak. It has 14 billion parameters, a 16K-token context window and documented uses in reasoning, math and code generation.

Researched 12 Nov 2026

In short.

Phi-4 is Microsoft's language model for researchers and developers working mainly in English, but factual answers need careful verification. Its 14-billion-parameter architecture supports a 16K-token context window. Microsoft reports scores of 80.4 on MATH, 82.6 on HumanEval and 3.0 on SimpleQA, illustrating an uneven capability profile. The card provides a Transformers usage example, while inference hardware requirements, operating costs and application-specific performance remain unknown. Runtime behavior and benchmark reproduction have not been assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage consists of the complete captured README at [https://huggingface.co/microsoft/phi-4/raw/2db69c1c3e91a05d2c64a3185acfbaf36f744e25/README.md], including its MIT designation and responsible-use notices. Only that model card is available: model weights, configuration files, the full linked license, technical report, data summary, other folders and external services are excluded. No installation, inference, output validation, hardware profiling or benchmark reproduction was performed.

The overview

Identity

Phi-4 is a text-generation model developed by Microsoft Research and released on December 12, 2024. Its architecture is a dense decoder-only Transformer with 14 billion parameters.

It accepts text, works best with chat-formatted prompts and produces generated text. Its stated context length is 16K tokens, where tokens are units of text processed by the model.

Assessment

Phi-4 is worth evaluating for English-language math, reasoning and coding assistance. Microsoft's table reports 56.1 on GPQA, covering graduate-level science questions, and 80.4 on competition-math benchmark MATH.

Its reported SimpleQA score is only 3.0, and the card explicitly warns about fabricated or outdated information. These results support a focused evaluation for a particular task; they do not establish dependable general factual assistance, production readiness or fast inference.

Users

The intended users are language-model researchers and developers using a model as a component in generative AI applications. Microsoft identifies memory- or compute-constrained environments, latency-sensitive applications, and reasoning tasks as intended uses.

English-language math helpers and Python coding assistants are plausible applications to evaluate. Multilingual products are a weaker fit: the card says Phi-4 is not intended to support multilingual use. Suitability for a particular device, response-time target or sensitive application is not established.

Capabilities

The documented capabilities include conversational text generation, instruction following, math, science reasoning, reading comprehension and code generation. Microsoft's reported scores include 84.8 on MMLU, 80.6 on MGSM, 82.6 on HumanEval and 75.5 on DROP.

These benchmarks cover different abilities and should be read separately. HumanEval results do not establish correctness across arbitrary software projects, and a 16K-token context window does not establish reliable use of every detail in a long prompt.

Using it

Requirements

The documented integration uses Python and the Transformers library. It requests automatic model precision and automatic device placement. Compatible package versions, minimum RAM or GPU memory, storage needs and supported inference configurations are not specified.

The card lists 1,920 H100-80G GPUs and 21 days alongside its training information. Those figures describe training, not the hardware required to serve the model. There is no measured inference latency or throughput in the captured documentation.

Mechanism

Phi-4 generates text from a supplied text prompt using a dense decoder-only Transformer. The card reports 9.8 trillion training tokens drawn from filtered public documents and code, synthetic educational material, and acquired academic books and question-and-answer datasets.

Post-training combines supervised fine-tuning on example responses with iterative direct preference optimization, which uses response preferences to improve alignment. About 8% of the overall training data is multilingual, although the model's intended language remains English.

Setup

The documented Python example creates transformers.pipeline with the text-generation task and model identifier microsoft/phi-4. It passes torch_dtype set to auto through model_kwargs and sets device_map to auto.

The pipeline receives role/content chat messages and a max_new_tokens limit of 128. The example supplies no installation command or dependency versions, and it does not pin a model-artifact revision. Reproducing the exact documented model state would require confirming the corresponding artifacts and compatible software.

Example

The card demonstrates a conversation in which a system message asks the model to speak as a medieval knight and the user asks how to explain the Internet. The Python example submits these messages and prints the final generated message.

This illustrates persona instructions and chat input structure. No generated answer is included, and the example was not executed. Its factual accuracy, instruction adherence, memory use and response time remain unassessed.

Assessment & evidence

Limitations

The card warns that Phi-4 can fabricate information, produce offensive content and perpetuate stereotypes despite safety post-training. Performance can be worse outside English and for less-represented English varieties. High-stakes uses require additional assessment and application safeguards.

Most code training data is Python using common packages such as math, typing and collections. The card recommends manually verifying API usage for other packages and languages. Current factual knowledge is also limited by the offline training data.

Reasoning

The reported math and code results provide a concrete reason to evaluate Phi-4 for those tasks. Its smaller parameter count relative to some compared models does not, by itself, prove lower deployment costs or acceptable response times.

For fact-heavy applications, the SimpleQA result and hallucination warning suggest prioritizing source grounding and answer verification. The card recommends retrieval-augmented generation, which supplies relevant contextual information for answers, but includes no retrieval implementation or results showing how much it improves Phi-4.

Alternatives

Qwen 2.5 14B Instruct is a same-parameter-count comparison in Microsoft's table. It scores 85.5 on DROP versus Phi-4's 75.5, while Phi-4 scores 80.4 on MATH versus Qwen's 75.6. That tradeoff makes the intended workload more useful than a single overall ranking.

The table also reports higher HumanEval performance for GPT-4o-mini, at 86.2 versus 82.6, and higher SimpleQA performance for GPT-4o, at 39.4 versus 3.0. These historical comparisons do not establish current availability, pricing or deployment suitability.

Evidence

The source is Microsoft's Phi-4 model card at [https://huggingface.co/microsoft/phi-4/raw/2db69c1c3e91a05d2c64a3185acfbaf36f744e25/README.md]. It contains model specifications, usage code, publisher-reported benchmark scores and descriptions of safety evaluation.

Microsoft reports using OpenAI's SimpleEval and internal benchmarks. The card notes that strict answer formatting may lower Llama-3.3 scores, which limits simple ranking comparisons. Benchmark reproduction and independent runtime validation are not established. The linked technical report, data summary and model artifacts are not included in this evidence.

Access & freshness

Costs

The card gives no download price, hosted inference rate or deployment budget. Operating costs and cost per request are unknown.

Serving costs would depend on hardware and workload, but the documentation supplies no inference memory, latency or throughput measurements from which to calculate them. The reported training hardware and duration do not establish a training bill or a serving budget.

Rights

The metadata and model summary identify the license as MIT. The card links to [https://huggingface.co/microsoft/phi-4/resolve/main/LICENSE] and states that its intended-use guidance does not modify the license.

The complete license text and copyright notices are not included in the captured card. The license link targets main rather than the pinned README commit, so the exact accompanying notices and redistribution requirements cannot be confirmed from this document alone.

Freshness

The card records training in October–November 2024 and release on December 12, 2024. It describes a static model trained offline, with cutoff dates of June 2024 or earlier for publicly available training data.

The documentation snapshot is pinned to commit 2db69c1c3e91a05d2c64a3185acfbaf36f744e25. Its capture on November 12, 2026 does not establish a model update. Later changes, current hosting availability and compatibility with current software versions are unknown.

Actions

Before adoption, evaluate representative English-language tasks for reasoning quality, factual accuracy, code correctness and harmful or biased outputs. For generated code, verify APIs and behavior, especially outside Python's common packages.

Confirm compatible software and model revisions, then measure memory use, latency and throughput on the intended hardware before estimating costs. Retrieve the license and notices accompanying those exact artifacts. For factual applications, evaluate retrieval grounding and answer verification rather than assuming reliable recall.

Evidence for this report

selected-page.txtselected · checked 2026-11-12