# Trocr after onnx quantisation conversion using optimum-cli , im getting this error

**URL:** <https://discuss.huggingface.co/t/trocr-after-onnx-quantisation-conversion-using-optimum-cli-im-getting-this-error/87359>\
**Category:** 🤗Optimum\
**Created:** [May 19, 2024, 6:28am UTC](https://discuss.huggingface.co/t/trocr-after-onnx-quantisation-conversion-using-optimum-cli-im-getting-this-error/87359 "2024-05-19T06:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sainithish](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sainithish](https://discuss.huggingface.co/u/sainithish)\
**Post date:** [May 19, 2024, 6:28am UTC](https://discuss.huggingface.co/t/trocr-after-onnx-quantisation-conversion-using-optimum-cli-im-getting-this-error/87359/1 "2024-05-19T06:28:06Z")

</div>

first i tried to convert my model to onnx using this…  
`!optimum-cli export onnx -m best_M/ --task vision2seq-lm best_M_onnx/ --atol 1e-3`

after its works perfectly when i tested with this converted onnxmodel, then i try to quantise this model using this…  
`!optimum-cli onnxruntime quantize --onnx_model best_M_onnx/ --avx512 -o best_M_quant/`

this is succesfully quantise the model interms of size, but when im testing this error im getting…

````auto
Traceback (most recent call last):
  File "onnx_quant.py", line 213, in <module>
    test_ort()
  File "onnx_quant.py", line 159, in test_ort
    model = ORTModelForVision2Seq()
  File "onnx_quant.py", line 110, in __init__
    self.encoder = ORTEncoder()
  File "onnx_quant.py", line 38, in __init__
    self.session = onnxrt.InferenceSession(onnx_encoder, providers=["CPUExecutionProvider"]
  File "/home/sai/anaconda3/envs/onnx/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/home/sai/anaconda3/envs/onnx/lib/python3.8/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 463, in _create_inference_session
    sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.NotImplemented: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for ConvInteger(10) node with name '/embeddings/patch_embeddings/projection/Conv_quant'```

plese help me and thanks in advance
````

---

<div class="post-metadata">

**Author:** ![regisss](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/regisss/32/22467_2.png) [@regisss](https://discuss.huggingface.co/u/regisss)\
**Post date:** [May 20, 2024, 8:52am UTC](https://discuss.huggingface.co/t/trocr-after-onnx-quantisation-conversion-using-optimum-cli-im-getting-this-error/87359/2 "2024-05-20T08:52:08Z")

</div>

Hi @sainithish! Can you provide the script you used to test the quantized model please?
