trinity.algorithm.policy_loss_fn.rec_policy_loss module#
REC-token policy loss function.
- class trinity.algorithm.policy_loss_fn.rec_policy_loss.RECPolicyLossFn(backend: str = 'verl', epsilon_low: float = 0.2, epsilon_high: float = 0.2, epsilon_low_prime: float = 0.4, epsilon_high_prime: float = 0.4, clip_mode: str = 'none', weight: str = 'none', regularizer: str = 'none', regularizer_coef: float = 0.0, temp: float = 1.0)[source]#
Bases:
PolicyLossFn
- __init__(backend: str = 'verl', epsilon_low: float = 0.2, epsilon_high: float = 0.2, epsilon_low_prime: float = 0.4, epsilon_high_prime: float = 0.4, clip_mode: str = 'none', weight: str = 'none', regularizer: str = 'none', regularizer_coef: float = 0.0, temp: float = 1.0) None [source]#
Initialize the policy loss function.
- Parameters:
backend – The training framework/backend to use (e.g., “verl”)
- classmethod default_args() Dict [source]#
Get default initialization arguments for this loss function.
- Returns:
The default init arguments for the policy loss function.
- Return type:
Dict
- property select_keys#
Returns parameter keys mapped to the specific training framework’s naming convention.