Runs in the browser · Text generation
Run Phi-3.5-mini-instruct in your browser
Phi-3.5-mini-instruct downloads 2.16 GB over WebGPU (q4f16), or 2.16 GB over WebAssembly (q4f16), to generate text entirely in the tab with Transformers.js. No install, no server.
Text generation · onnx-community/Phi-3.5-mini-instruct-onnx-web
- Parameters
- 3.82B
- Pipeline task
- text-generation
Reading
Only a single q4f16 web build (about 2.3 GB) is published, no fp16 or int8 alternative, which alone makes it a heavy download for a browser page. 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 largest text generation download in the catalog (2.16 GB).
Will it run in your browser?
Checking for WebGPU support…
All measured variants
| Variant | Size |
|---|---|
| q4f16 WebGPU pick WASM pick | 2.16 GB |
Sizes measured from the HuggingFace API file tree for onnx-community/Phi-3.5-mini-instruct-onnx-web, not estimated.
Use it with Transformers.js
import { pipeline } from "@huggingface/transformers";
const pipe = await pipeline("text-generation", "onnx-community/Phi-3.5-mini-instruct-onnx-web", {
device: "webgpu", // usually falls back to "wasm"; wrap in try/catch for production
dtype: "q4f16", // use "q4f16" 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 Phi-3.5-mini-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 (q4f16) on CPU: same model, slower to load, slower to run.
What does q4f16 mean for Phi-3.5-mini-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 q4f16: 4-bit weights with some layers kept at 16-bit for stability: WebGPU's usual smallest clean build.
Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-08-03. See all browser models or the methodology.