Skip to content

Runs in the browser · Text generation

Run Qwen2.5-1.5B-Instruct in your browser

Qwen2.5-1.5B-Instruct downloads 1.14 GB over WebGPU (q4f16), or 1.47 GB over WebAssembly (uint8), to generate text entirely in the tab with Transformers.js. No install, no server.

Text generation · onnx-community/Qwen2.5-1.5B-Instruct

WebGPU download
1.14 GB
q4f16
WASM download
1.47 GB
uint8
Parameters
1.54B
Pipeline task
text-generation

Reading

This is a multi-gigabyte download. Between the file size and current browser memory limits, it is impractical to run on most machines today.

The quant ladder spans 5.1x: 1.14 GB (q4f16) to 5.78 GB (fp32).

Will it run in your browser?

Live check this browser

Checking for WebGPU support…

All measured variants

Quant Download size
Variant Size
q4f16 WebGPU pick 1.14 GB
uint8 WASM pick 1.47 GB
bnb4 1.59 GB
q4 1.66 GB
fp16 2.89 GB
q8 2.94 GB
fp32 5.78 GB

Sizes measured from the HuggingFace API file tree for onnx-community/Qwen2.5-1.5B-Instruct, not estimated.

Use it with Transformers.js

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

const pipe = await pipeline("text-generation", "onnx-community/Qwen2.5-1.5B-Instruct", {
  device: "webgpu", // usually falls back to "wasm"; wrap in try/catch for production
  dtype: "q4f16", // use "uint8" for the WASM build
});

const result = await pipe(/* your input */);

Requires npm install @huggingface/transformers (or the CDN build).

Sources

Same job, different size

FAQ

WebGPU or WASM for Qwen2.5-1.5B-Instruct, in practice?

Chrome, Edge, and Safari 26+ run the WebGPU build (q4f16) on the GPU. Firefox has WebGPU on Windows and Apple Silicon Macs but not everywhere yet. Any browser without a WebGPU adapter falls back automatically to the WebAssembly build (uint8) on CPU: same model, slower to load, slower to run.

What does q4f16 mean for Qwen2.5-1.5B-Instruct?

The WebGPU build here uses q4f16: 4-bit weights with some layers kept at 16-bit for stability: WebGPU's usual smallest clean build. The WASM fallback uses uint8: 8-bit integers: about a quarter the size of fp32, with a smaller quality trade than 4-bit.

Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-08-03. See all browser models or the methodology.