ONNX Model Zoo

onnx-community/granite-4.0-micro-ONNX

By onnx-community · ↓ 0 · ♥ 1 · Updated 2025-10-02

What's in this repo

This page lists the files in onnx-community/granite-4.0-micro-ONNX, including model.onnx, model_fp16.onnx, model_q4.onnx and more.

  • 5 ONNX models (.onnx files)
  • 25 files, including 5 .onnx, 5 .onnx_data, 5 .onnx_data_1, 3 .onnx_data_2, 2 .onnx_data_3, 1 .md
  • Last updated 2025-10-02

ONNX files

File Size Download
model.onnx — Download
model_fp16.onnx — Download
model_q4.onnx — Download
model_q4f16.onnx — Download
model_quantized.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

Transformers.js

[!IMPORTANT]
Note: This model requires Transformers.js v4.0.0 and above!

Example: Basic example

import { pipeline, TextStreamer } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "onnx-community/granite-4.0-micro-ONNX",
  { dtype: "q4f16", device: "webgpu" },
);

// 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

onnx text-generation base_model:ibm-granite/granite-4.0-micro base_model:quantized:ibm-granite/granite-4.0-micro license:apache-2.0 region:us
↓ 0 ♥ 1

Created: 2025-10-02

Updated: 2025-10-02

View on Hugging Face

Files (25)

.gitattributes
README.md
model.onnx ONNX
model.onnx_data
model.onnx_data_1
model.onnx_data_2
model.onnx_data_3
model.onnx_data_4
model.onnx_data_5
model.onnx_data_6
model_fp16.onnx ONNX
model_fp16.onnx_data
model_fp16.onnx_data_1
model_fp16.onnx_data_2
model_fp16.onnx_data_3
model_q4.onnx ONNX
model_q4.onnx_data
model_q4.onnx_data_1
model_q4f16.onnx ONNX
model_q4f16.onnx_data
model_q4f16.onnx_data_1
model_quantized.onnx ONNX
model_quantized.onnx_data
model_quantized.onnx_data_1
model_quantized.onnx_data_2

Related models