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

feat: enable trl's autounwrap #1060

Merged
merged 4 commits into from
Jan 11, 2024
Merged

feat: enable trl's autounwrap #1060

merged 4 commits into from
Jan 11, 2024

Conversation

NanoCode012
Copy link
Collaborator

@NanoCode012 NanoCode012 commented Jan 8, 2024

For testing currently! Tested working by Teknium.

Based on this https://github.com/huggingface/trl/blob/104a02d207b63a4a062882aaff68f2d275493399/trl/trainer/dpo_trainer.py#L691 , trl would unwrap the model if it's a peft model. This should reduce the need to load the model twice.

@NanoCode012
Copy link
Collaborator Author

@winglian , what do you think the state should be for this PR? Do we need a new config to specify not passing model_ref for adapters?

@winglian
Copy link
Collaborator

@winglian , what do you think the state should be for this PR? Do we need a new config to specify not passing model_ref for adapters?

Your fix should be the default and if someone really wants a second full ref model loaded then there should be a separate option for that.

@NanoCode012 NanoCode012 marked this pull request as ready for review January 10, 2024 16:27
@NanoCode012 NanoCode012 marked this pull request as draft January 10, 2024 16:38
@NanoCode012 NanoCode012 marked this pull request as ready for review January 11, 2024 13:06
@NanoCode012 NanoCode012 changed the title feat: test trl's autounwrap feat: enable trl's autounwrap Jan 11, 2024
@winglian winglian merged commit b432889 into main Jan 11, 2024
6 checks passed
@winglian winglian deleted the feat/dpo_no_ref branch January 11, 2024 13:43
@winglian winglian restored the feat/dpo_no_ref branch January 22, 2024 15:21
@winglian winglian deleted the feat/dpo_no_ref branch January 23, 2024 12:33
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.

None yet

2 participants