# AWS adds SageMaker training session APIs for custom LLM training loops

> Original title: Write your own training loop — without managing GPUs — with Amazon SageMaker training session APIs

- Source: AWS Machine Learning Blog
- Published: 2026-10-22T18:00:01.000Z
- Bad Influence: https://badinfluence.news/items/fipwq6gdk85s2068aujm8fbx1
- Original: https://aws.amazon.com/blogs/machine-learning/write-your-own-training-loop-without-managing-gpus-with-amazon-sagemaker-training-sessions/

## Summary

AWS introduces SageMaker AI training session APIs, which let users write their own training loop in Python while SageMaker runs the GPU work. The post walks through a GRPO example on GSM8K, where a LoRA adapter for GPT-OSS 20B rose from 56 percent to 75 percent accuracy on held-out problems over 10 steps. It also describes a competitive programming RL recipe that grades generated code against unit tests, with accuracy on 200 held-out test problems rising from 40 percent to 50.5 percent.

## Why it matters

The post shows how a custom GRPO loop maps onto managed GPU operations, with a worked GSM8K example and a code-execution reward case that helps readers judge fit for their own training.
