Error during model execution - RangeError: offset is out of bounds

#1
by jeremyruss - opened

I can't seem to get this model running with Transformers.js in the browser. I did however manage to get it working by running in a Node environment. Does anyone have a clue what could be causing this error and how to fix it. Maybe I am missing something really obvious. Thanks :)
69.png

Owner

Hi there πŸ‘‹ This is being investigated here: https://github.com/xenova/transformers.js/issues/499

Hi @Xenova , I'm Trying to export Tinyllama into onnx format :

from optimum.onnxruntime import ORTModelForCausalLM
model = ORTModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0", export=True)

and I'm having this error:
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 32 but got size 4 for tensor number 1 in the list.

In-place op on output of tensor.shape. See https://pytorch.org/docs/master/onnx.html#avoid-inplace-operations-when-using-tensor-shape-in-tracing-mode

How did you exported it into onnx without any error?
What I m missing here?
Thanks

Sign up or log in to comment