microsoft/phi-4
text-generation model by microsoft
Older snapshot: check the original source for current information.
From the publisher
Model card & documentation
Source previewRead 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…
Read the full model card ↗ · Preview checked 2026-10-30T23:32:06.979Z
Inside the original model card — Document outline
- Phi-4 Model Card
- Model Summary
- Intended Use
- Data Overview
- Training Datasets
- Benchmark datasets
- Safety
- Approach
- Safety Evaluation and Red-Teaming
- Model Quality
- Usage
- 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.
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.