View a markdown version of this page

Model customization - Amazon SageMaker AI

Model customization

Amazon SageMaker AI model customization lets you adapt foundation models to your specific use case by training them on your data. You choose a customization technique (how the model learns), a training type (how much of the model to update), and an infrastructure option (where to run the job).

Overview

Customization techniques define how your model learns from data:

  • SFT (Supervised Fine-Tuning) — Train on labeled prompt-response pairs. See SFT.

  • DPO (Direct Preference Optimization) — Train on preferred vs rejected response pairs. See DPO.

  • RFT (Reinforcement Fine-Tuning) — Optimize via reward signals (RLVR or RLAIF). See RFT.

  • MTRL (Multi-Turn Reinforcement Learning) — Train agents for multi-step agentic tasks. See Multi-turn reinforcement learning.

  • Continuous Customization — Chain techniques sequentially. See Continuous customization.

  • Distillation — Transfer knowledge from a teacher model to a student model. See Distillation.

Training types determine how much of the model to update:

  • LoRA (Low-Rank Adaptation) — Trains a small set of adapter weights. Lower cost, faster training. See LoRA.

  • FFT (Full Fine-Tuning) — Updates all model weights. Higher compute, deeper customization. See FFT.

Infrastructure options control where your training job runs:

  • Serverless — Fully managed, no instance selection. Best for quick experimentation and production jobs without ops overhead. Serverless model customization also supports training session APIs, which give you full control over your training loop without managing GPU infrastructure. See Serverless model customization and Training session APIs.

  • SageMaker AI Training Jobs — Ephemeral jobs where you select instance type. Uses Recipes for pre-configured training. See SageMaker AI Training Jobs.

  • HyperPod — Persistent clusters with advanced fault recovery. Uses Recipes for distributed training on Amazon EKS or Slurm. See HyperPod.

Choosing your approach

Before customizing, consider whether a simpler approach meets your needs:

Prompt Engineering

Your model gives acceptable answers but needs better tone, format, or style. No training required — fast iteration. See Prompt engineering for foundation models.

RAG (Retrieval Augmented Generation)

Your model lacks knowledge about your specific domain. Augment with external knowledge sources without retraining. See Retrieval Augmented Generation.

Fine-tuning

Your model needs to consistently learn new behaviors, styles, or domain expertise. Train on your data to change model weights. Continue reading this guide.

Prerequisites

Before you start a customization workflow, review the prerequisites for the infrastructure and technique you plan to use:

Network and encryption considerations

Serverless customization jobs, SageMaker AI Training Jobs, and HyperPod support customer-managed networking and encryption settings, but each infrastructure option is configured differently.

  • For serverless customization and SageMaker AI Training Jobs, provide subnets and security groups that can reach your training data, image sources, and logging destinations. If your subnets do not have internet egress, make sure you have routes or VPC endpoints for services such as Amazon S3, Amazon ECR, and CloudWatch Logs.

  • For multi-turn RL jobs, see Configure a VPC for multi-turn RL jobs.

  • For HyperPod in your own VPC, see IAM role for SageMaker HyperPod for the additional permissions required to create and manage network interfaces.

If you use customer-managed KMS key encryption for model customization inputs, outputs, or artifacts, make sure the relevant execution role can use that key and that the key policy trusts the role you pass to the job. If your input data in Amazon S3 is encrypted with a customer-managed key, the execution role also needs permission to decrypt that data. For multi-turn RL encryption guidance, see Encryption at rest for multi-turn reinforcement learning. If you do not specify a customer-managed key, SageMaker AI uses its default encryption settings.

For serverless and training job flows, the execution role also needs permission to discover available VPCs, roles, and KMS keys when you configure these advanced settings. The recommended managed policy already covers this; if you manage permissions manually, include the advanced-settings permissions described under Setting up permissions manually.

Supported models for fine-tuning

The following models are available for customization across serverless, SageMaker AI Training Jobs, and HyperPod infrastructure.

