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

Add soft capping to reversible embedding layer #1718

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

mattdangerw
Copy link
Member

@mattdangerw mattdangerw commented Jul 30, 2024

Forgetting the final output soft-cap is a really easy mistake, and worse, outputs will still look plausible for generations without the softcap, just with worse actual results.

Adding this to our reversible embedding layer will be much more robust. As long as you use the layer to compute logits over the vocab, you can no longer forget the soft-cap.

Before this fix, we were missing it from our actual CausalLM functional model output, meaning soft-capping was not applied during training!

Forgetting the final output soft-cap is a really easy mistake,
and worse, outputs will still look plausible for generations without
the softcap, just with worse actual results.

Adding this to our reversible embedding layer will be much more robust.
As long as you use the layer to compute logits over the vocab, you can
no longer forget the soft-cap.
Copy link
Member

@SamanehSaadat SamanehSaadat left a comment

Choose a reason for hiding this comment

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

Thanks, Matt!

@mattdangerw mattdangerw merged commit 7b932cd into keras-team:master Jul 30, 2024
12 checks passed
mattdangerw added a commit that referenced this pull request Jul 30, 2024
Forgetting the final output soft-cap is a really easy mistake,
and worse, outputs will still look plausible for generations without
the softcap, just with worse actual results.

Adding this to our reversible embedding layer will be much more robust.
As long as you use the layer to compute logits over the vocab, you can
no longer forget the soft-cap.
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