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

Gkd trainer #1814

Merged
merged 176 commits into from
Sep 11, 2024
Merged

Gkd trainer #1814

merged 176 commits into from
Sep 11, 2024

Conversation

kashif
Copy link
Collaborator

@kashif kashif commented Jul 8, 2024

@kashif kashif marked this pull request as draft July 8, 2024 10:20
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@kashif kashif marked this pull request as ready for review July 14, 2024 12:51
@kashif kashif requested a review from lewtun July 15, 2024 10:38
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

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

Thanks for ironing out the final kinks! I've tested Qwen and Gemma models and it seems to work well - we can always iterate a bit on the small details in follow up PRs.

I've left some final suggestions and have a question about the need to pass sft_args to the training vs just having a single set of args. Is it because the parent class won't accept the new params of the GKD config? If that's the case, then let's keep it as is and merge once you've incorporated the final changes

docs/source/gkd_trainer.md Show resolved Hide resolved
examples/scripts/gkd.py Outdated Show resolved Hide resolved
examples/scripts/gkd.py Outdated Show resolved Hide resolved
examples/scripts/gkd.py Outdated Show resolved Hide resolved
examples/scripts/gkd.py Outdated Show resolved Hide resolved
examples/scripts/gkd.py Outdated Show resolved Hide resolved
tests/test_gkd_trainer.py Show resolved Hide resolved
tests/test_gkd_trainer.py Show resolved Hide resolved
self,
teacher_model: Union[PreTrainedModel, nn.Module, str],
args: Optional[GKDConfig] = None,
*sft_args,
Copy link
Member

Choose a reason for hiding this comment

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

Silly question, but why can't we just have args in the init since the GKDConfig already subclasses SFTConfig?

docs/source/gkd_trainer.md Show resolved Hide resolved
kashif and others added 10 commits September 11, 2024 16:46
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
examples/scripts/gkd.py Outdated Show resolved Hide resolved
@lewtun
Copy link
Member

lewtun commented Sep 11, 2024

Any idea why the doc build is failing @kashif ?

@kashif
Copy link
Collaborator Author

kashif commented Sep 11, 2024

not sure... i was also checking

@kashif kashif merged commit 85696aa into huggingface:main Sep 11, 2024
9 checks passed
@kashif kashif deleted the gkd-trainer branch September 11, 2024 17:17
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.

4 participants