This repository contains 12 end-to-end demos and sample datasets for fine-tuning models on Azure AI Foundry. Use this repo to explore practical fine-tuning workflows and access ready-to-use data for your own projects.
New to fine-tuning? Start here:
- SFT_CNN_DailyMail - Best first demo! Learn Supervised Fine-Tuning with news summarization
- Sample_Datasets - Understand data formats for SFT, DPO, and RFT
Want an AI coding assistant to guide you?
- Open this repo in VS Code with Copilot, or use Claude/Codex — the agent skill auto-discovers and walks you through the full workflow
- Or follow Skills/workflows/quickstart.md — fine-tune your first model in 6 steps (no demo notebook needed)
Ready for advanced techniques?
- DPO_Intel_Orca - Direct Preference Optimization
- RFT_Countdown - Reinforcement Fine-Tuning
Explore end-to-end fine-tuning experiences in the Demos folder:
| Demo | Technique | Use Case | Difficulty |
|---|---|---|---|
| SFT_CNN_DailyMail | SFT | News summarization | ⭐ Beginner |
| SFT_PubMed_Summarization | SFT | Medical paper summarization | ⭐ Beginner |
| DPO_Intel_Orca | DPO | Preference optimization | ⭐⭐ Intermediate |
| RFT_Countdown | RFT | Math puzzle solving | ⭐⭐ Intermediate |
| DistillingSarcasm | Distillation | Knowledge transfer | ⭐⭐ Intermediate |
| Image_Breed_Classification_FT | Vision SFT | Dog breed classification | ⭐⭐ Intermediate |
| Image_FT_Chart_Analysis | Vision SFT | Chart understanding | ⭐⭐ Intermediate |
| Video_FT_Action_Recognition | Vision SFT | Video action detection | ⭐⭐⭐ Advanced |
| ZavaRetailAgent | SFT + RFT | Retail customer service agent | ⭐⭐⭐ Advanced |
| Agentic_RFT_PrivatePreview | RFT | Agentic workflows with tools | ⭐⭐⭐ Advanced |
| Evaluation | Evaluation | Multimodal model evaluation | ⭐⭐ Intermediate |
👉 See Demos/README.md for detailed descriptions of each demo.
Ready-to-use datasets for testing fine-tuning techniques in the Sample_Datasets folder:
| Technique | Dataset | Description |
|---|---|---|
| SFT | Text-GSM8K | Grade school math problems |
| SFT | Multimodal-chartqa | Chart interpretation |
| SFT | Tool-Calling | Function calling patterns |
| DPO | orca_dpo_pairs | Preference alignment |
| RFT | ClauseMatching | Legal contract analysis |
| RFT | MedMCQ | Medical Q&A |
👉 See Sample_Datasets/README.md for data format details and when to use each technique.
⚠️ Note: These datasets are for learning and experimentation only—not for production use. Training jobs may incur costs on your Azure subscription.
This repo includes a fine-tuning skill that coding agents can auto-discover and use to help you submit, monitor, and evaluate fine-tuning jobs.
| Agent | Skill Path | Auto-discovery |
|---|---|---|
| GitHub Copilot (VS Code / CLI) | .github/skills/azure-ai-fine-tuning | ✅ Automatic |
| Claude Code | .claude/skills/azure-ai-fine-tuning | ✅ Automatic |
| Codex / other agents | .agents/skills/azure-ai-fine-tuning | ✅ Automatic |
All three paths are symlinks to the canonical skill at Skills/, which includes:
- SKILL.md — Agent instructions covering SFT, DPO, and RFT workflows
- 12 scripts — submit, monitor, calibrate, check, deploy, evaluate, validate, score, convert, generate, cleanup, and shared utilities
- 14 reference docs — grader design, hyperparameters, dataset formats, agentic RFT, cost management, and more
- 6 guided workflows — quickstart, full pipeline, dataset creation, iterative training, diagnosis, experiment review
- Sample data — SFT, DPO, and RFT example JSONL files
- Open this repo in VS Code with Copilot Chat enabled.
- Ask a fine-tuning task (e.g., "help me submit an SFT job with my dataset").
- Copilot auto-discovers the skill from
.github/skills/and follows the workflow.
cd /path/to/this/repo
copilot
# Then ask: "Submit an SFT fine-tuning job with my training data"cd /path/to/this/repo
claude
# Then ask: "Fine-tune gpt-4.1-mini on my dataset"Scripts support uv for zero-setup execution (PEP 723 inline dependencies):
uv run Skills/scripts/submit_training.py --helpBefore running any demo, ensure you have:
- Azure subscription with access to Azure AI Foundry
- Python 3.9+ installed
- Jupyter Notebook or VS Code with Jupyter extension
- Required Azure role assignments (see individual demo READMEs)
Each demo includes a requirements.txt and .env.template for setup.
👉 New here? See the Getting Started Guide for step-by-step setup instructions.
See CONTRIBUTING.md for guidelines on submitting issues and pull requests.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.