Python function
float32_to_bfloat16_as_uint16
float32_to_bfloat16_as_uint16()
max.pipelines.lib.float32_to_bfloat16_as_uint16(arr)
Converts a float32 array to bfloat16 representation stored as uint16.
BFloat16 is the upper 16 bits of float32 with proper rounding. This allows us to halve memory usage while maintaining the exponent range.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!