hjLabs AI Playground

Starting the on-device runtime…

ViT-GPT2 Captioner — image captioning running in your browser

ViT-GPT2 Captioner is a 239M-parameter ONNX model that writes a natural-language description of what is in an image. On this page it runs entirely inside your browser: the 248 MB download comes straight from the Hugging Face repository “Xenova/vit-gpt2-image-captioning” into your browser cache, and every inference after that executes on your own GPU through WebGPU. Expect a download of roughly a minute on a decent connection. It fits comfortably in the browser cache and in the memory of any GPU from the last few years, including laptop integrated graphics.

At a glance

Hugging Face repository
Xenova/vit-gpt2-image-captioning
Task
Image Captioning
Download size
248 MB
Parameters
239M
Precisions
q8, fp32
Monthly downloads
9k
Runs on
WebGPU in your browser (WebAssembly fallback)
Price
Free — your GPU does the work

Plain one-sentence captions through a standard pipeline() call — the dependable choice for bulk alt text. In practice people reach for a model like this for generating alt text at scale, cataloguing photo archives, and describing images for screen readers.

Available precisions: q8 (8-bit) and fp32 (full precision). q8 comes first because it roughly halves the download at a quality cost you will struggle to measure on this class of model; fp32 is there when you want the reference numbers. It is this playground's default pick for the task, and Hugging Face records about 9k downloads a month for the repository — a good sign that it is maintained and that the ONNX export is not abandoned.

Because there is no inference server behind this page, there is nothing to rate-limit and nothing to bill: the only cost of running ViT-GPT2 Captioner here is the one-off 248 MB download, and once that is cached the page keeps working with the network switched off.

vit-gpt2 captionervit-gpt2 captioner onnxvit-gpt2 captioner browserrun vit-gpt2 captioner locallyxenova/vit-gpt2-image-captioningimage captioning modelvit-gpt2 captioner webgpuvit-gpt2 captioner download sizefree image captioning modeltransformers.js model

Frequently asked questions

How large is the ViT-GPT2 Captioner download?

About 248 MB for the q8 build, including the tokenizer and config files the runtime also has to fetch — this is the whole payload, not just the weights file. It is downloaded once and then served from the browser Cache Storage API.

Can ViT-GPT2 Captioner run without a GPU?

Yes, through the WebAssembly fallback, which is slower but works anywhere. WebGPU (Chrome or Edge 113+, Safari 26+) is what makes it feel interactive. On WASM, prefer the smaller quantized build.

Do I need a Hugging Face token or an API key?

No. Xenova/vit-gpt2-image-captioning is a public repository, so your browser fetches the ONNX files directly over HTTPS. There is no account, no key and no server in between.

Is my data uploaded to a server?

No. The model weights are downloaded from Hugging Face to your browser once, and every inference after that runs on your own GPU through WebGPU. Your text, images and audio are never sent anywhere — hjLabs.in has no inference server and no way to see your input.