patil-suraj / onnx_transformers

Accelerated NLP pipelines for fast inference on CPU. Built with Transformers and ONNX runtime.
Apache License 2.0
126 stars 27 forks source link

why is onnx_cpu pipeline slower than pytorch_cpu pipeline? #12

Open yezhipeng2417 opened 3 years ago

yezhipeng2417 commented 3 years ago

I run the notebook on my computer (ubuntu 18.04 python 3.7 transformers 3.2 pytorch 1.6 cpu only), but onnx_cpu pipeline is slower than pytorch_cpu pipeline. image