Open iamhenry opened 3 weeks ago
im getting the same error for the new llama 3.1 1B
how do i resolve this issue and prevent it for the future models?
Error: Could not locate file: "https://huggingface.co/onnx-community/Llama-3.2-1B/resolve/main/onnx/decoder_model_merged_quantized.onnx"
i downloaded the model manually and placed in the the onnx directory
now i get this error after renaming the model to decoder_model_merged_quantized.onnx: Something went wrong during model construction (most likely a missing operation)
You need to specify the file name (and sometimes it's missing the folder as the onnx model files are not always in the onnx folder).
In the case of Qwen2.5, you need to specify the model: "model_quantized" (or whichever exact model version you want to use, check in files tab in HuggingFace and then open the onnx folder, pick the model you want to use and use the name, without the extension).
But then that particular model doesn't work indeed. It's failing at .loadModel()
when creating an inference session can't create session
.
@nicolasembleton thx.
So does that mean qwen 2.5 or llama 3.2 isn't supported yet by transformers.js?
Llama 3.2 1B seems to be supported, as there seems to be a demo available. The source code is missing though.
A good starting point might be the example code for Phi 3.5: https://github.com/huggingface/transformers.js-examples/blob/main/phi-3.5-webgpu/src/worker.js
For one thing, you don't need to provide the specific .onnx file. Transformers.js will grab the correct one based on the settings you provide when you create the pipeline / model.
More examples: https://github.com/xenova/transformers.js/tree/v3/examples https://github.com/huggingface/transformers.js-examples/tree/main
thank you and great find.
do you know if llama 3.2 1B will work with nextjs? I'm new to dev so i'm thinking it could be a pipeline not being compatible yet?
perhaps the @transformers pipeline isnt supported yet but @huggingface is?
perhaps the @transformers pipeline isnt supported yet but https://github.com/huggingface is?
Do you mean version 2 and version 3 of Transformers.js? if so, you need to use Transformers.js V3.
@flatsiedatsie how do i do that? is there a step by step guide?
also are all the features from v2 still functional?
i would hate to install it and cause breaking changes.
thanks in advanced!
V3 is much MUCH faster because it adds support for WebGPU.
Read through the documentation: https://huggingface.co/docs/transformers.js/index
And there are tons of examples (linked above). Always search in these issues too, there is loads of knowledge in them.
Appreciate your response, thx
System Info
node: 22.7 nextjs: 14
Environment/Platform
Description
I'm trying to load https://huggingface.co/onnx-community/Qwen2.5-0.5B-Instruct and i get the error
Error: Could not locate file: "https://huggingface.co/onnx-community/Qwen2.5-0.5B-Instruct/resolve/main/onnx/decoder_model_merged_quantized.onnx".
seems like someone else is running into the same issue https://huggingface.co/onnx-community/Qwen2.5-0.5B-Instruct/discussions/1
how do i fix this? i tried copying the download link directly but somehow it appends .json to the URL like so:
https://huggingface.co/https://huggingface.co/onnx-community/Qwen2.5-0.5B-Instruct/resolve/main/onnx/model_quantized.onnx/resolve/main/config.json\
how do i fix this to point to the correct model?
I'd love to use the new qwen2.5 0.5B and the 1.5B
thank you in advanced
code: