Downloads · 30 days
33
17% of all-time downloads
onnx-community/Olmo-3-7B-Instruct-ONNX
Olmo-3-7B-Instruct-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 apache-2.0.
[!IMPORTANT] Note: This model requires Transformers.js v4.0.0 and above!
Downloads · 30 days
33
17% of all-time downloads
All-time downloads
191
Public
Repo size
59.2 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data10.3 GB · 17%
From the Hugging Face model README
[!IMPORTANT]
Note: This model requires Transformers.js v4.0.0 and above!
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
Example: Basic example
import { pipeline, TextStreamer } from "@huggingface/transformers";
// Create a text generation pipeline
const generator = await pipeline(
"text-generation",
"onnx-community/Olmo-3-7B-Instruct-ONNX",
{ dtype: "q4f16", device: "webgpu" },
);
// Define the list of messages
const messages = [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Write me a poem about Machine Learning." },
];
// Generate a response
const output = await generator(messages, {
max_new_tokens: 512,
do_sample: false,
streamer: new TextStreamer(generator.tokenizer, { skip_prompt: true, skip_special_tokens: true }),
});
console.log(output[0].generated_text.at(-1).content);