Lesson 2 of 2 Operating Fine-Tuned Models

Fine-Tuned Models from Development to Production

This lesson explains the deployment options for fine-tuned models and their costs, how new versions are promoted and rolled back, and how base model retirement affects fine-tuned models.

Learning outcomes

After completing this lesson, you will be able to:

  • Compare the deployment types for fine-tuned models.
  • Describe a promotion and rollback process.
  • Explain how fine-tuning is automated.
  • Describe the two phases of fine-tuned model retirement.

Deployment options and costs

A fine-tuned model does not serve requests until it is deployed. The deployment types available depend on the model and region, and they differ in lifetime, service level and cost, as the following table shows.

Deployment typeBillingCharacteristicsTypical use
DeveloperTokens only, no hosting feeLasts 24 hours; no SLA or data residency; not available for every modelEvaluating candidates and checkpoints
StandardHourly hosting fee plus tokensRuns in the deployment's regionProduction with regional data residency
Data Zone StandardHourly hosting fee plus tokensRuns within a data zone (currently the United States only)Production with data zone requirements
Global StandardHourly hosting fee plus tokensUses global capacity; custom weights may be stored temporarily outside the resource's geographyProduction without strict residency
Provisioned ThroughputProvisioned throughput units (PTUs)Reserved capacity with predictable throughputSteady, high-volume production traffic

The hourly hosting fee of Standard and Global Standard deployments is charged whether or not the deployment receives traffic, which makes forgotten test deployments a common source of unexpected cost. Development and evaluation should use Developer deployments where they are available, and unused deployments should be deleted. Deleting a deployment does not delete the fine-tuned model, which can be deployed again later.

az cognitiveservices account deployment create \
  --resource-group rg-claims --name fdy-claims \
  --deployment-name claims-ft-v3 \
  --model-name "gpt-4.1-mini-2025-04-14.ft-0a1b2c3d" --model-version 1 \
  --model-format OpenAI \
  --sku-name GlobalStandard --sku-capacity 50

Promotion and rollback

Promotion from development to production follows a defined process, so that every production model can be traced to its data and evaluation and replaced safely.

  1. Record

    Store the training data version, base model, method, hyperparameters, job ID and fine-tuned model ID.

  2. Evaluate

    Run the evaluation suite against the base and production models and record the results.

  3. Approve

    Require sign-off, for example through a protected environment in GitHub Actions.

  4. Deploy alongside

    Create a new production deployment next to the current one, rather than replacing it.

  5. Shift traffic gradually

    Route a small share of traffic to the new deployment in the application or gateway, and compare metrics.

  6. Complete or roll back

    Move all traffic if metrics hold; otherwise switch back to the previous deployment.

Keeping the previous deployment until the new one is proven makes rollback a configuration change rather than a new deployment. Applications should read the deployment name from configuration, so that switching does not require a code change.

Automating fine-tuning

Fine-tuning becomes repeatable when it is run as a pipeline rather than by hand. A GitHub Actions workflow or Azure Machine Learning pipeline validates the data files, uploads them, creates the job, waits for completion, runs the evaluation suite, and publishes the results; deployment to production runs only after the evaluation passes and the release is approved. The workflow authenticates with workload identity federation and a role such as Foundry User on the project, rather than with keys.

Automation also makes it practical to retrain on a schedule or when monitoring shows that quality has fallen, using the newest data and the same evaluation gate.

Moving models between environments

Development, test and production often use separate Foundry resources, sometimes in different regions or subscriptions. A fine-tuned model can be made available in another resource by copying it, where the model and regions support it, or by running the same training pipeline in the target resource with the same data and settings. Rebuilding from the pipeline is always possible, and it confirms that the training process, not only the model, is reproducible.

Fine-tuned models are trained from a specific base model version, so their availability is limited by the base model's lifecycle and by the fine-tuning regions of that model.

Base model retirement

A fine-tuned model depends on its base model, and fine-tuned models retire in two phases. Training retirement ends the ability to create new fine-tuning jobs on the base model; unless stated otherwise, it happens no earlier than the base model's retirement. Deployment retirement, usually later, ends inference on fine-tuned models built from that base model. The Foundry model retirement schedule lists both dates for each model. A fine-tuned model cannot be moved to a new base model; before its deployment retirement date, it must be retrained on a successor model.

Teams that kept their training data, generation lineage, pipeline and evaluation suite can retrain on the successor, compare the new model with the current one using the same tests, and promote it with the usual process. Teams that did not keep them must reconstruct the dataset under time pressure. Monitoring the model lifecycle and planning retraining early is part of operating a fine-tuned model.

Worked example

Releasing a new version

A fine-tuned claims model, version 2, serves production on a Global Standard deployment. Version 3, trained on new data, scored better on the held-out set using a Developer deployment. The team wants to release version 3 with minimal risk and cost, and its base model is scheduled for retirement in eight months.

Create a new Global Standard deployment for version 3 alongside version 2, and route a small share of traffic to it from the application's configuration or gateway while comparing quality, latency and error metrics. If the metrics hold, move all traffic and then delete the version 2 deployment to stop its hourly fee, keeping the version 2 model available for redeployment. Start retraining on the successor base model with the same pipeline and evaluation suite well before the retirement date.

Replacing the version 2 deployment in place removes the quick rollback path. Keeping both deployments indefinitely doubles the hosting fees. Serving version 3 from the Developer deployment is not suitable for production, because it has no SLA and is removed after 24 hours.

Check yourself

Why should a Developer deployment of a fine-tuned model not serve production traffic?

Show answer

A Developer deployment lasts only 24 hours and has no SLA. It suits evaluation because it has no hosting fee; production needs a Standard, Global Standard or provisioned deployment.

Exam Tips

Remember for the exam

  • Developer deployments: tokens only, 24 hours, no SLA; use them for evaluation.
  • Standard and Global Standard deployments charge hourly hosting even without traffic.
  • Deploy a new version alongside the old one, shift traffic gradually, keep a rollback path.
  • Fine-tuned models retire in two phases, training then deployment; keep data and pipelines to retrain on a successor.