Provider Model Model ID Serverless Training Jobs HyperPod
AlibabaQwen3.8 27Bhuggingface-vlm-qwen3-8-27b✓✓✓
AlibabaQwen3.6 27Bhuggingface-vlm-qwen3-6-27b✓✓✓
AlibabaQwen3.6 A3B 35Bhuggingface-vlm-qwen3-6-35b-a3b✓✓✓
AlibabaQwen3.5 27Bhuggingface-vlm-qwen3-5-27b✓✓✓
AlibabaQwen3.5 9Bhuggingface-vlm-qwen3-5-9b✓✓✓
AlibabaQwen3.5 4Bhuggingface-vlm-qwen3-5-4b✓✓✓
AlibabaQwen3 32Bhuggingface-reasoning-qwen3-32b✓✓✓
AlibabaQwen3 14Bhuggingface-reasoning-qwen3-14b✓✓✓
AlibabaQwen3 8Bhuggingface-reasoning-qwen3-8b✓✓✓
AlibabaQwen3 4Bhuggingface-reasoning-qwen3-4b✓✓✓
AlibabaQwen3 1.7Bhuggingface-reasoning-qwen3-1-7b✓✓✓
AlibabaQwen3 0.6Bhuggingface-reasoning-qwen3-06b✓✓✓
AlibabaQwen2.5 Instruct 72Bhuggingface-llm-qwen2-5-72b-instruct✓✓✓
AlibabaQwen2.5 Instruct 32Bhuggingface-llm-qwen2-5-32b-instruct✓✓✓
AlibabaQwen2.5 Instruct 14Bhuggingface-llm-qwen2-5-14b-instruct✓✓✓
AlibabaQwen2.5 Instruct 7Bhuggingface-llm-qwen2-5-7b-instruct✓✓✓
DeepSeekR1 Distill Qwen 32Bdeepseek-llm-r1-distill-qwen-32b✓✓✓
DeepSeekR1 Distill Qwen 14Bdeepseek-llm-r1-distill-qwen-14b✓✓✓
DeepSeekR1 Distill Qwen 7Bdeepseek-llm-r1-distill-qwen-7b✓✓✓
DeepSeekR1 Distill Qwen 1.5Bdeepseek-llm-r1-distill-qwen-1-5b✓✓✓
DeepSeekR1 Distill Llama 70Bdeepseek-llm-r1-distill-llama-70b✓✓✓
DeepSeekR1 Distill Llama 8Bdeepseek-llm-r1-distill-llama-8b✓✓✓
GoogleGemma 4 31Bhuggingface-vlm-gemma-4-31b-it✓✓✓
GoogleGemma 4 26B A4Bhuggingface-vlm-gemma-4-26b-a4b-it✓✓✓
GoogleGemma 4 E4Bhuggingface-vlm-gemma-4-e4b-it✓✓✓
MetaMuse Glimmer 30Bhuggingface-vlm-muse-glimmer-30b✓✓✓
MetaLlama 3.3 Instruct 70Bmeta-textgeneration-llama-3-3-70b-instruct✓✓✓
MetaLlama 3.2 Instruct 3Bmeta-textgeneration-llama-3-2-3b-instruct✓✓✓
MetaLlama 3.2 Instruct 1Bmeta-textgeneration-llama-3-2-1b-instruct✓✓✓
MetaLlama 3.1 Instruct 8Bmeta-textgeneration-llama-3-1-8b-instruct✓✓✓
Mistral AIMinistral 3 Instruct 2512 BF16 14Bhuggingface-vlm-ministral-3-14b-instruct-2512-bf16✓✓✓
Mistral AIMinistral 3 Instruct 2512 BF16 8Bhuggingface-vlm-ministral-3-8b-instruct-2512-bf16✓✓✓
Mistral AIMinistral 3 Instruct 2512 BF16 3Bhuggingface-vlm-ministral-3-3b-instruct-2512-bf16✓✓✓
NVIDIANemotron 3 Super 120B (A12B)huggingface-llm-nvidia-nemotron-3-super-120b-a12b-bf16✓✓✓
NVIDIANemotron 3 Nano 30B (A3B)huggingface-reasoning-nvidia-nemotron-3-nano-30b-a3b-bf16✓✓✓
NVIDIANemotron 3.5 Lightning 30B (A3B)huggingface-reasoning-nemotron-3-5-lightning-30b-a3b-bf16✓✓✓
OpenAIGPT OSS 120Bopenai-reasoning-gpt-oss-120b✓✓✓
OpenAIGPT OSS 20Bopenai-reasoning-gpt-oss-20b✓✓✓

For Amazon Nova models, see the Nova walkthrough under Serverless model customization.