← ROUTE MAP
08 / LAB
/

Browser model lab

Run a model
in this tab.

Everything else in this guide talks about models you rent. Here you download one: a small open model from Hugging Face, running on your own GPU or CPU, with no account, no key, and no server reading your prompt.

Film · 24 s · silent, captioned
Transcript
  1. A language model, inside a web page.
  2. The weights download once, from the Hub.
  3. Next visit, they load from the browser cache.
  4. It runs on your own GPU.
  5. Your prompt never leaves the page.
  6. The model comes to you.

01 · Chat

Pick a model. It downloads once.

These are small open models, a few hundred megabytes each, so expect short answers and real mistakes. That is the point: you can feel what size buys. The size shown is what your browser will download; after that the model loads from its cache.

Model

…

    02 · Search by meaning

    Words differ. Meaning matches.

    This is the retrieval half of RAG. An embedding model turns each sentence into a list of numbers; sentences that mean similar things land close together, even with no words in common. Ask about "vacation days" and the sentence about "paid leave" should rise to the top.

    Embedding model

    1. – Use a fast model for small, well-specified edits.
    2. – Raise reasoning effort when the task is ambiguous or costly to get wrong.
    3. – Give each agent its own git worktree so edits never collide.
    4. – A skill keeps only its description in context until a request matches it.
    5. – A pre-push hook runs the checks before code leaves your machine.
    6. – Split documents into labelled chunks and cite the source of every answer.
    7. – If no chunk scores high enough, answer that the sources do not say.
    8. – Full-time staff get 25 working days of paid leave a year.

    03 · Your disk

    What stays behind.

    Downloaded weights live in this site's browser storage, not in a folder you can see. They stay until you clear them here or clear site data. Nothing you type is stored or sent anywhere.

    …

    What happens on Load

    Four steps,
    all in your browser.

    The page itself is static. The work happens in a background worker, so the page stays responsive while the model thinks.

    1. 01
      Detect Check for WebGPU with half-precision shaders. Without it, fall back to WebAssembly on the CPU.
    2. 02
      Download Fetch the quantized ONNX weights and tokenizer from the Hub, once, into the browser cache.
    3. 03
      Compile ONNX Runtime Web builds the model's graph for your GPU or CPU. This is the pause after the bar fills.
    4. 04
      Stream Each new token is sent back to the page as it is produced, so you watch the answer being written.

    Other places

    Where open models come from.

    Hub

    Hugging Face

    Where this page gets its weights. Look for repos with an onnx/ folder, often under onnx-community, to run them in a browser.

    Browse browser-ready models ↗
    Browser

    Built-in models

    Some browsers ship their own on-device model behind a Prompt API. When yours does, the lab offers it as an extra option.

    Read the Prompt API ↗
    Local

    Your own machine

    For models too big for a tab, run them as a local server with Ollama or llama.cpp; the same open weights, more memory.

    Ollama library ↗