Skip to content

[FSDP] Add reference model support for correct KL loss computation #296

Description

@zhuzilin

Currently, the FSDP backend does not support a reference model, which makes it impossible to correctly compute KL loss (e.g., in RLHF or DPO training). Adding support for a reference model will enable correct and efficient KL loss calculation under FSDP.

To ensure reliability, the implementation should also be numerically aligned with the Megatron backend. (Similar to #290).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions