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 convert_float_to_bfloat16 function to avoid overflow #268

Open
vraintanakarei opened this issue Dec 11, 2023 · 0 comments
Open

Add convert_float_to_bfloat16 function to avoid overflow #268

vraintanakarei opened this issue Dec 11, 2023 · 0 comments

Comments

@vraintanakarei
Copy link

I used convert_float_to_float16 function to convert fp32 models to fp16, but some models have outputs that have changed significantly due to overflow.
I think bf16 is useful to avoid overflow in such cases.

In the convert_float_to_float16 function, FLOAT16 is hard-coded and could not be changed to BFLOAT16 and so on.
I think that it would be more useful if it could be changed.

Thank you.

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

No branches or pull requests

1 participant