onnxconverter-common icon indicating copy to clipboard operation
onnxconverter-common copied to clipboard

max_finite_val default value

Open haowang5128 opened this issue 7 months ago • 0 comments

Hi, I notice that convert_np_to_float16(np_array, min_positive_val=1e-7, max_finite_val=1e4) has 1e4 as the default value for max_finite_val, however the max value for float16 is 65504. Onnxruntime repo also has 65504 for their version of convert_np_to_float16. https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/tools/transformers/float16.py#L40

Could someone please to explain to me why setting 1e4 as max_finite_val?

haowang5128 avatar Jul 03 '24 11:07 haowang5128