Phi-1
by Microsoft · Oct 2, 2023
Phi-1 is an open-weight code model from Microsoft, released Oct 2, 2023. It has 1.4B parameters.
- Provider
- Microsoft
- Released
- Oct 2, 2023
- Type
- Code model
- Parameters
- 1.4B
- Context window
- —
- Max output
- —
- Input
- text
- Output
- text
- Weights
- Open weights
- License
- mit
- Knowledge cutoff
- —
- Status
- Open weights
- Training compute
- 3.3e+20 FLOP
- HF downloads (30d)
- 9.4K
About Phi-1
We introduce phi-1, a new large language model for code, with significantly smaller size than competing models: phi-1 is a Transformer-based model with 1.3B parameters, trained for 4 days on 8 A100s, using a selection of ``textbook quality" data from the web (6B tokens) and synthetically generated textbooks and exercises with GPT-3.5 (1B tokens). Despite this small scale, phi-1 attains pass@1 accuracy 50.6% on HumanEval and 55.5% on MBPP.
Phi-1 benchmarks
All benchmarks →Scores from the Epoch AI Benchmarking Hub (best reported setting). ECI = Epoch Capabilities Index.
How to run Phi-1
Phi-1 is an open-weight model published on Hugging Face as microsoft/phi-1. Run it locally with Ollama, LM Studio or llama.cpp (quantized GGUF builds), or serve it on GPUs with vLLM, SGLang or Hugging Face TGI. At 1.4B parameters it needs roughly 1 GB of memory at 4-bit quantization.
Phi-1 vs alternatives
- Phi-1 vs DeepSeek Coder 1.3B
- Phi-1 vs Qwen2.5-Coder (1.5B)
- Phi-1 vs DeepSeek Coder 6.7B
- Phi-1 vs Phi-2
- Phi-1 vs OpenELM-1.1B
- Phi-1 vs Code Llama-7B
| Model | Provider | Released | Params | Context | Input $/1M | Output $/1M | ECI |
|---|---|---|---|---|---|---|---|
| DeepSeek Coder 1.3Bopen | DeepSeek | Nov 2023 | 1.3B | — | — | — | — |
| Qwen2.5-Coder (1.5B)open | Alibaba (Qwen) | Sep 2024 | 1.5B | — | — | — | 89.1 |
| DeepSeek Coder 6.7Bopen | DeepSeek | Nov 2023 | 6.7B | — | — | — | 67.5 |
| Phi-2open | Microsoft | Dec 2023 | 2.8B | — | — | — | 96.2 |
| OpenELM-1.1Bopen | Apple | May 2024 | 1.1B | — | — | — | — |
| Code Llama-7Bopen | Meta | Aug 2023 | 6.7B | — | — | — | — |
| Granite 3.0 2Bopen | IBM | Oct 2024 | 2.6B | — | — | — | — |
| CodeT5-largeopen | Salesforce | Jul 2022 | 770M | — | — | — | — |
More models from Microsoft
All Microsoft models →| Model | Released | Params | Context | Input $/1M | Output $/1M |
|---|---|---|---|---|---|
| Phi 4open | Dec 2024 | 15B | 16K | $0.07 | $0.14 |
| Phi-2open | Dec 2023 | 2.8B | — | — | — |
| Phi-1.5open | Sep 2023 | 1.4B | — | — | — |
| Phi 4 Miniopen | Feb 2025 | 3.8B | 8K | $0.17 | $0.68 |
| Florence-2-baseopen | Jun 2024 | 232M | — | — | — |
| harrier-oss-v1-0.6bopen | Mar 2026 | 596M | — | — | — |
| harrier-oss-v1-270mopen | Mar 2026 | 268M | — | — | — |
| Phi-4-reasoning-vision-15Bopen | Jan 2026 | 15B | — | — | — |
Frequently asked questions
Who made Phi-1?
Phi-1 was developed by Microsoft (United States of America). It was released on Oct 2, 2023.
Is Phi-1 open source?
Yes. Phi-1's weights are publicly available under the mit license on Hugging Face (microsoft/phi-1), so you can download and run it yourself.
How many parameters does Phi-1 have?
Phi-1 has 1.4B parameters.
How does Phi-1 perform on benchmarks?
Phi-1 scores 37.6% on MMLU and 47.6% on HellaSwag.
Sources: epoch, huggingface · paper · huggingface. Last updated 2026-11-22.