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

Mixed dtypes #644

Merged
merged 5 commits into from
Jun 27, 2024
Merged

Mixed dtypes #644

merged 5 commits into from
Jun 27, 2024

Conversation

ngc92
Copy link
Contributor

@ngc92 ngc92 commented Jun 25, 2024

This is currently based on #635 , because there we ended up needing to reduce losses in bf16.
So this PR first does some malloc-and-point generalization for allowing multiple dtypes, and then changes layernorm statistics and losses to fp32.
With layernorm stats in fp32, we can reliably avoid their recomputation even if we recompute the layer itself, and these tensors are still tiny, so it doesn't cost us much.

@karpathy karpathy merged commit 98875dd into karpathy:master Jun 27, 2024
11 checks passed
@ngc92 ngc92 deleted the mixed-dtypes branch July 11, 2024 12:42
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.

None yet

2 participants