Transformers.js and onnx with llama 2 7B error: [E:onnxruntime:, inference_session.cc:1533 onnxruntime::InferenceSession

#1
by Noahloghman - opened

Hi @Xenova ,
I'm converting llama2 7B into onnx, but I have this error : (access token done, all setup are ok)
[E:onnxruntime:, inference_session.cc:1533 onnxruntime::InferenceSession::Initialize::::operator ()] Exception during initialization: D:\a_work\1\s\onnxruntime\core\optimizer\initializer.cc:31 onnxruntime::Initializer::Initializer !model_path.IsEmpty() was false. model_path must not be empty. Ensure that a path is provided when the model
is created or loaded.

I did not see in your folder the onnx_data files, did you loaded them inside the onnx file? in my case I have .onnx files and .onnx_data files inside onnx folder.
why do you think I have this error ? I'm using transformers.js .
with same files everything works good with python but not transformers.js

I'll appreciate your feedback, Thank you

Hi there. This is most likely due to the limitation in version 1.14.0 of onnxruntime-web / onnxruntime-node , which doesn't support the external data format (for models > 2GB, weights are split into a separate .onnx_data file).

This will be fixed in a future update which does support the external data format. See here for a recent issue on the matter.

Ooh Thank you so much for this information, I spent days trying to fix it πŸ˜€

Sign up or log in to comment