Before you start
Complete the custom-loop Quickstart, then confirm through capabilities that your chosen model and training operations are enabled. The snippets below focus on the user-owned reward flow; adapt datum construction totinker==0.33.1 and your selected model.
This guide is not a standalone copy-and-paste trainer. Begin with a validated
SDK workload whose renderer and datum construction match the selected model,
then add the reward flow below.
1. Define a narrow grader
Separate parsing from scoring so malformed output is observable:2. Snapshot the job for sampling
Create a sampler checkpoint from the current weights, then resolve it through the SDK:3. Convert rewards to advantages
4. Build aligned datums
The prompt is context, so prompt positions normally receive zero advantage. Completion positions receive the response’s group-relative advantage. A datum builder should fail before submission if model input, target, log-probability, and advantage lengths differ:base_model. Keep
the sampled tokens and log probabilities needed by the SDK operation you
selected from capabilities.
5. Update the interactive job
For an enabled importance-sampling workflow, the SDK call pattern is:6. Save a recovery boundary
- Canonical job ID from
training_client.get_info().model_data.model_id - Application step and dataset cursor
- Dataset and reward implementation revisions
- Base model and training configuration
- Evaluation metrics
Verify before scaling
- The grader distinguishes known correct and incorrect fixtures.
- Malformed responses do not crash the application loop.
- At least one sample group has reward variance.
- Datum arrays satisfy the installed SDK’s expected shapes.
- Forward/backward and optimizer futures complete on the same job.
- A state checkpoint can be loaded with its client-owned resume metadata.
- Held-out evaluation remains separate from the training reward batch.

