File size: 391 Bytes
abbd3ba
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import onnx
#from onnxconverter_common import float16
from onnxruntime.transformers.float16 import convert_float_to_float16
langs = ['ar','cn','de','en','fa','fr','id','ja','km','ko','mn','pt','ru','th','tr','vi']


for lang in langs:
	print(lang)
	model = onnx.load(f"{lang}_base.onnx")
	model_fp16 = convert_float_to_float16(model)
	onnx.save(model_fp16, f"{lang}_base_f16.onnx")