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 option to compile loss function, move logits FP32 casting into loss function #77

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Nov 1, 2024

This change gives a small but not insignificant improvement to throughput and GPU memory usage by allowing the casting of logits to FP32 to be fused into the loss function via torch.compile().

@epwalsh epwalsh changed the title Add option to compile loss function, move logits cast to FP32 into loss function Add option to compile loss function, move logits FP32 casting into loss function Nov 1, 2024
@epwalsh epwalsh merged commit 00d34f6 into main Nov 1, 2024
14 checks passed
@epwalsh epwalsh deleted the epwalsh/compiled-loss branch November 1, 2024 19:31
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