PhiCookBook / nl
AGENTS.md3.9k starsChanged 9 months agoMITView on GitHub
PhiCookBook is een uitgebreide kookboekrepository die praktische voorbeelden, tutorials en documentatie bevat voor het werken met Microsofts Phi-familie van kleine taalmodellen (SLM's). De repository demonstreert verschillende use-cases, waaronder inferentie, fine-tuning, kwantisatie, RAG-implementaties en multimodale toepassingen op verschillende platforms en frameworks. Belangrijke technologieën: - Talen: Python, C#/.NET, JavaScript/Node.js - Frameworks: ONNX Runtime, PyTorch, Transformers, MLX, OpenVINO, Semantic Kernel - Platforms: Microsoft Foundry, GitHub Models, Hugging Face, Ollama - Modeltypen: Phi-3, Phi-3.5, Phi-4 (tekst-, vision-, multimodaal-, reasoningvarianten) Repositorystructuur: - /code/ - Werkende…
- Installs packages
Trending
Quiet since July.thin dataabout the whole repository
Who's talking about microsoft/PhiCookBook
- Azure/co-op-translator“Over translation "Jupyter ノートブック"→"Jupyter Notebook" (en→jp)”GitHub · Jul 1, 2026 · 1 reactions
- Azure/co-op-translator“Markdown bold not handled correctly (en→jp)”GitHub · Feb 2, 2026 · 1 reactions
- Azure/co-op-translator“Incorrect chunking of list items with code placeholders causes broken ``` fences”GitHub · Jan 30, 2026 · 1 reactions
- Azure/co-op-translator“Unclosed code block (en→ja)”GitHub · Dec 18, 2025 · 1 reactions
- microsoft/generative-ai-with-javascript“Link Checker Report”GitHub · Feb 15, 2026
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub (9 times).
On GitHub · 9
- Jul 1, 2026Over translation "Jupyter ノートブック"→"Jupyter Notebook" (en→jp) — Azure/co-op-translator1 reaction · 10 comments
- Feb 2, 2026Markdown bold not handled correctly (en→jp) — Azure/co-op-translator1 reaction
- Jan 30, 2026Incorrect chunking of list items with code placeholders causes broken ``` fences — Azure/co-op-translator1 reaction · 4 comments
- Dec 18, 2025Unclosed code block (en→ja) — Azure/co-op-translator1 reaction · 1 comment
- Feb 15, 2026Link Checker Report — microsoft/generative-ai-with-javascript0 reactions
4 more on GitHub
- Feb 15, 2026Link Checker Report — microsoft/generative-ai-with-javascript0 reactions
- Jun 14, 2025Mixed-Language Output in Multiple Translations — Azure/co-op-translator0 reactions
- Jun 5, 2025[tiny] Update phi3-vision configs to use oumi trainer — oumi-ai/oumi0 reactions
- May 8, 2025Need to make eval feature on Co-op Translator — Azure/co-op-translator0 reactions
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- translations/ar/AGENTS.mdAGENTS.md
- translations/bg/AGENTS.mdAGENTS.md
- translations/bn/AGENTS.mdAGENTS.md
- translations/cs/AGENTS.mdAGENTS.md
- translations/da/AGENTS.mdAGENTS.md
- translations/de/AGENTS.mdAGENTS.md
- translations/el/AGENTS.mdAGENTS.md
- translations/en/AGENTS.mdAGENTS.md
- translations/es/AGENTS.mdAGENTS.md
- translations/et/AGENTS.mdAGENTS.md
- translations/fa/AGENTS.mdAGENTS.md
- translations/fi/AGENTS.mdAGENTS.md
- translations/fr/AGENTS.mdAGENTS.md
- translations/he/AGENTS.mdAGENTS.md
- translations/hi/AGENTS.mdAGENTS.md
- translations/hr/AGENTS.mdAGENTS.md
- translations/hu/AGENTS.mdAGENTS.md
- translations/id/AGENTS.mdAGENTS.md
- translations/it/AGENTS.mdAGENTS.md
- translations/ja/AGENTS.mdAGENTS.md
- translations/km/AGENTS.mdAGENTS.md
- translations/kn/AGENTS.mdAGENTS.md
- translations/ko/AGENTS.mdAGENTS.md
- translations/lt/AGENTS.mdAGENTS.md
- translations/ml/AGENTS.mdAGENTS.md
- translations/mr/AGENTS.mdAGENTS.md
- translations/ms/AGENTS.mdAGENTS.md
- translations/my/AGENTS.mdAGENTS.md
- translations/ne/AGENTS.mdAGENTS.md
- translations/no/AGENTS.mdAGENTS.md
- translations/pa/AGENTS.mdAGENTS.md
- translations/pcm/AGENTS.mdAGENTS.md
- translations/pl/AGENTS.mdAGENTS.md
- translations/pt-BR/AGENTS.mdAGENTS.md
- translations/pt-PT/AGENTS.mdAGENTS.md
- translations/ro/AGENTS.mdAGENTS.md
- translations/ru/AGENTS.mdAGENTS.md
- translations/sk/AGENTS.mdAGENTS.md
- translations/sl/AGENTS.mdAGENTS.md
- translations/sr/AGENTS.mdAGENTS.md
- translations/sv/AGENTS.mdAGENTS.md
- translations/sw/AGENTS.mdAGENTS.md
- translations/ta/AGENTS.mdAGENTS.md
- translations/te/AGENTS.mdAGENTS.md
- translations/th/AGENTS.mdAGENTS.md
- translations/tl/AGENTS.mdAGENTS.md
- translations/tr/AGENTS.mdAGENTS.md
- translations/uk/AGENTS.mdAGENTS.md
- translations/ur/AGENTS.mdAGENTS.md
- translations/vi/AGENTS.mdAGENTS.md
- translations/zh-CN/AGENTS.mdAGENTS.md
- translations/zh-HK/AGENTS.mdAGENTS.md
- translations/zh-MO/AGENTS.mdAGENTS.md
- translations/zh-TW/AGENTS.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 205
Test links lokaal: Ctrl+klik in VS Code
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Projectoverzicht
PhiCookBook is een uitgebreide kookboekrepository die praktische voorbeelden, tutorials en documentatie bevat voor het werken met Microsofts Phi-familie van kleine taalmodellen (SLM's). De repository demonstreert verschillende use-cases, waaronder inferentie, fine-tuning, kwantisatie, RAG-implementaties en multimodale toepassingen op verschillende platforms en frameworks.
Belangrijke technologieën:
- Talen: Python, C#/.NET, JavaScript/Node.js
- Frameworks: ONNX Runtime, PyTorch, Transformers, MLX, OpenVINO, Semantic Kernel
- Platforms: Microsoft Foundry, GitHub Models, Hugging Face, Ollama
- Modeltypen: Phi-3, Phi-3.5, Phi-4 (tekst-, vision-, multimodaal-, reasoningvarianten)
Repositorystructuur:
/code/- Werkende codevoorbeelden en voorbeeldimplementaties/md/- Gedetailleerde documentatie, tutorials en how-to guides/translations/- Meertalige vertalingen (50+ talen via geautomatiseerde workflow)/.devcontainer/- Dev containerconfiguratie (Python 3.12 met Ollama)
Ontwikkelomgeving Installatie
Gebruik van GitHub Codespaces of Dev Containers (aanbevolen)
- Open in GitHub Codespaces (snelste):
- Klik op de badge "Open in GitHub Codespaces" in de README
- Container configureert automatisch met Python 3.12 en Ollama met Phi-3
- Open in VS Code Dev Containers:
- Gebruik de badge "Open in Dev Containers" uit de README
- Container vereist minimaal 16GB hostgeheugen
Lokale Installatie
Vereisten:
- Python 3.12 of hoger
- .NET 8.0 SDK (voor C# voorbeelden)
- Node.js 18+ en npm (voor JavaScript voorbeelden)
- Minimaal 16GB RAM aanbevolen
Installatie:
git clone https://github.com/microsoft/PhiCookBook.git
cd PhiCookBookVoor Python Voorbeelden: Navigeer naar specifieke mapjes met voorbeelden en installeer dependencies:
cd code/<example-directory>
pip install -r requirements.txt # als requirements.txt bestaatVoor .NET Voorbeelden:
cd md/04.HOL/dotnet/src
dotnet restore LabsPhi.sln
dotnet build LabsPhi.slnVoor JavaScript/Web Voorbeelden:
cd code/08.RAG/rag_webgpu_chat
npm install
npm run dev # Start de ontwikkelserver
npm run build # Bouw voor productieRepository Organisatie
Codevoorbeelden (/code/)
- 01.Introduce/ - Basisintroducties en opstartvoorbeelden
- 03.Finetuning/ en 04.Finetuning/ - Voorbeelden van fine-tuning met verschillende methoden
- 03.Inference/ - Inferentievoorbeelden op verschillende hardware (AIPC, MLX)
- 06.E2E/ - End-to-end toepassingsvoorbeelden
- 07.Lab/ - Laboratorium-/experimentele implementaties
- 08.RAG/ - Retrieval-Augmented Generation voorbeelden
- 09.UpdateSamples/ - Laatst geüpdatete voorbeelden
Documentatie (/md/)
- 01.Introduction/ - Introductiegidsen, omgevingsinstellingen, platformgidsen
- 02.Application/ - Toepassingsvoorbeelden georganiseerd per type (Tekst, Code, Vision, Audio, etc.)
- 02.QuickStart/ - Snelle startgidsen voor Microsoft Foundry en GitHub Models
- 03.FineTuning/ - Documentatie en tutorials voor fine-tuning
- 04.HOL/ - Hands-on labs (inclusief .NET voorbeelden)
Bestandsformaten
- Jupyter Notebooks (
.ipynb) - Interactieve Python tutorials gemarkeerd met 📓 in README - Python Scripts (
.py) - Standalone Python voorbeelden - C# Projecten (
.csproj,.sln) - .NET applicaties en voorbeelden - JavaScript (
.js,package.json) - Webgebaseerde en Node.js voorbeelden - Markdown (
.md) - Documentatie en handleidingen
Werken met Voorbeelden
Jupyter Notebooks uitvoeren
De meeste voorbeelden zijn beschikbaar als Jupyter notebooks:
pip install jupyter notebook
jupyter notebook # Opent browserinterface
# Navigeer naar het gewenste .ipynb-bestandPython Scripts uitvoeren
cd code/<example-directory>
pip install -r requirements.txt
python <script-name>.py.NET Voorbeelden uitvoeren
cd md/04.HOL/dotnet/src/<project-name>
dotnet runOf bouw de hele oplossing:
cd md/04.HOL/dotnet/src
dotnet run --project <project-name>JavaScript/Web Voorbeelden uitvoeren
cd code/08.RAG/rag_webgpu_chat
npm install
npm run dev # Ontwikkeling met hot reloadTesten
Deze repository bevat voorbeeldcode en tutorials in plaats van een traditioneel softwareproject met unittests. Validatie gebeurt meestal door:
- Voorbeelden uitvoeren - Elk voorbeeld moet zonder fouten draaien
- Outputs verifiëren - Controleren of modelantwoorden passend zijn
- Tutorials volgen - Stapsgewijze gidsen moeten werken zoals beschreven
Veelgebruikte validatieaanpak:
- Voorbeelden testen in de doelsysteemomgeving
- Controleren of dependencies correct installeren
- Controleren of modellen succesvol downloaden/laden
- Bevestigen dat het verwachte gedrag overeenkomt met documentatie
Code Stijl en Conventies
Algemene Richtlijnen
- Voorbeelden moeten duidelijk, goed van commentaar voorzien en educatief zijn
- Volg taalspecifieke conventies (PEP 8 voor Python, C# standaarden voor .NET)
- Houd voorbeelden gefocust op het demonstreren van specifieke Phi modelcapaciteiten
- Voeg commentaren toe die sleutelconcepten en modelspecifieke parameters uitleggen
Documentatiestandaarden
URL-formatering:
- Gebruik het formaat
[tekst](../../url)zonder extra spaties - Relatieve links: Gebruik
./voor huidige map,../voor bovenliggende map - Geen taalspecifieke locaties in URLs (vermijd
/en-us/,/en/)
Afbeeldingen:
- Bewaar alle afbeeldingen in de map
/imgs/ - Gebruik beschrijvende namen met Engelse letters, cijfers en koppeltekens
- Voorbeeld:
phi-3-architecture.png
Markdown-bestanden:
- Verwijs naar werkende voorbeelden in
/code/ - Houd documentatie synchroon met codewijzigingen
- Gebruik 📓 emoji om Jupyter notebook-links in README te markeren
Bestandsorganisatie
- Codevoorbeelden in
/code/georganiseerd per onderwerp/functie - Documentatie in
/md/weerspiegelt de codestructuur waar mogelijk - Houd gerelateerde bestanden (notebooks, scripts, configs) samen in submappen
Richtlijnen voor Pull Requests
Voor indienen
- Fork de repository naar je eigen account
- Scheid PR's op type:
- Bugfixes in aparte PR
- Documentatie-updates in een andere PR
- Nieuwe voorbeelden in aparte PR's
- Typfouten kunnen gecombineerd
- Omgaan met mergeconflicten:
- Werk je lokale
mainbranch bij vóór wijzigingen - Synchroniseer regelmatig met upstream
- Werk je lokale
- Vertalingen-PR's:
- Moeten vertalingen bevatten voor ALLE bestanden in de map
- Behoud consistente structuur met originele taal
Vereiste controles
PR's draaien automatisch GitHub workflows om te valideren:
- Relatieve padvalidatie - Alle interne links moeten werken
- Test links lokaal: Ctrl+klik in VS Code
- Gebruik padvoorstellen uit VS Code (
./of../)
- URL locale check - Web-URLs mogen geen land- of taalcodes bevatten
- Verwijder
/en-us/,/en/of andere taalcodes - Gebruik generieke internationale URLs
- Verwijder
- Broken URL check - Alle URLs moeten status 200 teruggeven
- Controleer links op toegankelijkheid vóór indienen
- Opmerking: sommige fouten kunnen door netwerkrestricties komen
PR Titel Formaat
[component] Brief descriptionVoorbeelden:
[docs] Voeg Phi-4 inferentie tutorial toe[code] Fix ONNX Runtime integratie voorbeeld[translation] Voeg Japanse vertaling toe voor intro guides
Veelvoorkomende Ontwikkelpatronen
Werken met Phi Modellen
Model Laden:
- Voorbeelden gebruiken verschillende frameworks: Transformers, ONNX Runtime, MLX, OpenVINO
- Modellen worden meestal gedownload van Hugging Face, Azure of GitHub Models
- Controleer modelcompatibiliteit met je hardware (CPU, GPU, NPU)
Inferentiepatronen:
- Tekstgeneratie: De meeste voorbeelden gebruiken chat-/instruct-varianten
- Vision: Phi-3-vision en Phi-4-multimodal voor beeldbegrip
- Audio: Phi-4-multimodal ondersteunt audio-inputs
- Reasoning: Phi-4-reasoning varianten voor geavanceerde redeneertaken
Platformspecifieke Notities
Microsoft Foundry:
- Vereist Azure-abonnement en API keys
- Zie
/md/02.QuickStart/AzureAIFoundry_QuickStart.md
GitHub Models:
- Gratis laag beschikbaar voor testen
- Zie
/md/02.QuickStart/GitHubModel_QuickStart.md
Lokale Inferentie:
- ONNX Runtime: Cross-platform, geoptimaliseerde inferentie
- Ollama: Makkelijk lokaal modelbeheer (voorgeconfigureerd in dev container)
- Apple MLX: Geoptimaliseerd voor Apple Silicon
Problemen oplossen
Veelvoorkomende Problemen
Geheugenproblemen:
- Phi modellen vereisen veel RAM (vooral vision/multimodaal varianten)
- Gebruik gequantiseerde modellen in omgevingen met beperkte middelen
- Zie
/md/01.Introduction/04/QuantifyingPhi.md
Dependencyconflicten:
- Python voorbeelden kunnen specifieke versievereisten hebben
- Gebruik virtuele omgevingen per voorbeeld
- Controleer individuele
requirements.txtbestanden
Model Download Problemen:
- Grote modellen kunnen timeout geven bij langzame verbindingen
- Overweeg cloudomgevingen te gebruiken (Codespaces, Azure)
- Controleer Hugging Face cache:
~/.cache/huggingface/
.NET Projectproblemen:
- Zorg dat .NET 8.0 SDK geïnstalleerd is
- Gebruik
dotnet restorevóór builden - Sommige projecten hebben CUDA-specifieke configuraties (Debug_Cuda)
JavaScript/Web Voorbeelden:
- Gebruik Node.js 18+ voor compatibiliteit
- Verwijder
node_modulesen installeer opnieuw bij problemen - Controleer browserconsole op WebGPU compatibiliteitsproblemen
Hulp krijgen
- Discord: Word lid van de Microsoft Foundry Community Discord
- GitHub Issues: Meld bugs en problemen in de repository
- GitHub Discussions: Stel vragen en deel kennis
Aanvullende Context
Verantwoordelijke AI
Alle Phi modelgebruik moet voldoen aan Microsofts Responsible AI principes:
- Eerlijkheid, betrouwbaarheid, veiligheid
- Privacy en beveiliging
- Inclusiviteit, transparantie, verantwoordelijkheid
- Gebruik Azure AI Content Safety voor productieapplicaties
- Zie
/md/01.Introduction/01/01.AISafety.md
Vertalingen
- 50+ talen ondersteund via geautomatiseerde GitHub Action
- Vertalingen in map
/translations/ - Beheerd door co-op-translator workflow
- Vertaalde bestanden niet handmatig aanpassen (automatisch gegenereerd)
Bijdragen
- Volg richtlijnen in
CONTRIBUTING.md - Stem in met Contributor License Agreement (CLA)
- Houd je aan Microsoft Open Source Gedragscode
- Houd beveiliging en inloggegevens uit commits
Meertalige Ondersteuning
Dit is een polyglot repository met voorbeelden in:
- Python - ML/AI workflows, Jupyter notebooks, fine-tuning
- C#/.NET - Enterprise applicaties, ONNX Runtime integratie
- JavaScript - Webgebaseerde AI, browserinferentie met WebGPU
Kies de taal die het beste past bij je use-case en doelsysteem.
<!-- CO-OP TRANSLATOR DISCLAIMER START -->Disclaimer: Dit document is vertaald met behulp van de AI-vertalingsservice Co-op Translator. Hoewel we streven naar nauwkeurigheid, kan een automatische vertaling fouten of onnauwkeurigheden bevatten. Het oorspronkelijke document in de oorspronkelijke taal moet als gezaghebbende bron worden beschouwd. Voor cruciale informatie wordt professionele menselijke vertaling aanbevolen. Wij zijn niet aansprakelijk voor misverstanden of verkeerde interpretaties die voortvloeien uit het gebruik van deze vertaling.
<!-- CO-OP TRANSLATOR DISCLAIMER END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

