Model Fine-Tuning Support in SageMaker Python SDK V3 #5364
papriwal
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Model Fine-Tuning Support in SageMaker Python SDK V3
We’re excited to introduce comprehensive model fine-tuning capabilities in the SageMaker Python SDK V3, bringing state-of-the-art fine-tuning techniques to production ML workflows. Fine-tune foundation models with enterprise features including automated experiment tracking, serverless infrastructure, and integrated evaluation—all with just a few lines of code.
What's New
The SageMaker Python SDK V3 now includes four specialized Fine-Tuning Trainers for different fine-tuning techniques. Each trainer is optimized for specific use cases, following established research and industry best practices:
SFTTrainer - Supervised Fine-Tuning
Fine-tune models with labeled instruction-response pairs for task-specific adaptation.
DPOTrainer - Direct Preference Optimization
Align models with human preferences using the DPO algorithm. Unlike traditional RLHF, DPO eliminates the need for a separate reward model, simplifying the alignment pipeline while achieving comparable results. Use cases : Preference alignment, safety tuning, style adaptation.
RLAIFTrainer - Reinforcement Learning from AI Feedback
Leverage AI-generated feedback as reward signals using Amazon Bedrock models. RLAIF offers a scalable alternative to human feedback while maintaining quality.
RLVRTrainer - Reinforcement Learning from Verifiable Rewards
Train with custom, programmatic reward functions for domain-specific optimization.
Key Features
Parameter-Efficient Fine-Tuning
Built-in MLflow Integration
Automatic experiment tracking with intelligent defaults:
Dynamic Hyperparameter Management
Discover and customize training hyperparameters with built-in validation:
Continued Fine-Tuning
Build on previously fine-tuned models for iterative improvement:
Flexible Dataset Support
Multiple input formats with automatic validation:
Serverless Training
No infrastructure management required—just specify your model and data:
Enterprise-Ready
Production-ready security features:
Model Evaluation
Comprehensive evaluation framework with three evaluator types:
See the "Evaluating Fine-Tuned Models" section below for detailed examples.
Evaluating Fine-Tuned Models
Evaluate your fine-tuned models using standard benchmarks, custom metrics, or LLM-based evaluation.
Benchmark Evaluation
Evaluate against 11 standard benchmarks including MMLU, BBH, GPQA, MATH, and more.
Discover available benchmarks
Run evaluation
Custom Scorer Evaluation
Use built-in metrics or custom evaluators
LLM-as-Judge Evaluation
Leverage large language models for nuanced evaluation with explanations:
Deploying Fine-Tuned Models
Flexible deployment options for production inference. Deploy your fine-tuned models to SageMaker endpoints or Amazon Bedrock.
Deploy to SageMaker Endpoint
Deploy from training job
Deploy from model package
Deploy from trainer
Deploy Multiple Adapters to Same Endpoint
Deploy multiple fine-tuned adapters to a single endpoint for cost-efficient serving
Deploy to Amazon Bedrock
Find Endpoints Using a Base Model
Complete Workflow Example
Examples
Explore complete end-to-end examples in the v3-examples/model-customization-examples/ directory:
Evaluation Examples
Available in v3-examples/model-customization-examples/
This discussion was created from the release v3.1.0.
Beta Was this translation helpful? Give feedback.
All reactions