Runs in the browser · Vision + language
Run SmolVLM-256M-Instruct in your browser
SmolVLM-256M-Instruct downloads 180.1 MB over WebGPU (q4f16), or 247.8 MB over WebAssembly (uint8), to read an image and answer questions about it in text entirely in the tab with Transformers.js. No install, no server.
Vision + language · HuggingFaceTB/SmolVLM-256M-Instruct
- Parameters
- 256.5M
- Pipeline task
- custom
Reading
No stable transformers.js pipeline() task for image+text chat yet; use AutoModelForVision2Seq and AutoProcessor directly (see the official SmolVLM-WebGPU demo).
The smallest vision + language download in the catalog (180.1 MB).
The quant ladder spans 5.4x: 180.1 MB (q4f16) to 980.9 MB (fp32).
Run it in your browser
Checking what this browser can run…
All measured variants
| Variant | Size |
|---|---|
| q4f16 WebGPU pick | 180.1 MB |
| bnb4 | 238.2 MB |
| uint8 WASM pick | 247.8 MB |
| q4 | 251.7 MB |
| fp16 | 490.6 MB |
| q8 | 495.6 MB |
| fp32 | 980.9 MB |
Sizes measured from the HuggingFace API file tree for HuggingFaceTB/SmolVLM-256M-Instruct, not estimated.
Use it with Transformers.js
import { AutoProcessor, AutoModelForVision2Seq, load_image } from "@huggingface/transformers";
const processor = await AutoProcessor.from_pretrained("HuggingFaceTB/SmolVLM-256M-Instruct");
const model = await AutoModelForVision2Seq.from_pretrained("HuggingFaceTB/SmolVLM-256M-Instruct", {
device: "webgpu",
// fp32 on purpose: the q4f16 and fp16 builds generate garbled text over
// WebGPU today (the official demo ships fp32 for the same reason).
dtype: "fp32", // use "uint8" for the WASM build
});
const image = await load_image("https://your-image-url.jpg");
const messages = [
{ role: "user", content: [{ type: "image" }, { type: "text", text: "Describe this image." }] },
];
const text = processor.apply_chat_template(messages, { add_generation_prompt: true });
const inputs = await processor(text, [image]);
const output = await model.generate({ ...inputs, max_new_tokens: 256 });
const result = processor.batch_decode(output, { skip_special_tokens: true });
Requires npm install @huggingface/transformers (or the CDN build). This model needs the lower-level API shown above, not pipeline() (see the Reading panel above).
Sources
Same job, different size
FAQ
WebGPU or WASM for SmolVLM-256M-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 SmolVLM-256M-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.