-
Notifications
You must be signed in to change notification settings - Fork 512
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
Issue when converting Exaone 3.0 7.8B model #2202
Comments
Issue seems to be this line: It uses self.num_attention_heads, instead of num_key_value_heads |
It seems like Exaone and Llama share the same input/output pattern
I was able to export Exaone by passing # transformers==4.47.1
# optimum==1.24.0
import transformers
import optimum.exporters
model_name = "LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct"
model = transformers.AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
)
custom_onnx_configs = {
"model": optimum.exporters.onnx.model_configs.LlamaOnnxConfig(
config=model.config,
task="text-generation",
)
}
optimum.exporters.onnx.onnx_export_from_model(
model=model,
task="text-generation",
output="./hidad",
opset=17,
custom_onnx_configs=custom_onnx_configs,
) Output Log
Maybe you were missing optimum/optimum/exporters/onnx/model_configs.py Lines 347 to 352 in c2259ea
|
Hi @jl749, Thanks for the response, that seems to work with exporting, however when I try to use onnxruntime-genai to do model inferencing I'm running into this error:
Any clues for finding the cause? |
System Info
Who can help?
Hi,
When trying to convert this model to onnx format:
https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct
With this code:
I'm getting this issue:
I think the issue is with difference in num_attention_heads and num_key_value_heads
"num_attention_heads": 32,
"num_key_value_heads": 8,
Is there a way to configure the export?
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction (minimal, reproducible, runnable)
Can be reproduced with publicly available model
Expected behavior
Without using use_past_in_inputs=True the model is exported as normal.
The text was updated successfully, but these errors were encountered: