Views
No views yet
npm i @huggingface/transformersonnx-community/helium-1-preview-2b-ONNX1import { pipeline } from "@huggingface/transformers";
2
3// Create a text generation pipeline
4const generator = await pipeline(
5 "text-generation",
6 "onnx-community/helium-1-preview-2b-ONNX",
7 { dtype: "q4" },
8);
9
10// Define the prompt
11const text = "Hello, today is a great day to";
12
13// Generate a response
14const output = await generator(text, { max_new_tokens: 128 });
15console.log(output[0].generated_text);onnx).