Markdown Converter
Agent skill for markdown-converter
PhiCookBook is a comprehensive repository of cookbooks containing practical examples, tutorials, and documentation for working with Microsoft's Phi family of Small Language Models (SLMs). The repository showcases various use cases, including inference, fine-tuning, quantization, RAG implementations,
Sign in to like and favorite skills
PhiCookBook is a comprehensive repository of cookbooks containing practical examples, tutorials, and documentation for working with Microsoft's Phi family of Small Language Models (SLMs). The repository showcases various use cases, including inference, fine-tuning, quantization, RAG implementations, and multimodal applications across different platforms and frameworks.
Key Technologies:
Repository Structure:
/code/ - Functional code examples and sample implementations/md/ - Detailed documentation, tutorials, and guides/translations/ - Multi-language translations (50+ languages via automated workflow)/.devcontainer/ - Dev container configuration (Python 3.12 with Ollama)Open in GitHub Codespaces (fastest):
Open in VS Code Dev Containers:
Prerequisites:
Installation:
git clone https://github.com/microsoft/PhiCookBook.git cd PhiCookBook
For Python Examples: Navigate to specific example directories and install dependencies:
cd code/<example-directory> pip install -r requirements.txt # if requirements.txt exists
For .NET Examples:
cd md/04.HOL/dotnet/src dotnet restore LabsPhi.sln dotnet build LabsPhi.sln
For JavaScript/Web Examples:
cd code/08.RAG/rag_webgpu_chat npm install npm run dev # Start development server npm run build # Build for production
/code/)/md/).ipynb) - Interactive Python tutorials marked with 📓 in README.py) - Standalone Python examples.csproj, .sln) - .NET applications and samples.js, package.json) - Web-based and Node.js examples.md) - Documentation and guidesMost examples are provided as Jupyter notebooks:
pip install jupyter notebook jupyter notebook # Opens browser interface # Navigate to desired .ipynb file
cd code/<example-directory> pip install -r requirements.txt python <script-name>.py
cd md/04.HOL/dotnet/src/<project-name> dotnet run
Or build the entire solution:
cd md/04.HOL/dotnet/src dotnet run --project <project-name>
cd code/08.RAG/rag_webgpu_chat npm install npm run dev # Development with hot reload
This repository contains example code and tutorials rather than a traditional software project with unit tests. Validation is typically done by:
Common validation approach:
URL Formatting:
[text](../../url) format without extra spaces./ for the current directory, ../ for parent/en-us/, /en/)Images:
/imgs/ directoryphi-3-architecture.pngMarkdown Files:
/code/ directory/code/ are organized by topic/feature/md/ mirrors the code structure when applicableFork the repository to your account
Separate PRs by type:
Handle merge conflicts:
main branch before making changesTranslation PRs:
PRs automatically run GitHub workflows to validate:
Relative path validation - All internal links must work
./ or ../)URL locale check - Web URLs must not contain country locales
/en-us/, /en/, or other language codesBroken URL check - All URLs must return a 200 status
[component] Brief description
Examples:
[docs] Add Phi-4 inference tutorial[code] Fix ONNX Runtime integration example[translation] Add Japanese translation for intro guidesModel Loading:
Inference Patterns:
Azure AI Foundry:
/md/02.QuickStart/AzureAIFoundry_QuickStart.mdGitHub Models:
/md/02.QuickStart/GitHubModel_QuickStart.mdLocal Inference:
Memory Issues:
/md/01.Introduction/04/QuantifyingPhi.mdDependency Conflicts:
requirements.txt filesModel Download Failures:
~/.cache/huggingface/.NET Project Issues:
dotnet restore before buildingJavaScript/Web Examples:
node_modules and reinstall if issues persistAll Phi model usage should follow Microsoft's Responsible AI principles:
/md/01.Introduction/01/01.AISafety.md/translations/ directoryCONTRIBUTING.mdThis is a polyglot repository with examples in:
Choose the language that best fits your use case and deployment target.
Disclaimer:
This document has been translated using the AI translation service Co-op Translator. While we aim for accuracy, please note that automated translations may include errors or inaccuracies. The original document in its native language should be regarded as the authoritative source. For critical information, professional human translation is advised. We are not responsible for any misunderstandings or misinterpretations resulting from the use of this translation.