Convert to ONNX
Thanks for a nice example of using transformers in JS. I tried myself to convert the "distilbert-base-uncased-finetuned-sst-2-english" into ONNX but failed. It converts to ONNX with an quantized model as well, but the same pipeline code gives error "Unexpected input data type", expected int32.
Can you provide a hint how the onnx conversion is done, with the quantize step as well? Thanks once again.
Weel, guess the answer is here:
https://github.com/xenova/transformers.js#convert-your-models-to-onnx
hi
@tornord
, were you able to use the provided onnx models in this repo? I encounter the following issue with the provided model and when I convert the model myself to onnx (provided I have not used the script referenced above)
https://huggingface.co/Xenova/distilbert-base-uncased-finetuned-sst-2-english/discussions/2#65f5358319f0c8c4f976a33a
Thanks!
Resolved, working demo here https://github.com/flores-o/onnxruntime-web-demo/blob/main/index.html