huggingface / huggingface/setfit
Opset Issue while exporting to onnx
- Dominant language
- Jupyter Notebook
- Stars
- 2.8k
- Forks
- 267
- Avg merge
- 36m
- Merged PRs (30d)
- 5
Description
`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.`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.