RL
Optimizer step
Changed onSubmits an optimizer step operation that will asynchronously apply accumulated gradients to update model parameters. Does not make the updated parameters available for sampling; call weights-sync afterwards when you want subsequent samples to use the updated policy.
post/v1/rl/training-sessions/{session_id}/operations/optim-step
Request
- Base URLhttps://api.together.ai
- URLhttps://api.together.ai/v1/rl/training-sessions/{session_id}/operations/optim-step
- AuthHTTP bearer
Path parameters
session_idstring required
Training session ID
Headers
Idempotency-Keystring required
Required key that makes retries return the original operation; use a new key for changed request bodies.
Request body
Example request
{
"adam_params": {
"learning_rate": 0.0001,
"beta1": 0.9,
"beta2": 0.95,
"eps": 1e-8,
"weight_decay": 0.1,
"grad_clip_norm": 10
},
"muon_params": {
"learning_rate": 0.02,
"momentum": 0.95,
"newton_schulz_steps": 5,
"grad_clip_norm": 10,
"adam": {
"learning_rate": 0.0001,
"beta1": 0.9,
"beta2": 0.95,
"eps": 1e-8,
"weight_decay": 0.1,
"grad_clip_norm": 10
}
}
}Response
Optimizer step operation details
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"error": {
"message": "Operation timed out"
}
}Changes
- info
endpoint added
- info