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] add ULD type loss to GKD Trainer #2263

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

Conversation

kashif
Copy link
Collaborator

@kashif kashif commented Oct 22, 2024

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

@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 mentioned this pull request Nov 5, 2024
5 tasks
with torch.no_grad():
outputs_teacher = self.teacher_model(
input_ids=inputs["input_ids"],
Copy link
Member

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?

@qgallouedec
Copy link
Member

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 \
Copy link
Member

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?

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.

3 participants