-
Notifications
You must be signed in to change notification settings - Fork 454
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
Auto-detect framework for large models at ONNX export #867
Labels
Comments
cc @michaelbenayoun as well. This might be a feature necessary to implement in optimum. |
@fxmarty do you know if we support that in |
Hi @WangYizhang01 , Using Optimum export, We could auto-detect the framework for split bins, right. |
fxmarty
changed the title
Transformers.onnx converts 13B GPT2 error
Auto-detect framework for large models at ONNX export
Mar 14, 2023
fxmarty
added
feature-request
New feature or request
onnx
Related to the ONNX export
labels
Mar 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
transformers
version: 4.26.1Who can help?
@sgugger @muellerzr
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
I created a GPT2 with a parameter volume of 13B. Just for testing, refer to https://huggingface.co/docs/transformers/serialization, I save it to gpt2_checkpoint. Then convert it to onnx using transformers.onnx. Due to the large amount of parameters,
save_pretrained
saves the model as *-0001.bin, *-0002.bin and so on. Later, when running ‘python -m transformers.onnx --model=gpt2_checkpoint onnx/’, an errorFileNotFoundError: Cannot determine framework from given checkpoint location. There should be a pytorch_model.bin for PyTorch or tf_model.h5 for TensorFlow.
So, I would like to ask how to convert a model with a large number of parameters into onnx for inference.The text was updated successfully, but these errors were encountered: