You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After having obtained our ONNX model thanks to the export_and_get_onnx_model() method, we want to load it in order to use it in production.
There is a method called get_onnx_model() which requires the following arguments: model_name_or_path, onnx_models_path=saved_models_path and quantized=True
This is conceptually strange: why do I need to access the original model (via model_name_or_path) when I want to use the ONNX one?
I explored the code and figured out that model_name_or_path is needed for 2 things:
get the model name that was used to create the ONNX files names
get model name configuration
In order to avoid passing the model_name_or_path argument in get_onnx_model(), the export_and_get_onnx_model() method could save the model name configuration in the ONNX folder and could arrange a standard model name for ONNX files names as we can now (in the latest version of fastt5) customize ONNX folder path.
What do you think?
The text was updated successfully, but these errors were encountered:
yes, it is bit confusing, it should be model_name, not model_name_or_path, I'll make this change in the next update.
the purpose of the model_name (the current model_name_or_path) is to select a particular model from a custom folder if you've stored more than one type of model in that folder.
the export_and_get_onnx_model() method could save the model name configuration in the ONNX folder and could arrange a standard model name for ONNX files names as we can now (in the latest version of fastt5) customize ONNX folder path.
I think we could save the config file through export_and_get_onnx_model() . If not, we need model_or_model_path as argument of get_onnx_model() but we do not want that.
Hi,
After having obtained our ONNX model thanks to the
export_and_get_onnx_model()
method, we want to load it in order to use it in production.There is a method called
get_onnx_model()
which requires the following arguments:model_name_or_path
,onnx_models_path=saved_models_path
andquantized=True
This is conceptually strange: why do I need to access the original model (via
model_name_or_path
) when I want to use the ONNX one?I explored the code and figured out that
model_name_or_path
is needed for 2 things:In order to avoid passing the
model_name_or_path
argument inget_onnx_model()
, theexport_and_get_onnx_model()
method could save the model name configuration in the ONNX folder and could arrange a standard model name for ONNX files names as we can now (in the latest version of fastt5) customize ONNX folder path.What do you think?
The text was updated successfully, but these errors were encountered: