Skip to content

Runs in the browser · Embeddings

Run all-MiniLM-L6-v2 in your browser

all-MiniLM-L6-v2 downloads 28.6 MB over WebGPU (q4f16), or 21.8 MB over WebAssembly (uint8), to turn text into vectors for search and comparison entirely in the tab with Transformers.js. No install, no server.

Embeddings · Xenova/all-MiniLM-L6-v2

WebGPU download
28.6 MB
q4f16
WASM download
21.8 MB
uint8
Parameters
22.7M
Pipeline task
feature-extraction

Reading

The WASM build downloads smaller here: 21.8 MB (uint8) against 28.6 MB (q4f16) for WebGPU. The CPU-fallback quant compresses tighter than the GPU pick for this model.

The smallest embeddings download in the catalog (28.6 MB).

The quant ladder spans 4.0x: 21.8 MB (uint8) to 86.2 MB (fp32).

Run it in your browser

Live run this browser

Checking what this browser can run…

All measured variants

Quant Download size
Variant Size
uint8 WASM pick 21.8 MB
q4f16 WebGPU pick 28.6 MB
fp16 43.2 MB
q8 43.8 MB
bnb4 51.4 MB
q4 52.1 MB
fp32 86.2 MB

Sizes measured from the HuggingFace API file tree for Xenova/all-MiniLM-L6-v2, not estimated.

Use it with Transformers.js

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

const pipe = await pipeline("feature-extraction", "Xenova/all-MiniLM-L6-v2", {
  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 all-MiniLM-L6-v2, 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 all-MiniLM-L6-v2?

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.