Unable to get this to work

#2
by smjain - opened

Thanks for adding this model.
When trying with nodejs on my machine, I keep getting this error. I have used the pipeline code you gave .
Anything wrong I am doing?
Error: File not found. Could not locate "Felladrin/onnx-int8-TinyMistral-248M/config.json".
at getModelFile (C:\shashank\node_modules@xenova\transformers\src\utils.js:244:23)
at async fetchJSON (C:\shashank\node_modules@xenova\transformers\src\utils.js:297:18)
at async Promise.all (index 0)
at async AutoModelForCausalLM.from_pretrained (C:\shashank\node_modules@xenova\transformers\src\models.js:2356:33)
at async generateText (C:\shashank\edgellm\genText.js:5:19)

Here is the code
const { pipeline } = require('@xenova/transformers');

async function generateText() {
const generator = await pipeline('text-generation', 'Felladrin/onnx-int8-TinyMistral-248M');
const output = await generator('Once upon a time,', { add_special_tokens: true, max_new_tokens: 60, repetition_penalty: 1.2 });
console.log(output);
}

generateText();

I save this as js file and run via node

Hi @smjain ,
I noticed you also commented on Transformers.js repository, so I suggest we continue this discussion from there, where I've also posted a reply: https://github.com/xenova/transformers.js/pull/379#issuecomment-1851616558

Felladrin changed discussion status to closed

Sign up or log in to comment