Skip to content

Conversation

@maitchison
Copy link
Contributor

@maitchison maitchison commented Dec 8, 2025

Motivation

Some of the loss functions have configuration settings that are currently not accessible.

This PR adds an optional loss_fn_config the RL and distillation training steps and forward_backward calls.

SFT is hardcoded to cross_entropy and so was not updated.

Changes

  • Added optional loss_fn_config to rl.train.Config
  • For any training script that have a loss_fn, I've also added loss_fn_config.
  • Added explicit argument names to some function calls.

@maitchison maitchison changed the title Matthew/add loss fn Add loss_fn_config Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant