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

Improve numerical stability of scaled add/sub translations. #58

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

balancap
Copy link
Contributor

Current implementation can easily overflow due to the square of scales being used for the L2 norm.

min/max rescaling trick, as underflowing to zero of the ratio is preferable to overflowing the square of the scale.

Current implementation can easily overflow due to the square of scales being used
for the L2 norm.

min/max rescaling trick, as underflowing to zero of the ratio is preferable
to overflowing the square of the scale.
@balancap balancap merged commit ea122af into main Dec 19, 2023
2 checks passed
@balancap balancap deleted the improve-numerical-stability-scaled-add-sub branch December 19, 2023 10:00
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.

1 participant