How does an AI live in your browser? (explained like you're five)
Imagine you have a really, really smart puppy. You can teach the puppy tricks, and then the puppy remembers them. An AI model is the same idea, except the "puppy" learned by reading almost the whole internet, and it lives as a big file on a computer.
The puppy needs three things
- The puppy itself — a big file called a "model". This page can download it. It's about the size of a long movie.
- A place to think — your computer's graphics chip (the GPU). The GPU is the part of your computer that draws games. It's really good at lots of small sums, which is exactly what an AI does.
- A door between them — a new browser feature called WebGPU. It's like opening a window so JavaScript (the language this page speaks) can whisper questions to the GPU.
So what happens when you click "Load model"?
- The page grabs the big puppy-file from the internet (only the first time — your browser saves it).
- It loads the puppy onto the GPU through the WebGPU window.
- The puppy is now sitting inside your computer, awake and ready.
What happens when you type a question?
- Your words go to the puppy on the GPU — not to any company, not to a server, not anywhere off your machine.
- The puppy thinks. It writes the answer one word at a time, streaming the words onto the page as it thinks (so you see it "typing" in real time).
- You read the answer. Hit Clear to forget the whole conversation, or close the tab — either way, the puppy is the only one who saw your words, and the puppy goes to sleep with the GPU when the tab closes.
What is "WebLLM"?
WebLLM is a tiny open-source library (made by the MLC AI team) that knows how to load a model file, talk to the GPU, and ask the model to generate text. It speaks the same "language" as OpenAI's API, so this chat feels like ChatGPT, but the "ChatGPT" is running on your laptop.
Will it drain my battery?
Yes, running a model uses real energy — think of it like a video game. On a laptop you'll hear the fan. On a phone, prefer the 1B or 1.5B model. On a desktop with a beefy GPU it's a non-event.
Is it as smart as ChatGPT?
Honest answer: the 1B model is roughly as smart as a fast typist with a good vocabulary. The 3B and 8B models are noticeably smarter, especially for reasoning. None of them are GPT-4. The point isn't to be the smartest AI — it's to be the most private one, instantly, in your browser.