Downloads · 30 days
8
8% of all-time downloads
HarmanjotSingh/Qwen2-1.5B-Instruct-ONNX-Web
Qwen2-1.5B-Instruct-ONNX-Web is a machine learning model from HarmanjotSingh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
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.
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
103
Public
Repo size
1.8 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.8 GB · 100%
From the Hugging Face model README
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.
Qwen/Qwen2-1.5B-InstructThis 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.
transformer.jsYou 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);