An interactive guide for students & educators

AI, running on your hardware.

Most people meet AI as a website that answers questions, with no sense of what is happening behind it. This guide explains what an AI model actually is, what it takes to run one on a computer you own, and what that costs. Every number here is calculated, and you can change the hardware yourself in the Hardware Lab.

Skip to the Lab

What an AI model actually is

An AI model is a very large list of numbers, saved in a file. Those numbers are called weights, and a model such as Qwen3-4B holds about 4.2 billion of them. They were set during training, which is the long and expensive process of building the model, and they never change afterwards.

When you send a question, the software multiplies your words through those numbers to work out which fragment of text should come next. Then it does the whole thing again for the fragment after that. There is no thinking behind the screen and no lookup of stored answers. There is a file of numbers and a great deal of arithmetic.

What happens when you use a chatbot

  • You type a question in a browser or an app.
  • The text travels over the internet to a datacenter.
  • A very large model runs there, on hardware worth more than a car.
  • The answer travels back and appears on your screen.

The model never runs on your device. Your text always leaves it.

You've probably used a cloud model

ChatGPT, Claude and Gemini are cloud AI services. The model does not run on your phone or laptop. It runs on computers owned by a company, housed in a datacenter, which is a building holding thousands of machines with the power and cooling to run them continuously.

Those machines are not ordinary computers. A single server can hold eight specialised processors wired together, so that one model far too large for any home machine can be spread across all of them. That is why cloud services can offer the largest and most capable models available.

The arrangement has real costs. You need a working internet connection, someone is billing for every question and answer, and whatever you type leaves your control and is handled on someone else’s hardware.

Defining local AI

Local AI is the same idea, but instead of being processed in a datacenter, it runs on your own hardware. You download the file of weights onto a computer you own, and software on that machine loads it into memory and runs it. No data leaves your computer, and you can even use it totally offline.

It is possible at all because some organisations publish their weight files for anyone to download, which is called releasing a model with open weights. Llama, Qwen and Mistral are released this way. The models behind ChatGPT and Claude are not, which is why you cannot run those at home at any price.

The honest trade is capability for control. Models small enough to run on your own hardware are generally less capable than the largest cloud models. In exchange, nothing you type leaves the room, nobody bills you per question, and the only running cost is the electricity the machine draws. In Shenzhen that is about ¥0.65 per kWh.

What you need to run a model yourself

  • A published weight file, downloaded once and kept on your drive.
  • Enough memory to hold it. This is the real limit, and it is usually the memory on a graphics card.
  • Software that loads the file and does the math.
  • Electricity.

The Hardware Lab lets you test any combination of these against real hardware.

Your exploration so far

Visit all four tabs to earn the Explorer badge. The dots mark what you haven’t seen yet.

How It Works

Getting from the sentence you type to the answer you read takes five steps. This page walks through them in order, and the first three are working right now, so you can type into them and watch what happens. Every number they show is calculated for the hardware currently selected in the Hardware Lab, so if you change the hardware there, these change too.

Step 1. Splitting your text into tokens

A model can't read letters or words. It reads tokens, which are fragments of text from a fixed list the model was built with. Common words are a single token, and rarer words get split into several pieces. Every token has an identity number, and those numbers are what actually goes into the model.

Type in the box and watch your sentence get split up. Each chip is one token, and the small number on it is that token's real id.

This runs against a real slice of the Qwen3 vocabulary, 30,747 of its 248,320 tokens, so the ids you see are genuine. For example " world" is one token, id 1814. Two limits worth stating: it's only a slice, so a word missing from it gets split into smaller pieces than the real model would use, and it matches the longest fragment first rather than following the model's exact merge order.

Step 2. Loading the model into memory

Before it can answer anything, the whole file of weights has to be copied from your drive into memory, and it has to stay there for as long as you're using it. This is the step that decides whether you can run a model at all. If it doesn't fit, nothing else matters.

The bar shows how much memory the current model needs against how much the selected hardware has. The first segment is the graphics card, and if the model is too large to fit there, the overflow spills into ordinary system memory.

Step 3. Reading your question, then writing the answer

Running a model happens at two very different speeds, and this is the most useful thing on the page to understand. First it reads everything you sent. Because that text already exists, the model can work through all of it at once, which is fast. That stage is called prefill, and it's why there's a pause before the first word shows up.

Then it writes. It can only produce one token at a time, because each one depends on the one before it, so the answer arrives as a steady trickle rather than all at once. That stage is called decode, and its speed is what you actually watch on screen.

Compare the two numbers below. The gap between them is the point: reading is cheap, and writing is what costs you time.

Reading your question

Writing the answer

Step 4. Remembering the conversation

As the model reads, it works out two things about every token it has seen: a key, which is how that token gets found again later, and a value, which is what that token contributes once it's found. Redoing that for the whole conversation every time it writes a new word would be enormously wasteful, so it keeps them in memory instead. That store is the KV cache, named for keys and values.

It matters because it grows with every token in the conversation, and it sits in the same memory as the model. A long conversation can end up needing more space than the model itself.

