Search⌘ K
AI Features

Fine-Tuning Options on Bedrock

Explore the six customization options in Amazon Bedrock including supervised fine-tuning, continued pre-training, distillation, custom model import, prompt routing, and using third-party models. Understand when and how to apply each method to tailor AI models for domain-specific tasks, cost efficiency, and behavior while managing trade-offs and best practices for production deployment.

In previous lessons, you built Bedrock Knowledge Bases that inject external documents into the model’s context window at inference time. That approach works well when the information you need is retrievable and changes frequently. But some use cases demand more than retrieval augmentation. When you need a model to consistently produce outputs in a specific format, internalize specialized domain vocabulary, or operate at lower cost without sacrificing quality, you need to change the model itself. Amazon Bedrock offers six distinct customization options that span this spectrum, each addressing a different engineering requirement.

Supervised fine-tuning adapts model behavior using labeled instruction-response pairs. Continued pre-training expands domain knowledge by exposing the model to unlabeled text. Distillation produces smaller, cheaper models that approximate the quality of larger ones. Custom model import brings externally trained weights into Bedrock’s managed infrastructure. Prompt router automatically routes each request to the most cost-effective model that meets a quality threshold. Amazon Bedrock Marketplace opens access to third-party models from providers outside the native Bedrock catalog. Think of these six options as tools in a workshop, where each one is designed for a specific job, and choosing the right tool depends on the material you are working with.

Some Bedrock-supported customization workflows also support parameter-efficient fine-tuning (PEFT) techniques such as LoRA (Low-Rank Adaptation). Rather than updating all model weights, PEFT trains a small set of adapter parameters while keeping the base model largely frozen. This significantly reduces training cost, memory requirements, and customization time while still achieving strong task-specific adaptation.

This lesson equips you with a decision framework for selecting among these options, configuring the relevant parameters, and understanding the trade-offs involved in each path.

Supervised fine-tuning on Bedrock

Retrieval augmentation supplements a model’s responses with external context, but it does not change how the model generates language. When you need the model to adopt a consistent output style, follow a rigid schema, or exhibit task-specific behavior across all requests, supervised fine-tuningA training process that updates a foundation model's weights using labeled input-output pairs so the model learns to produce specific responses for given instructions. is the appropriate technique.

Training data format and preparation

Bedrock fine-tuning requires training data formatted as JSONL, where each line in the file contains a JSON object with a prompt field and a completion field. These files are stored in an Amazon S3 bucket that the training job can access. The quality and diversity of your examples matter more than sheer volume. A dataset of 500 well-crafted, representative instruction-response pairs will outperform thousands of noisy or ...