Home icon

Write your own training loop — without managing GPUs — with Amazon SageMaker training session APIs

Machine Learning Blog



This article introduces Amazon SageMaker AI training session APIs, which allow developers to write custom training loops in Python while SageMaker handles GPU infrastructure, distributed execution, and fault recovery.

  • Write custom training loops with operations like forward_backward(), optim_step(), and sample() without managing GPU infrastructure
  • Supports supervised fine-tuning, reinforcement learning (GRPO, PPO), and custom objectives with algorithmic freedom
  • Billing per token processed eliminates idle GPU costs; reward computation and debugging run off-clock
  • Three SDK clients (ServiceClient, TrainingClient, SamplingClient) provide a hierarchical programming model
  • Minimal GRPO loop on GSM8K math problems improved accuracy from 56% to 75% in 10 training steps
  • Code RL recipe demonstrates multi-turn tool use with sandboxed grading on competitive programming problems
  • Checkpoints stored as model packages; supports resume from saved state with weights and optimizer

Training session APIs bridge the gap between fully managed services and self-managed infrastructure, enabling researchers and ML engineers to implement custom training algorithms while offloading operational complexity to AWS.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Oct 22
2026
Amazon SageMaker AI announces training session APIs for serverless model customization
Oct 23
2026
Multi-Turn Reinforcement Learning on Amazon SageMaker AI: A hands-on guide
Oct 30
2026
Amazon SageMaker AI inference now supports GPU partitioning for real-time endpoints
Oct 29
2026
Amazon SageMaker AI now supports SOCI-indexed images to start training jobs in seconds

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.