How Loops works
A Loops session pairs a trainer with a sampler. The trainer runs forward, backward, and optimizer steps. The sampler generates output from published adapter weights. Because they scale independently, reinforcement learning (RL) rollouts don’t compete with training for compute. In synchronous RL, your loop waits for the sampler to load the published adapter weights before collecting the next rollouts. Asynchronous RL overlaps training with sampling. Your algorithm controls the allowed lag between their policy versions. This coordination is separate from the SDK’s*_async methods, which let you use the SDK with a Python event loop. Both RL workflows train LoRA adapters.
Use Get checkpoint source to determine whether to download checkpoint files through presigned URLs or pull them from a volume. You can also deploy checkpoints to the Baseten Inference Stack through the dashboard, CLI, or API.
Where to go next
The Loops quickstart runs the full session lifecycle: train a step, sample from the tuned weights, list the checkpoint, and shut the trainer and sampler down. To train and evaluate models from your application, follow Programmatic training. The example saves results and checkpoints for each round. The Loops concepts page explains sessions, trainers, samplers, checkpoints, and weight synchronization. Use Training Jobs when you need to bring your own container and training code. Training on Baseten compares Loops and Training Jobs. To migrate an existing Tinker project, see Migrate from Tinker.Reference
- CLI reference: Manage Loops runs, checkpoints, and GPU usage.
- SDK reference: Train, sample, and manage sessions from Python.
- API reference: Manage Loops resources over HTTP.