onnx-community/Apertus-8B-Instruct-2509-ONNX
By onnx-community · ↓ 13 · ♥ 1 · Updated 2026-02-17
What's in this repo
This page lists the files in onnx-community/Apertus-8B-Instruct-2509-ONNX, including model.onnx, model_fp16.onnx, model_q4.onnx and more.
- 4 ONNX models (.onnx files)
- 45 files, including 5 .json, 4 .onnx, 4 .onnx_data, 4 .onnx_data_1, 4 .onnx_data_2, 2 .onnx_data_3
- Last updated 2026-02-17
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/model.onnx | — | Download |
| onnx/model_fp16.onnx | — | Download |
| onnx/model_q4.onnx | — | Download |
| onnx/model_q4f16.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
This is an ONNX version of swiss-ai/Apertus-8B-Instruct-2509.
Use with Transformers.js
[!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@next
Example: Basic example
import { pipeline, TextStreamer } from "@huggingface/transformers";
// Create a text generation pipeline
const generator = await pipeline(
"text-generation",
"swiss-ai/Apertus-8B-Instruct-2509",
{
device: "webgpu",
dtype: "q4f16",
},
);
// Define the list of messages
const messages = [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "What is the capital of France?" },
];
// 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);
// The capital of France is Paris.
Model info
Created: 2025-11-21
Updated: 2026-02-17
View on Hugging Face