Skip to main content

core.trainers.async_grpo.loss

core.trainers.async_grpo.loss

Async GRPO’s per-token losses (loss_type) and their metrics.

compute_loss is TRL’s, with _policy_loss in place of TRL’s clipped objective and its metrics per loss type.

Classes

Name Description
AsyncGRPOLossMixin compute_loss with the loss of args.loss_type.

AsyncGRPOLossMixin

core.trainers.async_grpo.loss.AsyncGRPOLossMixin()

compute_loss with the loss of args.loss_type.

Functions

Name Description
support_ids Each position’s top-k/top-p candidate set, padded with -1, which TRL main’s

support_ids

core.trainers.async_grpo.loss.support_ids(inputs, mask_bool)

Each position’s top-k/top-p candidate set, padded with -1, which TRL main’s fused head renormalizes the log-probs over as the sampler did; None without truncation, and on TRL releases, which do not record the sets.