Skip to content

Runs in the browser · Text utilities

Run GLiNER Small v2.1 in your browser

GLiNER Small v2.1 downloads 233.9 MB over WebGPU (q4f16), or 174.9 MB over WebAssembly (uint8), to pull named entities out of text for label types you choose entirely in the tab with Transformers.js. No install, no server.

Text utilities · onnx-community/gliner_small-v2.1

WebGPU download
233.9 MB
q4f16
WASM download
174.9 MB
uint8
Parameters
166M
Pipeline task
token-classification

Reading

Param count is the model card's stated figure, so treat it as approximate. GLiNER uses a span-based architecture rather than plain per-token labels; some setups need the dedicated GLiNER inference code rather than the generic token-classification pipeline().

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

The quant ladder spans 3.3x: 174.9 MB (uint8) to 583.0 MB (fp32).

Will it run in your browser?

Live check this browser

Checking for WebGPU support…

All measured variants

Quant Download size
Variant Size
uint8 WASM pick 174.9 MB
q4f16 WebGPU pick 233.9 MB
fp16 292.1 MB
q8 349.8 MB
bnb4 441.7 MB
q4 441.7 MB
fp32 583.0 MB

Sizes measured from the HuggingFace API file tree for onnx-community/gliner_small-v2.1, not estimated.

Use it with Transformers.js

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

const pipe = await pipeline("token-classification", "onnx-community/gliner_small-v2.1", {
  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 GLiNER Small v2.1, 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 GLiNER Small v2.1?

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.