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
t5-11b out of memory/FileNotFoundError #11
Comments
I've not tested the library for and also make sure that you have enough memory. |
Thank you for getting back, it's highly appreciated. I tried adding
Still get the exact same error:
A bit strange though, since in the documentation you sent it says that setting use_external_data_format=True should solve this error... |
it is strange indeed! The problem seems to be in the onnxruntime library. you could follow this issue and try to solve the problem. if this does not help then, I suggest you create a new issue in onnxruntime regarding this issue. |
I'm getting this same error when trying to export t5-3b. Seems like this may be the more relevant onnx issue. Seems like the
while passing in a
|
Normal torch quantization works on the larger models, so to anyone reading could check that out as an alternative: https://snappishproductions.com/blog/2020/05/03/big-models-hate-this-one-weird-trick-quantization-t5--pytorch-1.4.html.html My result was 4x smaller (with qint8) and 3x faster, so better than nothing, although I lost a little bit of accuracy. |
``First of all, this seems like a great repo that I was super excited to find!
When testing with t5-small everything works correctly. But when trying with my custom t5-11b I get out of memory issues.
I was running this with a t5-11b as model:
onnx_model_paths = generate_onnx_representation("t5-11b",model=model)
And at first I got this error:
RuntimeError: Exporting model exceed maximum protobuf size of 2GB. Please call torch.onnx.export with use_external_data_format=True.
So I simply added
use_external_data_format=True
to all of the threetorch.onnx.export
in onnx_exporter.py in fastT5.Then I can run
onnx_model_paths = generate_onnx_representation(model_name,model=model)
, and get no error (First time I posted I got an error but it seems like I made an error and only had 100 GB disk memory, when trying 200 GB it worked).Then when running
quant_model_paths = quantize(onnx_model_paths)
I get the error:Has anyone successfully exported the t5-11b version and knows how to solve this?
Update:
I tried changing the working directory to /home/jupyter/models instead of /home/jupyter/, which seems to solve the FileNotFoundError. But then again I get problems with the size:
The text was updated successfully, but these errors were encountered: