The inference API and code in model card don't work

#1
by centaur31 - opened

Hello!
Why doesn't the model work?
If you can, I would appreciate if you could update the inference code in the model card
Thank you

centaur31 changed discussion title from The inference don't work to The inference API and code in model card don't work

Hello!
Why doesn't the model work?
If you can, I would appreciate if you could update the inference code in the model card
Thank you

I have the same issue!
Moreover, whenever I run the example, I keep getting this error :

 [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Add node. Name:'Add_749' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/math/element_wise_ops.h:540 void onnxruntime::BroadcastIterator::Init(ptrdiff_t, ptrdiff_t) axis == 1 || axis == largest was false. Attempting to broadcast an axis by a dimension other than 1. 3 by 12

I'm running it on google colab. And so I'm installing the pkgs as follows:

! pip install --upgrade pip
! pip install sentencepiece
! pip install transformers
! pip install langchain
! pip install onnxruntime
! pip install onnx
! pip install optimum
! pip install onnxruntime-gpu
Hugging Face Optimum org

Hi @Centaur31 and @YJ4219 ,

Thanks for opening the issue. The checkpoint has been uploaded for a while and according to the recent refactoring of the optimum library, it might be outdated and incompatible with the lastest Optimum. I will update it today when I have the bandwidth.

Hugging Face Optimum org
β€’
edited Nov 23, 2023

@Centaur31 @YJ4219 , hey folks, the checkpoint is updated, could you give it a try and tell me if it works? (tested with optimum v1.14.1 should be good)

I also added a export guide on the model card, if you meet outdated ONNX checkpoints again, don't hesitate to export a new one yourself, as there has been some update in the optimum library (and even better, open a pull request in the hub and tag the Optimum team members for a review πŸ€—!).

@Jingya Thank you very much for your response!
I have already converted the model manually (in the same way you provided in the model card) and everything seems to work fine!
Thank you!

Jingya changed discussion status to closed

Sign up or log in to comment