Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise SFT File #793

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Revise SFT File #793

wants to merge 9 commits into from

Conversation

ahmeda14960
Copy link
Contributor

PR to revise SFT file to avoid breaking changes to marin and for a request from @dlwh

@ahmeda14960 ahmeda14960 requested a review from dlwh November 7, 2024 21:15
@ahmeda14960 ahmeda14960 marked this pull request as ready for review November 11, 2024 20:17


@dataclass
class SFTConfig(TrainLmConfig):
Copy link
Member

@dlwh dlwh Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho this should really not inherit from TrainLmConfig but just grab the parts you need

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't want to do this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I end up needing a lot of shared content with TrainLMConfig since I want to explicitly declare all variables in the marin experiment so i think it's better to inherit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally speaking it's a code smell when you inherit and don't use the stuff in the super

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I just changed it to not inherit and copied the attributes I need

src/levanter/main/sft.py Show resolved Hide resolved
src/levanter/main/sft.py Outdated Show resolved Hide resolved
src/levanter/main/sft.py Outdated Show resolved Hide resolved
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.

2 participants