Downloads · 30 days
20
22% of all-time downloads
onnx-community/ettin-decoder-1b-ONNX
ettin-decoder-1b-ONNX is a text generation model from onnx-community. Use it when you need the model to write or continue text. It is set up for transformers.js. The card lists the license as mit.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
Downloads · 30 days
20
22% of all-time downloads
All-time downloads
91
Public
Repo size
7.9 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data5.8 GB · 74%
From the Hugging Face model README
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
You can then generate text as follows:
import { pipeline, TextStreamer } from "@huggingface/transformers";
// Create a text generation pipeline
const generator = await pipeline(
"text-generation",
"onnx-community/ettin-decoder-1b-ONNX",
);
// Generate a response
const text = "Q: What is the capital of France?\nA:";
const output = await generator(text, {
max_new_tokens: 128,
streamer: new TextStreamer(generator.tokenizer, { skip_prompt: true, skip_special_tokens: true }),
});
console.log(output[0].generated_text);