azd) AI fine-tuning extension to set up and run fine-tuning jobs in Microsoft Foundry. The extension lets you initialize projects from templates, submit and manage fine-tuning jobs, and deploy fine-tuned models directly from your terminal.
Prerequisites
- The Azure Developer CLI (
azd) installed (version 1.22.1 or later) and authenticated (azd auth login). - The
azdAI fine-tuning extension installed (azd ext install azure.ai.finetune). See Install the fine-tuning extension for details. - An Azure subscription with permission to create and manage Microsoft Foundry resources.
- (Optional) The GitHub CLI installed, if you plan to download sample templates from GitHub repositories.
Install the Azure Developer CLI
Installazd for your operating system.
Verify the installation
After installing, verify thatazd is installed and meets the minimum version requirement:
Install the fine-tuning extension
Add the Azure AI fine-tuning extension toazd:
Authenticate
Sign in to Azure (required)
Authenticate with your Azure account to access your subscription and resources:Initialize your project
Use theazd ai finetuning init command to scaffold a fine-tuning project. Navigate to your desired working directory before running any of the following initialization methods.
Find your project ARM resource ID
To initialize with an Azure AI Foundry project, you need the project’s ARM resource ID. The resource ID follows this format:Option 1: Project + Template
Use an existing Azure AI Foundry project with a template:Option 2: Project + Existing job
Clone configuration from an existing fine-tuning job:Option 3: Template only
Start from a template and configure the project later:Option 4: Clone from job
Clone configuration from an existing job ID:Option 5: Project endpoint only
Initialize with just your Azure AI Foundry project endpoint:Option 6: Interactive mode
Run without parameters for guided setup prompts:Option 7: Minimal init (with subscription lookup)
Use minimal initialization for a simplified interactive experience with subscription lookup:Run fine-tuning commands
Navigate to your project folder (wherefine-tune-job.yaml is located) and use the following commands to manage fine-tuning jobs.
Quick submit (skip initialization)
You can submit a job directly without runningazd init first by providing the subscription and project endpoint inline:
| Parameter | Description |
|---|---|
-f | Path to the job YAML file |
-s | Azure subscription ID |
-e | Project endpoint URL |
Submit a job
List jobs
Show job details
Pause a job
Resume a job
Cancel a job
Deploy your fine-tuned model
Once your fine-tuning job completes successfully, deploy the model for inference:| Parameter | Description |
|---|---|
-i | Job ID |
-d | Deployment name |
-c | Capacity |
-m | Model provider |
-s | SKU name |
-v | Version |
Quick reference
Init parameters
| Parameter | Description |
|---|---|
-p | Project resource ID (ARM) |
-e | Project endpoint URL |
-t | Template URL or path |
-j | Clone from job ID |
-w | Working directory |
-n | Environment name |
-s | Subscription ID |
Job parameters
| Parameter | Description |
|---|---|
-f | YAML file path |
-i | Job ID |