Interactive operations
Queue a forward-backward operation
Queue a forward-backward pass that accumulates gradients on an interactive training job, then poll the returned future_id until it reaches a terminal status.
POST
POST /v1/training/jobs/{job_id}/forward-backward
Computes the loss of a batch of token-level datums and accumulates its
gradients. The next optimizer step
applies them. The response is a future; read the loss and per-token log
probabilities from
GET /v1/training/jobs/{job_id}/futures/{future_id}.
POST /v1/training/jobs/{job_id}/forward
takes the same body and computes the loss without gradients.
Request
string
required
Your Fastino API key.
string
required
Interactive job ID.
object[]
required
One or more training examples. Tokenize them yourself with the base model’s
tokenizer.
string
default:"cross_entropy"
cross_entropy, importance_sampling, ppo, cispo, or dro.object
Loss settings.
ppo and cispo take clip_low_threshold and
clip_high_threshold; dro takes beta. Unknown keys are rejected.Response
string
The queued future.
string
The job.
string
forward_backward.Errors
Problems found while the batch runs, such as a missing loss input, mismatched
tensor lengths, an unknown
loss_fn_config key, or a datum longer than the
model’s limit, fail the future. Its error.category is user.
