The Developer’s Guide to Smarter Fine-tuning with Azure AI Foundry
Malena Lopez-Sotelo and Jacques Guibert de Bruet provide developers with a practical guide to fine-tuning large language models in Azure AI Foundry, sharing proven strategies, platform updates, and code samples for launch-ready, business-focused AI.
The Developer’s Guide to Smarter Fine-tuning with Azure AI Foundry
Authors: Malena Lopez-Sotelo, Jacques Guibert de Bruet
Azure AI Foundry is designed to make fine-tuning large language models (LLMs) smarter, faster, and more accessible to developers. Whether you’re building reasoning agents, adaptive tools, or scalable workflows, Azure AI Foundry offers a comprehensive toolkit for customizing AI models to solve business-specific challenges.
What is Fine-tuning?
Fine-tuning takes a pre-trained LLM and customizes it for your task by training it further on your own datasets. This means you can get models tailored to your domain, business language, and nuanced use cases—without building one from scratch. Fine-tuning increases performance, accuracy, and relevance for specific tasks like:
- Legal document analysis
- Domain-specific chatbots and copilots
- Custom recommendation engines
Why Fine-tune?
- Precision: Achieve domain-specific accuracy and reduce generic, unhelpful outputs.
- Cost and Efficiency: Lower inference costs by optimizing models for your use-case.
- Adaptability: Empower AI to understand unique terminology, tone, or workflows.
Real-World Use Case: Wealth Advisory Demo
A fine-tuned model can give detailed, actionable advice—for example, recommending travel gear after considering region-specific weather, brand data, and user intent, rather than generic suggestions. This demonstrates how prompt engineering and retrieval-augmented generation (RAG) combine with fine-tuning for context-aware answers.
Best Practices for Fine-tuning
- Set Clear Objectives: Define target tasks, outcomes, and model behaviors up front.
- Prioritize Data Quality: Use well-labeled, high-quality training datasets for best results.
- Iterate Continuously: Evaluate model outputs, refine data, and retrain as needed.
- Integrate into Your Workflow: Treat fine-tuning as a continuous, feedback-driven process.
- Utilize Azure’s Ecosystem: Leverage integrated tools, REST APIs, monitoring, and Azure’s training infrastructure.
What’s New in Azure AI Foundry for Developers
- Reinforcement Fine-Tuning (RFT): Now generally available, with full API/Swagger support, letting you optimize models based on reward feedback, ideal for agentic workflows.
- Expanded Regional Support: Fine-tune and deploy models globally across 26+ Azure regions, including support for GPT-4o and GPT-4o-mini.
- Developer Tier: Cost-effective option for rapid prototyping, including free hosting for 24 hours and pay-per-token testing.
- Advanced Evaluation Tools: Auto-Evals, Quick Evals, and Python Grader streamline model assessment and debugging.
- Granular Model Control: Easily move models across regions, pause and resume training jobs, and evaluate multiple candidates in parallel.
Steps to Get Started
- Data Preparation: Collect and curate your domain data.
- Model Selection: Pick the best foundation model (e.g., GPT-4o, o4-mini).
- Training: Use Direct Preference Optimization (DPO), RFT, or distillation approaches to refine your model.
- Deployment: Deploy fine-tuned models with Azure’s scaling and monitoring features.
- Iterate: Keep refining based on real-world performance and user feedback for optimal results.
Technical Resources & Sample Code
The Azure AI Foundry developer community offers comprehensive, hands-on material:
Name | Description | Links |
---|---|---|
O4-mini RFT Code Sample | Example of fine-tuning a reasoning model (o4-mini) using RFT | GitHub Repo |
RAFT Fine-tuning Code Sample | Fine-tune Meta Llama 3.1 405B or GPT-4o on Azure AI | GitHub Repo |
GPT-oss-20B Fine-tuning | Managed Compute fine-tuning example | GitHub Repo |
Distill DeepSeek V3 into Phi-4-mini | Knowledge distillation on Azure AI Foundry | GitHub Repo |
AI Tour 2025: Efficient Model Customization | Distillation, RFT, and RAFT in production | GitHub Repo · Slides |
Models for Beginners Course | Introductory curriculum (preview) | GitHub Preview |
Videos
- Azure AI Show: There’s no reason not to fine-tune (YouTube)
- Model Mondays: Fine-tuning & Distillation (YouTube)
Documentation
- Fine-tune models with Azure AI Foundry
- Reinforcement Fine-Tuning (RFT) Overview
- Developer Tier Details
- Evaluations Enhancements & Auto-Evals
Community
- Join discussions on Discord
About the Authors
- Jacques “Jack” Guibert de Bruet: Microsoft Technical Trainer, specializing in intelligent automation and agentic AI solutions.
- Malena Lopez-Sotelo: Product marketing lead for fine-tuning at Microsoft, focused on activating hands-on developer resources.
This post appeared first on “Microsoft AI Foundry Blog”. Read the entire article here