AWS Lets You Write Your Own Model Fine-Tuning Loop Without Managing GPUs
Fine-tuning open models for your own business is hard. You have to choose a technique, spin up GPU clusters and manually wire training to response generation. AWS has made training sessions in SageMaker AI generally available: you write the training loop, the reward function and your own loss, while the service runs the GPUs, distributed execution and checkpoints. Supported models include gpt-oss-20b, gemma-4-31B-it and two 27B Qwen models. For teams building agents, it is a way to try RL without building their own infrastructure.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
Companies that get real results from AI rarely use a base model as is. They fine-tune open models on their own data: product catalogs, medical terminology, internal processes. Such a model solves a narrow task more accurately and costs less to operate. But the process itself remains painful: you have to choose a method, rent and configure GPUs, and for agents you also need to build an environment for multi-step reinforcement learning. AWS offers to remove part of that pain: the training sessions service in Amazon SageMaker AI is now generally available.
What exactly was launched
Previously, in SageMaker's serverless customization, you chose a ready-made technique, such as SFT, DPO, RLVR, RLAIF or multi-step RL. You could change the share of updated weights (LoRA or full fine-tuning) and chain methods together. But customers asked for more freedom: their own loss functions, their own reward shapes, several RL stages in one loop.
Training sessions provide that capability. You write the training loop and the reward function in your own environment, and connect the agent to its tools or simulators. AWS does all the heavy GPU work: it allocates capacity, runs distributed training, recovers from failures and stores checkpoints. You do not need to choose instance types or configure clusters.
What a loop looks like, using GRPO as an example
GRPO is an RL method in which the model generates several responses to the same prompt, each response is scored, and the weight update is based on comparing the responses with one another. In training sessions, one pass looks like this:
- Your code asks the sampler to generate several responses for each prompt using the current model.
- Your reward function scores them on your side: via a verifier, a reward model or a test suite.
- The scores go to the trainer. The call forward_backward() computes gradients, and optim_step() applies the update to the weights.
- You ask the session to update the sampler with the new weights and launch the next batch.
This suits agents that book trips, triage support tickets or conduct multi-step research. The result of such an agent becomes clear only after several rounds of interaction, and usually training, generation and evaluation run on separate clusters. Here they are combined into a single loop.
You pay for the tokens that SageMaker AI processes. While your reward function scores a batch on your side, the meter does not run. You do not need to reserve capacity.
Who has already tried it, and what about the data
AWS cites two testimonials. ImagineSoftware is building a model to sort denials of medical insurance claims and praises direct access to the forward and backward passes, sampling and the optimizer step. Karini AI fine-tuned gpt-oss-20b to call tools in multi-step mode on top of an Amazon Neptune knowledge graph. Its CEO specifically highlighted resuming training from the exact step. These are partner testimonials from the press release; the material contains no independent measurements of quality or cost.
On security: the session runs under your IAM role, and you can attach your own KMS key and VPC settings. Data and checkpoints live in your S3 buckets in the chosen region. AWS states that it does not use your data or weights to train other models. Before rollout, the model can be checked for accuracy, bias and safety, and afterward you can enable guardrails and monitoring through CloudWatch.
Where to start and what to consider
Supported models are gpt-oss-20b, gemma-4-31B-it, Qwen3.6-27B and Qwen3.8-27B. You can start in two ways: install the SageMaker Python SDK (Linux or macOS, Python 3.10–3.12) and clone the cookbook, or open a ready-made environment in SageMaker Studio, which, according to AWS, starts in under 20 seconds. There you can also connect a coding agent (Kiro, Claude Code, Codex or Copilot) with a set of customization skills: it helps prepare data, choose a technique, train, evaluate and deploy the model.
The limitations are obvious. The model list is still short and capped at an average size of up to 31B. You write the loop yourself, so you will need to understand RL and carefully design rewards: the service removes infrastructure concerns but not the quality of your evaluation function. For teams that want to test RL on agents without buying GPUs or hiring cluster engineers, this is a fast way to start experimenting.
- Nov 21, 2026AG-UI 1.0 gives AI agents a common language for talking to apps: 31 event types
- Nov 21, 2026OpenAI launches ChatGPT Wallet: agents buy without ever seeing your card number
- Nov 21, 2026US Advertisers Spent $70.7 Million on ChatGPT Ads in October, Up 127% From April
- Nov 21, 2026ONNX Runtime vanishes from GitHub: Microsoft hides repositories after package hack
Key Questions Answered
What exactly was launched?
Previously, in SageMaker's serverless customization, you chose a ready-made technique, such as SFT, DPO, RLVR, RLAIF or multi-step RL. You could change the share of updated weights (LoRA or full fine-tuning) and chain methods together. But customers asked for more freedom: their own loss functions, their own reward shapes, several RL stages in one loop. Training sessions provide that capability.
What a loop looks like, using GRPO as an example?
GRPO is an RL method in which the model generates several responses to the same prompt, each response is scored, and the weight update is based on comparing the responses with one another. In training sessions, one pass looks like this: Your code asks the sampler to generate several responses for each prompt using the current model. Your reward function scores them on your side: via a verifier, a reward model or a test suite. The scores go to the trainer.
Who has already tried it, and what about the data?
AWS cites two testimonials. ImagineSoftware is building a model to sort denials of medical insurance claims and praises direct access to the forward and backward passes, sampling and the optimizer step. Karini AI fine-tuned gpt-oss-20b to call tools in multi-step mode on top of an Amazon Neptune knowledge graph. Its CEO specifically highlighted resuming training from the exact step. These are partner testimonials from the press release; the material contains no independent measurements of quality or cost.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.