executorch Error: Forward pass failed: Error 18] #681
-
|
Hi all I converted my fine-tuned huggingface t5 model to the executorch (.pte) format. I converted the model with optimum-executorch Seq2Seq models using the text2text-generation. I am able to successfully run the model using the ExecuTorchModelForSeq2SeqLM class from from optimum.executorch. But while running it with the react-native-executorch useExecutorchModule hook. I am not able to run the inference and it fails with the error executorch Error: Forward pass failed: Error 18]. Can you help me out with what the issue is here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi Yogesh, Error code 18 means that model received incorrect input. Usually this means that shape or type of the tensor thar goes to the model is different than what model expects. I suggest to use |
Beta Was this translation helpful? Give feedback.
Hi Yogesh,
Error code 18 means that model received incorrect input. Usually this means that shape or type of the tensor thar goes to the model is different than what model expects. I suggest to use
getInputShapeforforwardmethod fromExecutorchModuleand check if you provide the correct input shape, check here: https://docs.swmansion.com/react-native-executorch/docs/typescript-api/executorch-bindings/ExecutorchModule.