microsoft/phi-4

text-generation model by microsoft

Open original source ↗

Older snapshot: check the original source for current information.

From the publisher

Model card & documentation

Source preview

Read the publisher’s intended use, setup instructions, evaluations and limitations. The original model card is the source of truth.

Phi-4 Technical Report Our training data is an extension of the data used for Phi-3 and includes a wide variety of sources from: 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. We evaluated phi-4 using OpenAI’s SimpleEval and our own internal benchmarks to understand the model’s capabilities, more specifically: 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. Prior to release, phi-4…

microsoft/phi-4 on Hugging Face A short preview, not the full document.

Read the full model card ↗ · Preview checked 2026-10-30T23:32:06.979Z

Inside the original model card — Document outline
  1. Phi-4 Model Card
  2. Model Summary
  3. Intended Use
  4. Data Overview
  5. Training Datasets
  6. Benchmark datasets
  7. Safety
  8. Approach
  9. Safety Evaluation and Red-Teaming
  10. Model Quality
  11. Usage
  12. Input Formats

Headings are captured from the source. Links open the publisher’s document, not a locally hosted copy.

Links from the model card

References supplied by the publisher, not independently verified endorsements. Check the destination before downloading files or entering credentials.

Documentation belongs to its respective authors. Reported project/model license: mit. A listing is not a grant of reuse or training rights. Confirm the document’s own terms at the source.

Model overview

microsoft/phi-4 is a text-generation model repository published by microsoft on Hugging Face. The source reports the transformers library.

This page summarizes Hub metadata. For intended use, training data, evaluation results and limitations, consult the original model card.

Model facts

Task
text-generation
Library
transformers
Recent downloads (30 days)
449,588
Cumulative likes
2,316
Hugging Face trending score
4
Reported safetensors parameters
14,659,507,200
Architecture
Phi3ForCausalLM
License
mit
Access
Not gated by Hugging Face
Created
2024-12-11T11:47:29.000Z
Last modified
2026-07-14T14:22:25.000Z

Compatibility and lineage

Reported languages: en

Base-model lineage was not included.

Parameter count is not a RAM/VRAM requirement. Check precision, quantization, context length and runtime compatibility in the model card; no hardware or API-cost claim is inferred here.

Use and evaluate

Check license terms and access requirements first. Review the model card’s documented loading instructions, evaluations and safety limitations. Benchmark scores are not imported by this directory, and popularity is not an accuracy ranking.

No model weights are downloaded or executed by AltAPIs. Never enable remote model code without reviewing it.

Model card and usage instructions

Model files and configuration

Community discussion

Source and freshness

Source: Hugging Face Hub. Metadata observed 2026-10-05T06:39:48.206Z. Daily imports are snapshots, not real-time monitoring.

Popularity and source listings do not establish security, suitability, licensing rights or benchmark performance.

Open original source

Related models

openai-community/gpt2

Qwen/Qwen3-0.6B

Qwen/Qwen3-14B

Qwen/Qwen3-4B

Qwen/Qwen3-8B

deepseek-ai/DeepSeek-V3.2