Downloads · 30 days
24
23% of all-time downloads
onnx-community/ettin-decoder-68m-ONNX
ettin-decoder-68m-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
24
23% of all-time downloads
All-time downloads
103
Public
Repo size
629 MB
Likes
0
Public
Click a slice to open those files.
.onnx_data629 MB · 100%
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-68m-ONNX",
{ dtype: "fp32" },
);
// 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);