Phi na series of open source AI models wey Microsoft develop.
Phi na di most powerful and cost-effective small language model (SLM) now, get beta beta benchmarks for multi-language, reasoning, text/chat generation, coding, images, audio and oda scenarios.
You fit deploy Phi go cloud or edge devices, and you fit easy build generative AI applications wit limited computing power.
Make you follow these steps to start use these resource:
- Fork di Repository: Click
- Clone di Repository:
git clone https://github.com/microsoft/PhiCookBook.git - Join Di Microsoft AI Discord Community and meet experts and fellow developers
Arabic | Bengali | Bulgarian | Burmese (Myanmar) | Chinese (Simplified) | Chinese (Traditional, Hong Kong) | Chinese (Traditional, Macau) | Chinese (Traditional, Taiwan) | Croatian | Czech | Danish | Dutch | Estonian | Finnish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Kannada | Khmer | Korean | Lithuanian | Malay | Malayalam | Marathi | Nepali | Nigerian Pidgin | Norwegian | Persian (Farsi) | Polish | Portuguese (Brazil) | Portuguese (Portugal) | Punjabi (Gurmukhi) | Romanian | Russian | Serbian (Cyrillic) | Slovak | Slovenian | Spanish | Swahili | Swedish | Tagalog (Filipino) | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese
You prefer to Clone for your machine?
Dis repository get 50+ language translations wey heavy for download size. To clone witout translations, use sparse checkout:
Bash / macOS / Linux:
git clone --filter=blob:none --sparse https://github.com/microsoft/PhiCookBook.git cd PhiCookBook git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'CMD (Windows):
git clone --filter=blob:none --sparse https://github.com/microsoft/PhiCookBook.git cd PhiCookBook git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"Dis one go give you everything wey you need to finish di course with fast download.
-
Introduction
-
Inference Phi in different environment
-
Inference Phi Family
- Inference Phi in iOS
- Inference Phi in Android
- Inference Phi in Jetson
- Inference Phi in AI PC
- Inference Phi with Apple MLX Framework
- Inference Phi in Local Server
- Inference Phi in Remote Server using AI Toolkit
- Inference Phi with Rust
- Inference Phi--Vision in Local
- Inference Phi with Kaito AKS, Azure Containers(official support)
-
Evaluation Phi
-
RAG with Azure AI Search
-
Phi application development samples
-
Text & Chat Applications
- Phi-4 Samples
- Phi-3 / 3.5 Samples
- Local Chatbot in the browser using Phi3, ONNX Runtime Web and WebGPU
- OpenVino Chat
- Multi Model - Interactive Phi-3-mini and OpenAI Whisper
- MLFlow - Building a wrapper and using Phi-3 with MLFlow
- Model Optimization - How to optimize Phi-3-min model for ONNX Runtime Web with Olive
- WinUI3 App with Phi-3 mini-4k-instruct-onnx -WinUI3 Multi Model AI Powered Notes App Sample
- Fine-tune and Integrate custom Phi-3 models with Prompt flow
- Fine-tune and Integrate custom Phi-3 models with Prompt flow in Microsoft Foundry
- Evaluate the Fine-tuned Phi-3 / Phi-3.5 Model in Microsoft Foundry Focusing on Microsoft's Responsible AI Principles
- [📓] Phi-3.5-mini-instruct language prediction sample (Chinese/English)
- Phi-3.5-Instruct WebGPU RAG Chatbot
- Using Windows GPU to create Prompt flow solution with Phi-3.5-Instruct ONNX
- Using Microsoft Phi-3.5 tflite to create Android app
- Q&A .NET Example using local ONNX Phi-3 model using the Microsoft.ML.OnnxRuntime
- Console chat .NET app with Semantic Kernel and Phi-3
-
Azure AI Inference SDK Code Based Samples
-
Advanced Reasoning Samples
-
Demos
-
Vision Samples
- Phi-4 Samples
- Phi-3 / 3.5 Samples
- [📓]Phi-3-vision-Image text to text
- Phi-3-vision-ONNX
- [📓]Phi-3-vision CLIP Embedding
- DEMO: Phi-3 Recycling
- Phi-3-vision - Visual language assistant - with Phi3-Vision and OpenVINO
- Phi-3 Vision Nvidia NIM
- Phi-3 Vision OpenVino
- [📓]Phi-3.5 Vision multi-frame or multi-image sample
- Phi-3 Vision Local ONNX Model using the Microsoft.ML.OnnxRuntime .NET
- Menu based Phi-3 Vision Local ONNX Model using the Microsoft.ML.OnnxRuntime .NET
-
Reasoning-Vision Samples
- Phi-4-Reasoning-Vision-15B
-
Math Samples
- Phi-4-Mini-Flash-Reasoning-Instruct Samples Math Demo with Phi-4-Mini-Flash-Reasoning-Instruct
-
Audio Samples
-
MOE Samples
-
Function Calling Samples
-
Multimodal Mixing Samples
-
-
Fine-tuning Phi Samples
- Fine-tuning Scenarios
- Fine-tuning vs RAG
- Fine-tuning Make Phi-3 become industry expert
- Fine-tuning Phi-3 with AI Toolkit for VS Code
- Fine-tuning Phi-3 with Azure Machine Learning Service
- Fine-tuning Phi-3 with Lora
- Fine-tuning Phi-3 with QLora
- Fine-tuning Phi-3 with Microsoft Foundry
- Fine-tuning Phi-3 with Azure ML CLI/SDK
- Fine-tuning with Microsoft Olive
- Fine-tuning with Microsoft Olive Hands-On Lab
- Fine-tuning Phi-3-vision with Weights and Bias
- Fine-tuning Phi-3 with Apple MLX Framework
- Fine-tuning Phi-3-vision (official support)
- Fine-Tuning Phi-3 wit Kaito AKS , Azure Containers(official Support)
- Fine-Tuning Phi-3 and 3.5 Vision
-
Hands on Lab
-
Academic Research Papers and Publications
- Textbooks Na All You Need II: phi-1.5 technical report
- Phi-3 Technical Report: One Big Language Model Wey Dey inside Your Phone
- Phi-4 Technical Report
- Phi-4-Mini Technical Report: Small but Strong Multimodal Language Models Through Mixture-of-LoRAs
- Optimizing Small Language Models for In-Vehicle Function-Calling
- (WhyPHI) Fine-Tuning PHI-3 for Multiple-Choice Question Answering: Methodology, Results, and Challenges
- Phi-4-reasoning Technical Report
- Phi-4-mini-reasoning Technical Report
You fit learn how to use Microsoft Phi and how to build E2E solutions for your different hardware devices. To try Phi by yourself, start by playing wit di models and customize Phi for your own wahala using di Microsoft Foundry Azure AI Model Catalog you fit learn more at Getting Started wit Microsoft Foundry
Playground Each model get im own playground to test am Azure AI Playground.
You fit learn how to use Microsoft Phi and how to build E2E solutions for your different hardware devices. To try Phi by yourself, start by playing wit di model and customize Phi for your own wahala using di GitHub Model Catalog you fit learn more at Getting Started wit GitHub Model Catalog
Playground Each model get im own playground to test di model.
You fit still find di model on di Hugging Face
Playground Hugging Chat playground
Our team dey produce other courses! Check am out:
Microsoft dey committed to help our customers use our AI products responsibly, share our learnings, and build trust-based partnerships through tools like Transparency Notes and Impact Assessments. Plenty of these resources dey for https://aka.ms/RAI. Microsoft approach to responsible AI na based on our AI principles of fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.
Big natural language, image, and speech models - like di ones wey dem use for dis sample - fit behave in ways wey no too fair, no reliable, or fit offend people, wey fit cause wahala. Abeg check di Azure OpenAI service Transparency note to sabi all di risks and limits. Di recommended way wey fit help reduce dese risks na to put one safety system for your architecture wey fit detect and stop bad behavior. Azure AI Content Safety dey provide one independent protection layer wey fit detect bad content wey users or AI generate for different apps and services. Azure AI Content Safety get text and image APIs wey make you fit detect harmful material. Inside Microsoft Foundry, di Content Safety service go allow you see, explore and try sample code wey fit detect bad content for different type modality. Di following quickstart documentation go guide you how to make requests to di service.
Another tin to consider na di general application performance. For multi-modal and multi-models applications, we mean say di system go work as you and your users expect, including say e no go generate bad outputs. E important to check di performance of your whole application using Performance and Quality and Risk and Safety evaluators. You fit also create and evaluate using custom evaluators.
You fit evaluate your AI application inside your development environment using di Azure AI Evaluation SDK. If you get test dataset or target, your generative AI application generations go get quantitative measurement with built-in evaluators or custom evaluators wey you pick. To start with di azure ai evaluation sdk to evaluate your system, you fit follow di quickstart guide. After you run evaluation, you fit visualize di results in Microsoft Foundry.
Dis project fit get trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos mean say you gats follow Microsoft's Trademark & Brand Guidelines.
If you dey use Microsoft trademarks or logos for changed versions of dis project, e no suppose cause confusion or make person think say Microsoft sponsor am. Any use of third-party trademarks or logos go dey under those third-party policies.
If you jam wahala or get any question about how to build AI apps, join:
If you get product feedback or error while you dey build, visit:
Disclaimer:
Dis dokment don translate wit AI translation service Co-op Translator. Even though we dey try make am correct, abeg sabi say automated translation fit get errors or mistakes. Di original dokment wey e dey for im own language na di correct source. For important matter, make person wey sabi translate am well translate am. We no go carry any yawa wey fit happen if pesin no understand well or interpret am wrong because of dis translation.
