Skip to content
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

Opset Issue while exporting to onnx #560

Open
avinish1 opened this issue Sep 27, 2024 · 0 comments
Open

Opset Issue while exporting to onnx #560

avinish1 opened this issue Sep 27, 2024 · 0 comments

Comments

@avinish1
Copy link

UnsupportedOperatorError: Exporting the operator 'aten::scaled_dot_product_attention' to ONNX opset version 12 is not supported. Support for this operator was added in version 14, try exporting with this version.

The following code is used

from setfit import SetFitModel
model = SetFitModel._from_pretrained("setfit_model/")

from setfit.exporters.onnx import export_onnx
output_path = "model.onnx"
export_onnx(model.model_body,
            model.model_head,
            opset=12,
            output_path=output_path)

Env:

torch = 2.4.1
setfit = 1.1.0
transformers = 4.45.1
onnxruntime = 1.19.2
onnx = 1.16.2

while trying to use opset version 14,

I get this error

UnsupportedOperatorError: Exporting the operator 'aten::scaled_dot_product_attention' to ONNX opset version 13 is not supported. Support for this operator was added in version 14, try exporting with this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant