ONNX Model Zoo

robertnetwork/strudel-phi3-test

By robertnetwork · ↓ 3 · ♥ 0 · Updated 2025-07-29

What's in this repo

This page lists the files in robertnetwork/strudel-phi3-test, including model.onnx, model_q4.onnx and more.

  • 3 ONNX models (.onnx files)
  • 15 files, including 8 .json, 3 .onnx, 1 .md, 1 .onnx_data
  • Last updated 2025-07-29

ONNX files

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

Phi-3 Mini-4K-Instruct ONNX model for onnxruntime-web

This is the same models as the official phi3 onnx model with a few changes to make it work for onnxruntime-web:

  1. the model is fp16 with int4 block quantization for weights
  2. the 'logits' output is fp32
  3. the model uses MHA instead of GQA
  4. onnx and external data file need to stay below 2GB to be cacheable in chromium

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

You can then use the model to generate text like this:

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

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "Xenova/Phi-3-mini-4k-instruct",
);

// Define the list of messages
const messages = [
  { role: "user", content:  "Solve the equation: x^2 - 3x + 2 = 0" },
];

// Create text streamer
const streamer = new TextStreamer(generator.tokenizer, {
  skip_prompt: true,
  // callback_function: (text) => { }, // Optional callback function
})

// Generate a response
const output = await generator(messages, { max_new_tokens: 512, do_sample: false, streamer });
console.log(output[0].generated_text.at(-1).content);

Model info

text-generation transformers.js
transformers.js onnx gptj text-generation ONNX DML ONNXRuntime nlp conversational license:mit region:us
↓ 3 ♥ 0

Created: 2025-07-29

Updated: 2025-07-29

View on Hugging Face

Files (15)

.gitattributes
LICENSE
README.md
added_tokens.json
config.json
genai_config.json
generation_config.json
model.onnx ONNX
onnx/model.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_q4.onnx_data
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models