Skip to content

Make only_unmask_final flag configurable for SFT. #2219

@dhineshkumar-r

Description

@dhineshkumar-r

Is your feature request related to a problem? Please describe.
Hey Folks,
I'm working on a multi-turn SFT task and I'd like to train only the final assistant message given the previous messages in context. To achieve this, I believe I have to set the only_unmask_final bool flag(Ref.) to True. However, current implementation of SFT does not support this, Ref..

Describe the solution you'd like
The proposal is to make this flag configurable in SFTConfig by introducing only_unmask_final boolean and consume that during SFT validation and training.

Describe alternatives you've considered
Other alternatives considered does not help wider audience.

Additional context

I have a rough implementation and I can submit a PR for review. Please let me know if I'm missing something here or need further clarification.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions