---
title: "Phi (Microsoft) — Phi模型"
source: "https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B"
wiki: "systems-analysis.info/int"
article: "Phi_(Microsoft)_—_Phi模型"
language: "zh"
categories:
  - "Category:Chinese"
  - "Category:Large language models"
  - "Category:LLM families"
  - "Category:Machine learning"
revision_id: 5619
wiki_created_at: 2026-09-06T23:51:50Z
wiki_modified_at: 2026-09-06T23:51:50Z
downloaded_at: 2026-09-07T23:09:30Z
---

# Phi (Microsoft) — Phi模型

**Phi** 是由微软研究院 (Microsoft Research) 开发的一个小型语言模型（Small Language Models, SLM）系列。这些模型代表了AI开发领域的一次范式转变，证明了紧凑且计算高效的模型可以达到与规模大得多的系统相媲美的性能。与依赖于扩展参数数量的传统方法不同，Phi的理念侧重于训练数据的质量和创新的训练方法<sup>[\[1\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-1)</sup>。

Phi模型针对需要深度逻辑推理的任务进行了优化，例如编程、数学和文本分析。由于其体积小，它们非常适合在本地设备（on-device AI）上部署，包括智能手机和笔记本电脑，这为AI的普及开辟了新的可能性<sup>[\[2\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-2)</sup>。

## 理念：“Textbooks Are All You Need”

Phi项目背后的核心假设是，训练高性能模型时，数据的质量比数量更重要。这一理念首次在研究论文**《Textbooks Are All You Need》**中被阐述<sup>[\[3\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-3)</sup>。Phi模型并非在来自未经过滤的网络的数万亿个词元（token）上进行训练，而是在一个经过精心筛选和综合生成的数据集上进行训练，其质量堪比教科书。

该方法的主要原则包括：

- **“教科书质量”的数据：** 训练语料库由纯净、逻辑连贯且具有解释性的材料组成，其灵感来源于儿童读物。
- **合成数据：** 大部分数据由大型模型（如GPT-4）生成。例如，为了训练**Phi-4**，通过超过50个自定义流水线（pipeline）生成了4000亿个词元的高质量合成内容<sup>[\[4\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-4)[\[5\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-5)</sup>。
- **迭代训练：** 数据创建和模型训练的过程是迭代进行的，这使得数据和模型本身的质量都能得到持续改进。

这种方法使Phi模型能够发展出深度的推理能力，而不仅仅是记忆统计模式。

## Phi模型的演进

- **Phi-1（13亿参数）：** 于2023年6月推出的首个模型，专注于Python语言编程。它在HumanEval和MBPP基准测试中表现出色，证明了基于高质量数据的方法的有效性<sup>[\[6\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-6)</sup>。

<!-- -->

- **Phi-2（27亿参数）：** 于2023年12月发布，Phi-2在保持紧凑架构的同时，将其能力扩展到通用语言理解。该模型表明，SLM可以达到比其大数十倍的模型相媲美的性能<sup>[\[7\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-7)</sup>。

<!-- -->

- **Phi-3（38亿 - 140亿参数）：** 该系列于2024年4月推出，是移动AI领域的一大突破。**Phi-3-mini**（38亿）能够在智能手机上运行，其性能可与Mixtral 8x7B和GPT-3.5相媲美<sup>[\[8\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-8)</sup>。该系列还包括**Phi-3-small**（70亿）和**Phi-3-medium**（140亿）版本。

<!-- -->

- **Phi-3.5（38亿 - 66亿活跃参数）：** 该系列于2024年宣布，包括三个关键模型：
  - **Phi-3.5-mini-instruct：** 经过优化的版本，具有增强的多语言支持。
  - **Phi-3.5-MoE-instruct：** 基于专家混合（Mixture-of-Experts）架构的模型，拥有16个专家和66亿活跃参数。
  - **Phi-3.5-Vision-instruct：** 用于处理文本和图像的多模态模型<sup>[\[9\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-9)</sup>。

<!-- -->

- **Phi-4（140亿参数）：** 专为复杂数学推理而设计的模型。它在尺寸小得多的情况下，展现出与Gemini-1.5-Flash和GPT-4o-mini相媲美的性能。**Phi-4-reasoning**的表现优于DeepSeek-R1-Distill-Llama-70B<sup>[\[10\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-10)</sup>。
- **Phi-4-Multimodal（56亿参数）：** 该系列首个完全多模态模型，能够同时处理文本、图像和音频。它采用创新的**Mixture-of-LoRAs**方法，可在无相互干扰的情况下高效处理不同模态<sup>[\[11\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-11)</sup>。

## 架构与技术特性

- **架构：** Phi模型采用标准的“仅解码器”（decoder-only）Transformer架构，并包含关键优化，如**Grouped Query Attention**和**Flash Attention**，以提高效率<sup>[\[12\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-12)</sup>。
- **本地部署：** 模型经过优化，可在资源有限的设备上运行。例如，**Phi-3-mini**在4位量化下仅需1.8 GB内存，并可在iPhone 14上运行<sup>[\[13\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-13)</sup>。
- **框架支持：** Phi模型可通过**Microsoft Azure AI Model Catalog**、**Hugging Face**、**Ollama**和**NVIDIA NIM microservices**获取，确保了其广泛的集成性和对开发者的可用性<sup>[\[14\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-14)</sup>。

## 性能与基准测试

| 模型             | 参数 | MMLU | MT-Bench | HumanEval |
|------------------|------|------|----------|-----------|
| **Phi-3-mini**   | 3.8B | 69%  | 8.38     | \-        |
| **Phi-3-small**  | 7B   | 75%  | 8.7      | \-        |
| **Phi-3-medium** | 14B  | 78%  | 8.9      | \-        |
| **Phi-4**        | 14B  | \-   | \-       | 优于GPT-4 |

Phi模型在关键基准测试中的性能对比

**Phi-4**在数学任务中表现出色，包括美国数学竞赛（American Mathematics Competitions, AMC），其性能可与Gemini-1.5-Flash相媲美<sup>[\[15\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-15)</sup>。多模态模型**Phi-3.5-Vision**在性能上优于同等规模的竞争对手，在BLINK基准测试中达到了57.0%的得分<sup>[\[16\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-16)</sup>。

## 专业应用

Phi模型在特定领域展现出高效能：

- **医疗：** 研究表明，Phi-3在医学和体育相关文本上的回答与专家评估之间存在中度相关性<sup>[\[17\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-17)</sup>。
- **仇恨言论检测：** 基于Phi-2的HateTinyLLM模型，通过LoRA微调，在该任务上达到了超过80%的准确率<sup>[\[18\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-18)</sup>。
- **游戏策略：** SC-Phi2模型展示了在预测《星际争霸II》（StarCraft II）游戏策略方面的能力<sup>[\[19\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-19)</sup>。

## 负责任的AI与安全性

Phi系列是根据**微软负责任AI**（Microsoft Responsible AI）标准开发的，这些标准包括问责制、透明度、公平性和安全性等原则。这些模型经过了多方面的安全评估，包括**监督微调**（Supervised Fine-Tuning, SFT）和**直接偏好优化**（Direct Preference Optimization, DPO），以及针对不同语言和风险类别的测试<sup>[\[20\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-20)</sup>。

## 局限性

尽管取得了令人瞩目的成果，Phi模型在某些复杂任务上可能仍不及专门的大型模型。例如，**Phi-4**在思维链（chain-of-thought）推理方面表现良好，但受限于缺乏函数调用（function calling）能力<sup>[\[21\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-21)</sup>。此外，尽管**Phi-3.5**支持超过20种语言，但其性能可能存在差异，研究表明其在非英语语言上的回答存在不准确之处<sup>[\[22\]](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_note-22)</sup>。

## 参考文献

- Gunasekar, S.; et al. (2023). *Textbooks Are All You Need*. <a href="https://arxiv.org/abs/2306.11644" class="external text" rel="nofollow">arXiv:2306.11644</a>.
- Gunasekar, S.; et al. (2023). *Textbooks Are All You Need II: phi‑1.5 Technical Report*. <a href="https://arxiv.org/abs/2309.05463" class="external text" rel="nofollow">arXiv:2309.05463</a>.
- Dao, T.; et al. (2022). *FlashAttention: Fast and Memory‑Efficient Exact Attention with IO‑Awareness*. <a href="https://arxiv.org/abs/2205.14135" class="external text" rel="nofollow">arXiv:2205.14135</a>.
- Zheng, S.; et al. (2023). *GQA: Training Generalized Multi‑Query Transformer Models for Faster Decoding*. <a href="https://arxiv.org/abs/2305.13245" class="external text" rel="nofollow">arXiv:2305.13245</a>.
- Feng, W.; et al. (2024). *Mixture‑of‑LoRAs: An Efficient Multitask Tuning for Large Language Models*. <a href="https://arxiv.org/abs/2403.03432" class="external text" rel="nofollow">arXiv:2403.03432</a>.
- Wu, X.; et al. (2024). *Mixture of LoRA Experts*. <a href="https://arxiv.org/abs/2404.13628" class="external text" rel="nofollow">arXiv:2404.13628</a>.
- Microsoft Research (2024). *Phi‑3 Technical Report*. <a href="https://arxiv.org/abs/2404.14219" class="external text" rel="nofollow">arXiv:2404.14219</a>.
- Abdin, M.; et al. (2024). *Phi‑4 Technical Report*. <a href="https://arxiv.org/abs/2412.08905" class="external text" rel="nofollow">arXiv:2412.08905</a>.
- Microsoft Research (2025). *Phi‑4‑reasoning Technical Report*. <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2025/04/phi_4_reasoning.pdf" class="external text" rel="nofollow">PDF</a>.
- Microsoft Research (2025). *Phi‑4‑Multimodal: Mixture‑of‑Modality‑LoRAs*. <a href="https://arxiv.org/abs/2503.01743" class="external text" rel="nofollow">arXiv:2503.01743</a>.

## 注释

1.  <span id="cite_note-1">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-1) «The Phi-3 small language models with big potential». *Microsoft Source Features*. <a href="https://news.microsoft.com/source/features/ai/the-phi-3-small-language-models-with-big-potential/" class="external autonumber" rel="nofollow">[1]</a></span>
2.  <span id="cite_note-2">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-2) «Microsoft's Phi-3: Revolutionising AI with efficient and accessible small language models». *Landing.Jobs Blog*. <a href="https://landing.jobs/blog/microsofts-phi-3-revolutionising-ai-with-efficient-and-accessible-small-language-models/" class="external autonumber" rel="nofollow">[2]</a></span>
3.  <span id="cite_note-3">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-3) «Textbooks Are All You Need». *Microsoft Research*. <a href="https://www.microsoft.com/en-us/research/publication/textbooks-are-all-you-need/" class="external autonumber" rel="nofollow">[3]</a></span>
4.  <span id="cite_note-4">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-4) «Introducing Phi-4: Microsoft’s newest Small Language Model, specializing in complex reasoning». *Microsoft Tech Community*. <a href="https://techcommunity.microsoft.com/t5/ai-at-microsoft/introducing-phi-4-microsoft-s-newest-small-language-model/ba-p/4357090" class="external autonumber" rel="nofollow">[4]</a></span>
5.  <span id="cite_note-5">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-5) «Exploring Phi-4: A Deep Dive into Microsoft's Latest Language Model». *OpenCV Blog*. <a href="https://opencv.org/blog/phi-4/" class="external autonumber" rel="nofollow">[5]</a></span>
6.  <span id="cite_note-6">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-6) «Unlocking the Power of Small Language Models (SLMs): The Evolution of Phi». *LinkedIn*. <a href="https://www.linkedin.com/pulse/unlocking-power-small-language-models-slms-evolution-vijay-ru4xc" class="external autonumber" rel="nofollow">[6]</a></span>
7.  <span id="cite_note-7">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-7) “微软新AI模型Phi-2通过教科书进行学习”. *TechInsider*. <a href="https://www.techinsider.ru/news/news-1625165-novaya-ii-model-phi-2-ot-microsoft-uchilas-po-uchebnikam/" class="external autonumber" rel="nofollow">[7]</a></span>
8.  <span id="cite_note-8">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-8) «Phi-3 Technical Report». *arXiv*. <a href="https://arxiv.org/abs/2404.14219" class="external autonumber" rel="nofollow">[8]</a></span>
9.  <span id="cite_note-9">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-9) «Discover the new multi-lingual, high-quality Phi-3.5 SLMs». *Microsoft Tech Community*. <a href="https://techcommunity.microsoft.com/blog/azure-ai-services-blog/discover-the-new-multi-lingual-high-quality-phi-3-5-slms/4225280" class="external autonumber" rel="nofollow">[9]</a></span>
10. <span id="cite_note-10">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-10) «Phi-4 Technical Report». *arXiv*. <a href="https://arxiv.org/abs/2412.08905" class="external autonumber" rel="nofollow">[10]</a></span>
11. <span id="cite_note-11">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-11) «Mixture-of-Modality-LoRAs: A Low-Rank Approach to Natively Multimodal Foundation Models». *arXiv*. <a href="https://arxiv.org/abs/2503.01743" class="external autonumber" rel="nofollow">[11]</a></span>
12. <span id="cite_note-12">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-12) «Phi-3: A Tutorial on Microsoft's Small Language Models (SLMs)». *DataCamp*. <a href="https://www.datacamp.com/tutorial/phi-3-tutorial" class="external autonumber" rel="nofollow">[12]</a></span>
13. <span id="cite_note-13">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-13) «Unlocking the Power of Small Language Models (SLMs): The Evolution of Phi». *LinkedIn*. <a href="https://www.linkedin.com/pulse/unlocking-power-small-language-models-slms-evolution-vijay-ru4xc" class="external autonumber" rel="nofollow">[13]</a></span>
14. <span id="cite_note-14">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-14) «Microsoft Phi». *Microsoft Azure*. <a href="https://azure.microsoft.com/en-us/products/phi" class="external autonumber" rel="nofollow">[14]</a></span>
15. <span id="cite_note-15">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-15) «Exploring Phi-4: A Deep Dive into Microsoft's Latest Language Model». *OpenCV Blog*. <a href="https://opencv.org/blog/phi-4/" class="external autonumber" rel="nofollow">[15]</a></span>
16. <span id="cite_note-16">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-16) «Phi-3.5-vision-instruct». *Hugging Face*. <a href="https://huggingface.co/microsoft/Phi-3.5-vision-instruct" class="external autonumber" rel="nofollow">[16]</a></span>
17. <span id="cite_note-17">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-17) «Small But Mighty: Exploring the Capabilities of Small Language Models in Medical and Sport-Specific Applications». *arXiv*. <a href="https://arxiv.org/abs/2504.08764" class="external autonumber" rel="nofollow">[17]</a></span>
18. <span id="cite_note-18">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-18) «HateTinyLLMs: A Small Language Model for Hate Speech Detection». *arXiv*. <a href="https://arxiv.org/abs/2405.01577" class="external autonumber" rel="nofollow">[18]</a></span>
19. <span id="cite_note-19">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-19) «SC-Phi2: A Specialized Small Language Model for StarCraft II». *MDPI*. <a href="https://www.mdpi.com/2673-2688/5/4/115" class="external autonumber" rel="nofollow">[19]</a></span>
20. <span id="cite_note-20">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-20) «Microsoft’s Phi-3.5: a responsible, small language model». *Skymod*. <a href="https://skymod.tech/microsofts-phi-3-5-small-language-models/" class="external autonumber" rel="nofollow">[20]</a></span>
21. <span id="cite_note-21">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-21) «Phi-4: A New Era of Small Language Models». *Meta-quantum.today*. <a href="https://meta-quantum.today/?p=3386" class="external autonumber" rel="nofollow">[21]</a></span>
22. <span id="cite_note-22">[↑](https://systems-analysis.info/int/Phi_(Microsoft)_%E2%80%94_Phi%E6%A8%A1%E5%9E%8B#cite_ref-22) «A Multi-faceted Analysis of Language-specific Bias in Large Language Models». *U.S. Securities and Exchange Commission*. <a href="https://www.sec.gov/Archives/edgar/data/789019/000119312524242883/d858775ddef14a.htm" class="external autonumber" rel="nofollow">[22]</a></span>
