Load Llama-3.2 WebGPU in your browser from a local folder

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Running LLMs fully locally in the browser is now practical, and the demo shows agentic coding tools can build working custom tools from a few prompts.

Read this as

Simon Willison modified an existing browser-based chat demo so it can run the Llama 3.2 model (a small open-source AI model) directly from a folder on your own computer, using WebGPU, a browser technology that lets programs use your graphics chip for AI. Normally the demo downloads the model, about 1.2GB, over the internet each time. Instead you browse to a local folder and it loads instantly, with nothing sent anywhere. He built it mostly by giving instructions to OpenAI's Codex coding assistant.

Willison used OpenAI's Codex CLI with GPT-5 to add local-file loading to a Llama 3.2 browser demo in four prompts, costing roughly 54 cents of tokens or falling within his $20/month ChatGPT Plus plan. The result runs a 1.2GB on-device model in Chrome or Firefox Nightly with no network download. For teams, this is a cheap proof that agentic coding tools can implement niche features without engineers.

The demo uses Transformers.js with WebGPU to run Llama-3.2-1B-Instruct-q4f16 ONNX quantized weights, loaded via the File System Access API from a local folder instead of network fetch. Codex CLI (GPT-5) made the change in four prompts, inspecting Transformers.js source, consuming 169,818 input, 17,112 output and 1,176,320 cached tokens (~$0.54 at list prices). Inference runs at roughly 10 tokens/second in Chrome or Firefox Nightly.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Simon Willison Llama 3.2 Codex CLI Transformers.js WebGPU Hugging Face ChatGPT Plus

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading