Open PatriceVignola opened 1 year ago
Hi @PatriceVignola! I couldn't reproduce this error with:
optimum==1.8.6
transformers==4.29.2
onnx==1.13.1
onnxruntime==1.14.1
Have you tried again since you posted this issue?
Dear @regisss @PatriceVignola
I get another error using these versions:
optimum
version: 1.8.7transformers
version: 4.29.2optimum-cli export onnx --model stabilityai/stablelm-tuned-alpha-7b stablelm-tuned-alpha-7b_onnx/
ERROR: Detailed error: Unable to merge decoders. Detailed error: Data of TensorProto ( tensor name: gpt_neox.embed_in.weight_merged_0) should be stored in decoder_model_merged.onnx_data, but it doesn't exist or is not accessible.
@typicaldigital I couldn't reproduce your issue on Ubuntu 20.04
@regisss Thank you so much for the update. Will try on Ubuntu. :)
Hi @typicaldigital , Windows is not well tested in our CI. I have no issue running on ubuntu. It may be possible it is a bug from ONNX on Windows and not Optimum.
@typicaldigital did you find a way to make it work on Windows ? I'm facing the same issue.
@claeyzre Temporarily, you can always disable post-processing with --no-post-process
if you'd just like the export to succeed.
Nope, unfortunately not, I really hope this can be rectified soon. 😊
From: claeyzre @.>
Sent: Saturday, June 24, 2023 12:59 AM
To: huggingface/optimum @.>
Cc: typicaldigital @.>; Mention @.>
Subject: Re: [huggingface/optimum] StableLM cannot be converted with post processing turned on because the ByteSize()
function returns only 1.4gb (Issue #1044)
@typicaldigital https://github.com/typicaldigital did you find a way to make it work on Windows ? I'm facing the same issue.
— Reply to this email directly, view it on GitHub https://github.com/huggingface/optimum/issues/1044#issuecomment-1604404474 , or unsubscribe https://github.com/notifications/unsubscribe-auth/A6D4DZDCIZMDFQR6OMRMKVTXMWVLJANCNFSM6AAAAAAX3BE5AI . You are receiving this because you were mentioned. https://github.com/notifications/beacon/A6D4DZETRHRZBAETGQ3FO7DXMWVLJA5CNFSM6AAAAAAX3BE5AKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS7UFCPU.gif Message ID: @. @.> >
@claeyzre Temporarily, you can always disable post-processing with
--no-post-process
if you'd just like the export to succeed.
I kind of did that. A following onnxruntime inference will serve as a poor man "check_model" in my case.
You should probably open an issue in the ONNX repo about ByteSize()
with the model in copy.
Just saw the comment https://github.com/microsoft/Olive/blob/697948c2a1f7fe938609e1c97060d17f255c322e/olive/passes/onnx/optimum_merging.py#L44-L49 @PatriceVignola. I'll add an option to always use onnx.checker.check_model
with the model path rather than the proto.
Hi @fxmarty !
I just came back from vacation and caught up on this. Is there any progress on adding this option to Optimum?
Thanks!
System Info
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
When running the following command, the post-processing step fails because the model is bigger than 2gb (the weights are around 30gb), but somehow the
ByteSize()
function only returns 1.4gb, which leads to the post-processing logic to take theModelProto
path instead of the "model path" path.optimum-cli export onnx --model=stabilityai/stablelm-tuned-alpha-7b stablelm_tuned_alpha_7b_onnx
Error:
Expected behavior
I expect the post processing step to take the "model path" branch instead of the "ModelProto" branch since the model is clearly bigger than 2gb. I also expect the
ByteSize()
function to return the total size of the weights (~30gb), but it only returns 1.4gb.