Step 5. Choosing the next word

The model never picks a word. What it produces is a probability for every token in its vocabulary, tens of thousands of numbers saying how likely each one is to come next. Turning that list into a single choice is called sampling.

Always taking the most likely token makes text that's flat and repetitive, so a controlled amount of randomness gets added, tuned by settings called temperature and top-p. That's why asking the same question twice can give you two different answers.

Below is what the model might produce after the words "The cat sat on the". These ten candidates are an illustration, not a real model's output, because this site models memory and speed rather than running a model in your browser. The two controls, however, do exactly what they do in real software, so the way the bars reshape is accurate.

Low keeps it predictable. High makes it adventurous.

Trims the least likely words off the bottom of the list.

Why memory speed limits how fast a model writes

To produce one token, the model has to read almost all of its weights out of memory. Not some of them, and not a summary: nearly the whole file, for every single token it writes. A four billion number model reading its weights 30 times a second is moving an enormous amount of data.

So the question that decides writing speed is not how clever the processor is. It is how fast the hardware can pull data out of memory. That rate is called memory bandwidth, and it is measured in gigabytes per second.

RTX 3090 graphics card936 GB/s
DDR5-6000 system memory96 GB/s

A graphics card reads its own memory almost ten times faster than a computer reads its main memory. That single gap explains most of what the Hardware Lab shows you. It is why a model that fits on the graphics card feels quick, and why a model too large to fit, so that part of it must sit in system memory, slows down so sharply. That situation is called offloading, and every token has to wait for the slow part.

Bandwidth figures are manufacturer specifications (blueprint §3.1).

Hardware Lab

This is where you test combinations for yourself. Choose a machine, a model size and how tightly the model is compressed, and the panel on the right recalculates immediately. Nothing here is a guess or a stored example. The same formulas run behind every number quoted elsewhere on this site, and the section at the bottom of the results shows you what they are.

A good first experiment: leave everything alone and drag the model size slider up until the memory bar turns red. That point is the honest limit of this hardware.

The machine

An all-in-one machine shares a single pool of memory between its processor and graphics. A rig is a desktop computer with a separate graphics card in it.

GPU model
GPU count
System RAM
Processor

This only changes the result when part of the model doesn't fit on the graphics card, because the processor is what handles the leftover part.

Model size

Measured in billions of parameters, which are the individual numbers inside the model. Bigger models generally answer better, and they need more memory and run more slowly.

4B8B12B14B16B27B32B70B80B405B

Anchored to Gemma 4 E4B · 42 layers, GQA 2 KV heads, only 7 caching the whole context [M7]

How tightly the model is compressed

Each number in a model can be stored using more bits or fewer. Storing fewer makes the file smaller and faster to read, at some cost in accuracy. This is called quantization, and it's the main reason large models can run on ordinary hardware at all.

Q4_K_M

The most widely used setting for running models at home. Each weight is stored in roughly 4 to 5 bits instead of the original 16, which makes the file about a quarter of the size. The numbers are stored in small groups that each carry their own scaling factor, which keeps the loss of accuracy low enough that most people never notice it. The name is a format convention rather than anything meaningful: Q4 is the bit count, and K_M is the particular packing method.

What you're asking it to do

How much text the model has to hold in mind, how long your question is, and how many people are asking at once. All three change the answer.

Context window

Prompt length (prefill work)

Concurrent requests

Ready - 256-token generation task (blueprint §6).

Model load

Token stream

tok/s

0 / 256 tokens

Glossary

Every technical word used on this site, defined in plain language. You can also hover any underlined word anywhere on the site to read a short version without leaving the page.

Local vs Cloud

One question, five real answers. Three came from cloud models and two ran on a local machine. Press the button and each one waits, then writes its actual reply token by token at the speed it really wrote it. Speed isn't everything! These responses are quite similar, but worth a closer look to see linguistic and substantive training and choices in action.

The race

Every model was given the same prompt:

Qwen3.8-27B and Gemma 4 E4B are calculated based on the hardware cobfiguration in the lab tab. The output is real, but the speed you are watching is worked out live by the same engine as the rest of this site. The three cloud models keep the times I recorded for them, including Claude's "lengthy" thinking at the start.

Notice that finishing first and answering best are not the same thing. Read the five answers above once the race is over: the longest one here also finished last, and whether that was worth the wait is a judgement this site cannot make for you.

How these were measured

I timed these responses on one machine (3 web, 2 local) on 2026-09-05. They aren't scientific benchmarks, and the cloud answers were not all captured the same way. Two of them were free-tier (Deepseek and ChatGPT), while Claude's response was timed on a paid account. Paying for an account doesn't speed it up, it would seem.

    The full comparison

    Your column changes with whatever hardware and model you have selected in the Hardware Lab. Every cloud figure carries a marker like [C3] pointing at the source it came from, listed under the table.

    Reading the table

      Sources

        What it costs you

        The usage estimator, which turns your messages per day into a monthly cost for each option at Shenzhen rates, is still to be built.