trinity.algorithm.policy_loss_fn.sft_loss module
SFT loss function.
- class trinity.algorithm.policy_loss_fn.sft_loss.SFTLossFn(backend: str = 'verl', use_token_level_loss: bool = True)[source]
Bases:
PolicyLossFn
- __init__(backend: str = 'verl', use_token_level_loss: bool = True) None [source]
Initialize the policy loss function.
- Parameters:
backend – The training framework/backend to use (e.g., “verl”)
- classmethod default_args()[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.