ONNX Model Zoo

HarmanjotSingh/Qwen2-1.5B-Instruct-ONNX-Web

By HarmanjotSingh · ↓ 4 · ♥ 0 · Updated 2025-10-20

What's in this repo

This page lists the files in HarmanjotSingh/Qwen2-1.5B-Instruct-ONNX-Web, including model-00001-of-00004.onnx, model-00002-of-00004.onnx, model-00003-of-00004.onnx and more.

  • 4 ONNX models (.onnx files)
  • 17 files, including 7 .json, 4 .onnx, 2 .md, 1 .jinja, 1 .txt
  • Last updated 2025-10-20

ONNX files

File Size Download
onnx/model-00001-of-00004.onnx — Download
onnx/model-00002-of-00004.onnx — Download
onnx/model-00003-of-00004.onnx — Download
onnx/model-00004-of-00004.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


license: other base_model: Qwen/Qwen2-1.5B-Instruct

Qwen2-1.5B-Instruct ONNX (INT8 Quantized) for Web

This repository contains a web-ready version of the Qwen/Qwen2-1.5B-Instruct model, converted to ONNX and quantized to INT8 for efficient in-browser inference with transformer.js.

This is a modified version of the original model. The conversion and quantization were performed to optimize for size and speed in WebGPU environments.

Original Model

License

This model is governed by the Tongyi Qianwen LICENSE 2.0. The full license is included in this repository. By using this model, you agree to the terms and conditions set forth in the license.

How to Use with transformer.js

You can use this model directly in your JavaScript projects with the @xenova/transformers library.

import { pipeline } from '@xenova/transformers';

// Your Hugging Face repository ID
const modelId = 'HarmanjotSingh/Qwen2-1.5B-Instruct-ONNX-Web';

// Initialize the text generation pipeline
const generator = await pipeline('text-generation', modelId, {
  device: 'webgpu', // Use WebGPU for GPU acceleration
  quantized: true,  // The model is quantized
});

// Generate text
const output = await generator('Hello, my name is', {
  max_new_tokens: 100,
});

console.log(output);

Model info

onnx qwen2 custom_code base_model:Qwen/Qwen2-1.5B-Instruct base_model:quantized:Qwen/Qwen2-1.5B-Instruct license:other region:us
↓ 4 ♥ 0

Created: 2025-10-20

Updated: 2025-10-20

View on Hugging Face

Files (17)

.gitattributes
LICENSE.md
README.md
added_tokens.json
chat_template.jinja
config.json
generation_config.json
merges.txt
onnx/.gitkeep
onnx/model-00001-of-00004.onnx ONNX
onnx/model-00002-of-00004.onnx ONNX
onnx/model-00003-of-00004.onnx ONNX
onnx/model-00004-of-00004.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models