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

Non-DP runs default to float32 precision #630

Open
carmocca opened this issue Oct 18, 2024 · 1 comment · May be fixed by #591
Open

Non-DP runs default to float32 precision #630

carmocca opened this issue Oct 18, 2024 · 1 comment · May be fixed by #591
Labels
enhancement New feature or request

Comments

@carmocca
Copy link
Contributor

The training script relies on FSDP's MixedPrecisionPolicy to take care of dtypes.

But when data-parallelism is not used (for example when running in a single node with TP 8) then this does not happen and training runs in float32.

This is a bit unintuitive especially when comparing against runs with DP enabled.
If I'm not mistaken, the default training script does not even call torch.set_float32_matmul_precision() so it's currently missing out on speedups.

Do you agree that this should be changed? Thanks!

@tianyu-l
Copy link
Contributor

You are right that currently mixed precision is only supported in FSDP.
For general support by AMP, I think it's being worked on in #591

@tianyu-l tianyu-l added the enhancement New feature or request label Oct 18, 2024
@tianyu-l tianyu-l linked a pull request Nov 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants