-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Modified export.py to add the ability to export fp16 weights. #345
base: master
Are you sure you want to change the base?
Conversation
I am against creating a new version. It should export to existing versions, but choosing the output format (fp32, fp16, int8...) Current code still expect the I also think you mean 64 GB instead of MB. BTW this OOM problem is tracked on #341 |
It will be the "legacy version" but with fp16 weights.
Changing the command line parameters of |
Just thought of another way, but I'm not sure I like it: use the extension of the output file to determine the fp32/fp16 size.
could signal |
Why your Why your function is not together with the other 2 in the beginning of the file? |
My attempt is at #347 |
About the half, is to stay consistent with the torch.half in the code. I liked it better (I ad fp16 initially). for the position, I don't like to disrupt existing code (at least not for something so minimal) and just added at the end of the block. But in this case I agree I should have put it earlier, together with the other two, moved up. |
Added a --version 3 to the parameters that is like legacy_export but exports data in fp16 format.
Warning! needs test. I have too little memory (64GB are needed for a 7B parameters model and I couldn't find a smaller one)