RL
Custom forward-backward pass
Changed onSubmits a forward-backward pass driven by externally computed gradients of the loss with respect to per-token log-probabilities.
post/v1/rl/training-sessions/{session_id}/operations/custom-forward-backward
Request
- Base URLhttps://api.together.ai
- URLhttps://api.together.ai/v1/rl/training-sessions/{session_id}/operations/custom-forward-backward
- 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
{
"samples": [
{
"model_input": {
"chunks": [
{
"encoded_text": {
"tokens": [
123,
456,
789
]
}
}
]
}
}
],
"gradients": [
{
"data": [
-0.1,
0.05,
-0.08,
0.12,
-0.03
]
}
]
}Response
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"error": {
"message": "Operation timed out"
}
}Changes
- info
endpoint added
- info