byhandPro Tools

WebGPU

Run a model in the browser

For an AI engineer, seeing a model actually run is rarely quick. You find a GPU with enough memory, reserve it or wait in a queue, and set up an environment whose drivers, CUDA and library versions agree. Then you download the weights, write the loading code, and fix what breaks. All of that comes before the first token, and often all you wanted was a look: how the model answers, what it does with a prompt, whether it is the one to spend a real run on.

The WebGPU tool skips all of that. It runs the model's .byhand program in this browser tab, on the graphics card you already have. Press Load and the weights come straight from the model's own Hugging Face repository; press Generate and the text appears a token at a time. There's no account to set up, no machine to reserve and nothing to install. And the program running is the program you read: each weight is placed where it belongs by the mapping that model's verification checks against the published reference.

SmolLM-135M writing on from "Gravity is the force that", a token at a time, each shaded by its probability, the alternatives for the newest as bars

Try it on SmolLM-135M

Start small: 135 million parameters, about 260 MB of weights. Each token comes shaded by how likely the model found it; click one to see the tokens it could have chosen instead.

byhand
  1. 1
WebGPU
Open in byhand Pro →

Examples above the prompt offers a few, each a kind of thing a model can do: finish a sentence, write a story, answer a question, write code. Choose Greedy for the most likely token each time, or Sampled with a temperature, top-k and top-p. Precision sets how the weights are kept on the GPU: fp16, or int8 and int4 for less memory and slightly different text.

Then on DeepSeek-R1-Distill 1.5B

A larger model, and one that thinks out loud: DeepSeek-R1's reasoning distilled into a 1.5B Qwen. Its first prompt asks it to multiply two numbers step by step.

byhand
  1. 1
WebGPU
Open in byhand Pro →

Which models run

Nine language models run today, from 70M to 1.5B parameters: Pythia-70M, GPT-2, GPT-Neo-125M, SmolLM-135M, Qwen2-0.5B, BLOOM-560M, Qwen3-0.6B, DeepSeek-Coder-1.3B and DeepSeek-R1-Distill 1.5B. Open any other model and the tool says it is not supported yet, and lists these.

It needs a browser with WebGPU (Chrome and Edge on most computers, Safari on recent Macs) and a graphics card with room for the weights; the tool says how much before you load. A browser without WebGPU is told so in one line.

How it runs

Every model in the library is a .byhand program, and every operation in it has a shape the checker knows. The tool lowers the program to the same list of operations our other runtimes read, and runs each one as a small GPU program. Nothing about an architecture is written twice: there's no port to wait for, and the attention you read in the source is the attention that runs.

Roadmap

  • More models: every language model in the library, as each operation it uses runs on WebGPU.
  • Your edits, run: change a line of the program and run the changed model, on the original weights where they still fit.
  • Models larger than your GPU.
  • Real values in the other tools: the attention on your own prompt, the activations Shape draws.