File size: 386 Bytes
5fa1a76 |
1 2 3 4 5 6 7 8 9 |
For example, we can load and run the model with ONNX Runtime as follows: thon from transformers import AutoTokenizer from optimum.onnxruntime import ORTModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("distilbert_base_uncased_squad_onnx") model = ORTModelForQuestionAnswering.from_pretrained("distilbert_base_uncased_squad_onnx") inputs = tokenizer("What am I using? |