-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] add ULD type loss to GKD Trainer #2263
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Quentin Gallouédec <[email protected]>
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. |
with torch.no_grad(): | ||
outputs_teacher = self.teacher_model( | ||
input_ids=inputs["input_ids"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use a different input ids here?
Looks good overall. Feel free to request a final review from me when you think it's ready to be merged |
@@ -42,6 +42,21 @@ | |||
--use_peft \ | |||
--lora_r 64 \ | |||
--lora_alpha 16 | |||
|
|||
# ULD | |||
python examples/scripts/gkd.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the argument related to ULD?
What does this PR do?
Add ULD loss to GKD trainer that doesn't require the student/teacher to have the same vocab by optimal transporting the prob from the teacher to student