Scalar Trainer Operations #
Packed loss, gradient, and update operations, plus simple training and evaluation loops.
Differentiable inputs use scalar type α; non-differentiable data, such as token identifiers,
labels, or masks, use a separate type δ.
Evaluate the scalar loss on packed differentiable and non-differentiable inputs.
Instances For
Evaluate one loss and its parameter gradients from the same tape.
Instances For
Evaluate parameter gradients on packed inputs.
Instances For
Apply the trainer's SGD update to packed inputs.
Instances For
Apply the trainer's SGD update and return the loss used for the update.
Instances For
Apply steps SGD updates while cycling through samples without auxiliary data tensors.
Logging reuses each update's loss. Set logEvery := 0 to disable logging.
Rejects an empty dataset.
Instances For
Evaluate the arithmetic mean loss over samples without auxiliary data tensors.
Rejects an empty dataset.