Closed uahmad235 closed 1 year ago
Hi there 👋 Yes, this is something we're aware of, and is due to a recent improvement to optimum where we don't need to export multiple decoders anymore. While we get this sorted, you can just rename model.onnx
to decoder_model_merged.onnx
and model_quantized.onnx
to decoder_model_merged_quantized.onnx
Thank you for the clarification @xenova. I actually suspected that already and renamed the file but here's the issue i got after that:
Uncaught (in promise) Error: An error occurred during model execution: "Missing the following inputs: position_ids.
I thought it's because of conversion issue.
Here's my code for loading model:
const textgen = await pipeline(
'text-generation',
'gpt2',
{
quantized: true,
},
);
That should have been fixed by a recent update. Are you sure you are using the latest version (2.9.0)?
Oh sorry i was using an older version 2.7.0
. Thank you for helping with this. closing now.
Description of bug
I am trying to run
gpt2
model after converting it via command:Here's the files i get after succesful conversion:
Please note that i do not have multiple files in
onnx
directory as in the Xenova/gpt2 model.I tried with different models such as
mt5
and it works fine returning all the desired files inonnx/
directory. I need to convertgpt2
model because i want to use a different version of thegpt2
model on huggingface for my particular usecase and hence i cannot use the one provided here.Maybe i am missing something here. Any help is appreciated
Steps to reproduce Run the conversion command for
gpt2
model:And check contents of
onnx/
directoryExpected behavior I am expecting multiple files in
onnx/
directory.Logs/screenshots Conversion logs:
Environment