Lesson 5 of 5 MLOps Orchestration and Model Versioning

Automating Fine-Tuned Foundation Model Deployment

This lesson explains how to automate the deployment of fine-tuned foundation models with versioning, just as for traditional models, as new data arrives or base models improve.

Learning outcomes

After completing this lesson, you will be able to:

  • Build a fine-tuning pipeline for a Bedrock custom model.
  • Version and tag custom models.
  • Deploy custom models on demand or with Provisioned Throughput.

A fine-tuning pipeline

A pipeline for a Bedrock custom model typically: validates and prepares the JSONL training data; starts a model customisation job (CreateModelCustomizationJob) with the base model, hyperparameters and data locations; waits for completion; evaluates the resulting custom model against the current production model and the base model with a Bedrock evaluation job; and records the result. Step Functions orchestrates these API calls well; SageMaker Pipelines does the same for fine-tuning jobs on SageMaker AI.

The following diagram shows a monthly fine-tuning workflow and how the application picks up the new model.

The monthly fine-tuning workflow. EventBridge Scheduler starts Step Functions on the first of the month; the workflow validates the new JSONL file, runs a customisation job and waits for it, and a Bedrock evaluation job compares the new and current models with an LLM judge. If the new model wins and is approved, the Parameter Store value with the deployment ARN is updated, and the previous ARN is kept for rollback.
The scenario is illustrative.
Put in order

Monthly fine-tuning

Exam skills 3.3.10

Arrange the steps of an automated fine-tuning release on Amazon Bedrock.

Log in to try this activity Interactive activities are free with an account.

Versioning custom models

Each customisation job produces a new custom model with its own ARN, and over time a team accumulates many of them. Each should be tagged with the version of the training data, the base model, the hyperparameters and its evaluation scores, and recorded in a registry, either the SageMaker Model Registry or a model catalogue table.

Models fine-tuned on SageMaker AI are registered as model package versions directly. Earlier versions are kept, so that a regression can be rolled back quickly and auditors can see which model was in use at any time.

True or false

Versioning custom models

Exam skills 3.3.10

Check how fine-tuned model versions are tracked.

Log in to try this activity Interactive activities are free with an account.

Deploying custom models

Bedrock custom models are served through on-demand custom model deployment (pay per token, for supported models) or Provisioned Throughput. Applications should reference a deployment or provisioned model ARN stored in configuration (such as Parameter Store) so switching to a new version, or back, is a configuration change. For SageMaker AI endpoints, deployment guardrails shift traffic gradually. The following table summarises the stages.

Bedrock
TrainModel customisation job
VersionCustom model ARN plus tags and registry entry
EvaluateBedrock evaluation job vs. current model
DeployOn-demand custom model deployment or Provisioned Throughput
Roll backRepoint configuration to previous deployment
SageMaker AI
TrainTraining job (JumpStart, HyperPod, script mode)
VersionModel package version
EvaluateEvaluation step vs. current model
DeployEndpoint update with guardrails
Roll backPrevious model package and endpoint config
Worked example

Monthly fine-tuning

A support summariser is fine-tuned monthly on newly reviewed summaries.

  • EventBridge Scheduler starts a Step Functions workflow on the first of each month.
  • The workflow validates the new JSONL file, starts a customisation job and waits for completion.
  • A Bedrock evaluation job scores the new custom model and the current one on a fixed test set with LLM-as-a-judge.
  • If the new model wins, it is deployed, the Parameter Store value with the deployment ARN is updated after approval, and the previous ARN is kept for rollback.

The application reads the model ARN from Parameter Store, so promotion and rollback never require a code release.

Check yourself

What does each Bedrock customisation job create?

Show answer

A new custom model ARN, which should be tagged and registered.

Exam Tips

Remember for the exam

  • Automate customisation jobs with Step Functions or SageMaker Pipelines.
  • Every customisation job creates a new custom model ARN: tag and register it.
  • Evaluate the new custom model against the current one before switching.
  • Serve Bedrock custom models with on-demand deployment or Provisioned Throughput.
  • Store the active model ARN in configuration for easy rollback.