AI Cloud Architect

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

AWSAnnouncement by Nicolas Jourdan, Bruno Pistone, Giuseppe Angelo Porcelli and Pooja KaradgiAWS Artificial Intelligence Blog

Amazon SageMaker AI training session APIs let you write your own LLM training loop (SFT, RL, or custom objectives) in a Python script while the service runs the GPUs. This post introduces the programming model and three SDK clients, then walks through a GRPO loop on GSM8K and a reinforcement learning workload on competitive programming.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

SageMaker AI training session APIs let you write your own LLM training loop in Python while the service runs the GPUs, using sample, forward_backward and optim_step calls on a live session.

Who it is for

ML engineers and researchers who need custom losses or RL rewards for LLM fine-tuning but do not want to run GPU clusters.

Key points

  • Billed per token processed; no GPU charge while local reward code runs.
  • Three SDK clients: ServiceClient, TrainingClient, SamplingClient.
  • Sessions count against a concurrent-session quota until stopped or expired.
  • Example run: 10 GRPO steps on 40 problems took held-out accuracy from 56% to 75% (AWS's own run).

The same at other vendors

Timeline

Posts about gpt-oss on Amazon SageMaker AI, oldest first.

  1. New modelAccelerate Generative AI Inference on Amazon SageMaker AI with G7e Instances · AWS · Announcement
  2. New featureAmazon SageMaker AI now supports optimized generative AI inference recommendations · AWS · Announcement
  3. New featureAmazon SageMaker AI serverless model customization now supports full fine-tuning · AWS · Announcement
  4. Update to an existing featureAmazon SageMaker AI now supports custom sequence lengths for serverless model customization jobs · AWS · Announcement
  5. This postWrite your own training loop — without managing GPUs — with Amazon SageMaker training session APIsAlso published by What's New with AWS, AWS Artificial Intelligence Blog

Go deeper