Skip to content

Conversation

@mosheisland
Copy link
Contributor

DeepSpeed's bf16_optimizer does not have an overflow attribute. This is ok since bf16 dtype has same range as fp32 and is not expected to overflow.
Therefore, for bf16, always return no overflow.

Change-Id: I66a2204f3af81e52e7fa8d024afafdbbc7494327

@mosheisland
Copy link
Contributor Author

The formatting error is not due to this commit.
"applications/DeepSpeed-Chat/training/utils/ds_utils.py:6:1: F401 'torch' imported but unused"

@tjruwase
Copy link
Contributor

tjruwase commented Oct 2, 2023

The formatting error is not due to this commit. "applications/DeepSpeed-Chat/training/utils/ds_utils.py:6:1: F401 'torch' imported but unused"

Yes, you are correct. I actually have a pending PR to take of this.

DeepSpeed's bf16_optimizer does not have an overflow attribute.
This is ok since bf16 dtype has same range as fp32 and is not expected to
overflow.
Therefore, for bf16, always return no overflow.

Change-Id: I66a2204f3af81e52e7fa8d024afafdbbc7494327
Signed-off-by: Moshe Island <misland@habana.ai>
@tjruwase tjruwase merged commit 2f99dcd into deepspeedai:master Oct 3, 2023
@mosheisland mosheisland deleted the 2_overflow_bf16 branch October 4, 2023 06:59
hwchen2017 pushed a commit that referenced this pull request Jun 8, 2025
DeepSpeed's bf16_optimizer does not have an overflow attribute.
This is ok since bf16 dtype has same range as fp32 and is not expected to
overflow.
Therefore, for bf16, always return no overflow.

Change-Id: I66a2204f3af81e52e7fa8d024afafdbbc7494327

Signed-off-by: Moshe Island <misland@habana.ai>
Co-authored-by: Moshe Island <misland@habana.ai>
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