Instructions to use onnx-community/Llama-3.2-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/Llama-3.2-1B with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'onnx-community/Llama-3.2-1B');
Error: Could not locate file
How do i resolve this? Error: Could not locate file: "https://huggingface.co/onnx-community/Llama-3.2-1B/resolve/main/onnx/decoder_model_merged_quantized.onnx"
i'm trying to use it with transformers.js and nextjs client side
I've got this error as well. Adding { model_file_name: 'model' } into pipeline() as a third argument allows to bypass this error and download the model. However getting transformers@2.17.2 Uncaught Error: Can't create a session error afterward. So was not able to try the model as well yet.
Hi all - please can you instead try @huggingface/transformers instead of @xenova/transformers? We are in the process of migrating all sample code to Transformers.js v3.
"@huggingface/transformers": "^3.0.0-alpha.20"
"@xenova/transformers": "^2.17.2"
Neither work for me...
