October 26, 2026

Prompt: SageMaker AI Serverless Training Sessions: Customizing Models Without Managing GPUs

← AI for Your Work

AWS has introduced the general availability of training sessions for Amazon SageMaker AI serverless model customization. This capability enables developers to write and coordinate custom post-training loops, including reinforcement learning and multi-turn agent training, while SageMaker automatically handles the underlying GPU infrastructure, distributed execution, and fault recovery.

Copy This Prompt

Help me design a custom training loop using SageMaker AI serverless training sessions for [describe your use case, e.g., a multi-turn travel booking agent]. I want to use the [model name, e.g., gpt-oss-20b] model and implement [technique, e.g., GRPO]. Please provide the Python code structure for the training loop, including the sampler integration, custom reward function, and optimizer step, ensuring that checkpoints are saved to my S3 bucket.

Example input

Use the placeholders in the prompt with permitted, anonymized source data.

Expected output

Follow the output format requested in the prompt and verify the result against the source.

Tools

AWS SageMaker AI, SageMaker Python SDK, SageMaker Studio, Python 3.10 to 3.12, AWS CLI