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

Loading data as bfloat16 causes quantization issues for big values #13

Open
JulianThijssen opened this issue Jan 31, 2023 · 1 comment

Comments

@JulianThijssen
Copy link
Contributor

Perhaps it would be good to check if the data contains big values and propose scaling it down to avoid floating point accuracy issues.

@jeggermont
Copy link
Collaborator

bfloat16 has virtually the same range as float32, just with less precision but this is by design. If you don't have memory issues it would (almost) always be preferable to load data as float32.

Checking all data values before loading the data could also slow down the loading process, but we could consider adding an option to check all values and warn if they are out-of-range of the target datatype.

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

2 participants