13 models · Text generation · Transformers.js
Run an LLM in your browser
13 models handle text generation in the browser today, from 112.2 MB (SmolLM2-135M-Instruct) to 2.16 GB (Phi-3.5-mini-instruct), a 543.4 MB download at the midpoint. Every one runs with Transformers.js over WebGPU or WebAssembly: no server, no install, no account.
- Models
- 13
- Smallest
- 112.2 MB
- Median
- 543.4 MB
- Largest
- 2.16 GB
Every text generation model, ranked by WebGPU size
| Model | WebGPU download | WASM download |
|---|---|---|
| SmolLM2-135M-Instruct 134.5M params | 112.2 MB q4f16 | 130.8 MB uint8 |
| LFM2.5-350M 354.48M params | 243.3 MB q4f16 | 486.5 MB q8 |
| SmolLM2-360M-Instruct 361.8M params | 260.1 MB q4f16 | 347.7 MB uint8 |
| Gemma-3-270M-it 268.1M params | 260.3 MB q4f16 | 520.0 MB q8 |
| Granite-4.0-350M 352.38M params | 334.2 MB q4f16 | 334.2 MB q4f16 |
| Qwen2.5-0.5B-Instruct 494M params | 460.6 MB q4f16 | 488.4 MB uint8 |
| Qwen3-0.6B 751.63M params | 543.4 MB q4f16 | 589.1 MB uint8 |
| Gemma-3-1B-it 999.89M params | 728.2 MB q4f16 | 955.1 MB uint8 |
| Llama-3.2-1B-Instruct 1.24B params | 1.01 GB q4f16 | 1.15 GB uint8 |
| Bonsai-1.7B 1.72B params | 1.04 GB q4 | 1.87 GB q8 |
| Qwen2.5-1.5B-Instruct 1.54B params | 1.14 GB q4f16 | 1.47 GB uint8 |
| DeepSeek-R1-Distill-Qwen-1.5B 1.78B params | 1.28 GB q4f16 | 1.72 GB uint8 |
| Phi-3.5-mini-instruct 3.82B params | 2.16 GB q4f16 | 2.16 GB q4f16 |
Sizes measured from the HuggingFace API file tree for each model's repo, not estimated. Sorted smallest to largest by the WebGPU headline pick.
Size ladder
The WebGPU download spans 19.7x here: 112.2 MB (SmolLM2-135M-Instruct) to 2.16 GB (Phi-3.5-mini-instruct).
None of the 13 models here download smaller over WebAssembly than WebGPU: the WebGPU build is the lighter pick across the group.
None of the 13 models here fit under 100 MB over WebGPU.
Bytes-per-million-params ranges 1.7x within this group: 0.58 MB/M (Phi-3.5-mini-instruct) to 0.97 MB/M (Gemma-3-270M-it).
Use it with Transformers.js
Every text generation model here shares the same pipeline() task, so one snippet covers the group. This one loads SmolLM2-135M-Instruct, the smallest download; swap the repo string for any other row in the table above.
import { pipeline } from "@huggingface/transformers";
const pipe = await pipeline("text-generation", "HuggingFaceTB/SmolLM2-135M-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).
Notable text generation models
Other tasks
Or see every browser model grouped by task, or the main GGUF catalog for native runtimes outside the browser.
FAQ
Do all text generation models here use the same WebGPU quant?
No. 12 use q4f16, 1 use q4. q4f16 is the most common pick.
What would it cost to download every text generation model here?
9.50 GB total over WebGPU across all 13 models, if you tried every one back to back. Most projects only need the single model that fits the job, not the whole set.
Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-09-14. See all browser models or the methodology.