Book a Call → mycocoon.life
Micro LLM · 100% Free · Runs entirely in your browser

Watch a language model
get built from scratch.

Give it some text. This page trains a real language model on it — live, in your browser, with no server and no API. Then it opens the machine up and shows you every moving part: how it learns by counting, how it guesses the next word, how probability and proximity work together to produce a sentence. It shares its objective with ChatGPT — predict the next word — and a good deal of its maths. It does not share the architecture, and screen 6 is honest about exactly where the two part ways.

1 Give it something to read
2 Watch it learn
3 Watch it guess
4 See how it decides
5 See the real scale
6 See where it stops
cocoon.
Room

Add your words

Whatever you write here becomes part of the training data for a language model being built on the screen. Write a few sentences.

Your name and text go to the presenter's screen. Nothing else is collected, and it's deleted within a day.

01
Text goes in
02
Chopped into tokens
03
Patterns counted
04
Odds for the next word
05
One word picked
06
Repeat, forever
Step 1 · The data

Give it something to read

Whatever ends up here is the training data — the only thing this model will ever know. Same starting point as GPT, just a few thousand words instead of a few trillion. Everything stays in this browser; nothing is uploaded anywhere.

Pick something to feed it

Use this opening drops in just the beginning, so you can add a continuation underneath. Load a full demo adds the opening plus five continuations — enough text for the model to get interesting straight away.

The first three are real books, long out of copyright — feed the model something the room already knows and its output is far easier to judge. The rest are original openings written for this tool.

The corpus

0 contributions
0
Words
0
Unique words
0 B
On disk
Nothing yet. Choose a source above.
Nobody programmed a single rule about English into this thing. It has never seen a dictionary or a grammar book. Everything it's about to do, it works out by counting patterns in the text you just gave it.
Step 2 · How it learns

Training is just counting what follows what

"Training" sounds mysterious. Here it is literally: chop the text into tokens, then tally which token follows which. That tally is the model. There is no other secret.

a. Tokenize — chop the text into pieces

A model never sees letters or words the way you do — it sees tokens. Ours are words and punctuation marks. Real models use roughly 4-character chunks, which is why 750 words ≈ 1,000 tokens and why you get billed per token.

b. Count — build the tables

0
Tokens
0
2-word rules
0
3-word rules

Those "rules" are what this model knows. It is a lookup table: every pattern it stores, it saw. A frontier model holds over a trillion parameters, but they are not counts of anything — they are the settings of a function it learned by trial and error. More on that difference in screen 6.

c. The whole model, as one pictureadvanced

Every square is a pair of words: the row is the first, the column is what followed. The greener the square, the more often that pair appeared. This grid is the model — there is nothing else inside it. Notice how much of it is empty: those are the combinations your text never used, and about which it knows precisely nothing.

never seenseen often

This is the same kind of picture people show of a real model's parameters — except a frontier model has over a trillion of them, learned rather than counted, and no one can read any single one of them like this.

d. Look inside — what did it actually learn?

Pick any word in the text. This is the model's entire knowledge of that word: a list of what tended to come next, and how often.

AFTER THE WORD …WHAT CAME NEXT?
Step 3 · How it guesses

The guessing machine

An LLM does exactly one thing: look at the words so far and guess the next one. Then it adds its own guess to the words so far, and guesses again. That's it — that's the whole trick, all the way up to the biggest models on earth.

The story so far

Type a starting word or two, then pick one of the predictions.
Cold & safe0.80Wild

What comes next?

It isn't remembering the story — it's rolling weighted dice, one word at a time. Drag temperature to 0.05 and it becomes a boring parrot that always picks the safest word. Drag it to 2.0 and it goes off the rails. Every chatbot you have ever used has this exact dial.
Step 4 · How it decides

Probability and proximity are the same machine

A model doesn't store words as letters — it stores each one as a position in space. Words used in similar company drift together, and nobody labels them: the geometry falls out of the counting. Now watch both halves at once. As it writes, the words it is choosing between light up on the map — so you can see it isn't picking from the whole language, it's picking from a neighbourhood.

Click any word to explore it. Bigger word = used more often. In 3D you can drag to spin it.

Each word sits where the company it keeps puts it — a 2-D squash of a much higher-dimensional space. Real models give every word thousands of dimensions instead of two.

Watch it choose

Generate a word and the candidates glow green on the map, sized by how likely each one is.

Press One word and watch where its options live.

Nearest & furthest

WORD

Compare two words

VS
unrelated interchangeable
Closeness here means "used in similar company" — not "means the same thing". The model has no idea what a lighthouse is. It only knows which words tend to stand near it. That single fact explains most of what people find strange about AI: why it can write fluently about something it doesn't understand, and why it inherits every pattern sitting in its training text.
Step 5 · The scale

From this page to a data centre

You just built a working language model. The only real difference between this and the thing on your phone is how much — more text, more patterns, more maths. Here's the gap, measured against your own text.

The unit ladder

The numbers people never quite believe.

~20 million words1 GBabout 250 novels
1,000 GB1 TB~20 billion words
1,000 TB1 PB~20 trillion words
All of English Wikipedia~25 GBa rounding error to a frontier model
A frontier training set~50–100 TBmost of the readable public internet

What more data buys

  • Your model sees 2–3 words of context. Frontier models hold hundreds of thousands of tokens in view — a whole book at once.
  • Yours has a few thousand rules. Theirs have trillions of parameters: enough to encode grammar, facts, style, reasoning and code.
  • Yours cost nothing and trained instantly. A frontier run costs tens of millions of dollars and weeks on thousands of GPUs.

What does not change

  • It is still only predicting the next token.
  • It still has no idea what any word means — only which words keep the same company.
  • It is still bounded by its training data. Garbage in, confident garbage out.
  • It is still rolling dice — which is exactly why it can make things up with a straight face.
You just did, with paper and a browser, what costs a data centre a hundred million dollars. They didn't invent something you can't understand — they just fed it the internet.
Step 6 · Where the resemblance ends

What this is, and what it isn't

Everything so far was real. This is a language model — roughly the kind that was state of the art around 2010, and the direct ancestor of what runs today. But it is not a small ChatGPT, and the difference is the most interesting thing on this page.

What it genuinely shares

  • The objective. Predict the next token. That really is all a modern LLM does, too.
  • Probability, not answers. Every step produces a distribution over the whole vocabulary.
  • Temperature and sampling. The maths on that slider is identical to the one inside ChatGPT.
  • Meaning from company. The word map is a real ancestor of modern embeddings, not a metaphor for them.
  • Total dependence on its data. It cannot know anything its text didn't contain.

What it does not have

  • Learning. This counts. A real model is trained — it adjusts billions of parameters by trial and error until it gets better.
  • Attention. The 2017 idea that made modern AI work. This sees two words; a transformer weighs thousands at once.
  • Generalisation. The big one — see below.
  • Depth. One lookup versus dozens of stacked layers building meaning up in stages.
  • Instruction tuning. Why ChatGPT answers your question instead of just continuing it.

Proof: did it actually invent anything?

Don't take this on trust — measure it. Below is the sentence generated on screens 3 and 4, with every run of three words checked against the source text. Anything it truly made up would be a run that appears nowhere in the original.

Now give a real model the same opening

The tiny model above can only replay what it read. Here the same opening words go to a real instruction-tuned model running on Cloudflare's network — and both answers get put through the identical verbatim check. Watch what happens to the copied-percentage.

What had to change

This modelA modern LLM
Learns byCounting what it sawAdjusting parameters by trial and error
StoresA lookup tableA compressed function
ContextThe last 2 wordsThousands of words, weighed by attention
Can produceOnly what it has seenSentences that exist nowhere in its data
Word positionsCounted afterwardsLearned, and used to think with
TrainingOne pass, instant, freeMonths, thousands of GPUs, millions of dollars
The question worth leaving people with: this model can only ever recombine what it read. ChatGPT writes sentences that have never existed. What had to change for that to be possible? The answer is that it stopped counting and started learning — and in 2017 it gained the ability to weigh every word it has seen so far, instead of just the last two. Everything else on this page it already had.
Presenter notes · not part of the walkthrough

Driving this live

Everything above is written to be shown on a screen. This tab is just for you — the controls, the order, and the moments that tend to land.

ControlWhat it does
← / →Move between screens without touching the mouse.
SpaceGenerate one more word on the guessing machine.
[ and ]Walk back and forward through the words it generated, one decision at a time.
EscStop generating, or drop out of the walk-back.
PToggle present mode — larger type for projection.

The order that works

ScreenWhat to doThe point it makes
1 · DataLoad an opening, or paste something the room suggests.A model is made of text somebody wrote.
2 · LearnShow the tokens, then the counts, then open one word's table.Training is counting. Nothing was programmed.
3 · GuessAsk the room to call the next word before you reveal the bars. Then generate, then push temperature to both extremes. Finally walk back through the sentence word by word and ask why it chose each one.It is a guessing machine, and the dial is its personality. The walk-back shows there was no plan — just one dice roll after another.
4 · DecideGenerate with the map open. The candidates light up where they live.Probability and proximity are the same machine.
5 · ScaleRead the multiplier off the screen.Part of the gap is sheer scale.
6 · LimitsRun the verbatim check on the sentence you just generated, then close on "what had to change?"The rest of the gap is architecture — it stopped counting and started learning.

Questions that always come up

  • "Where did that word come from?" — trace it back in Screen 2's table.
  • "What if it only reads one person's writing?" — clear the corpus, add one piece, watch it parrot.
  • "Why does it say things that aren't true?" — push temperature to 2.0, then point at the red no memory badge.
  • "Is it thinking?" — every moving part is now on screen. Let them answer it.

Practical notes

  • Everything runs in the browser. Nothing typed here is uploaded, and it works with no connection at all after first load.
  • The corpus lives in this browser only. Hit Export if you want to keep or move it.
  • Aim for 300+ words. Below that the model mostly recites — which is itself worth showing.
  • Present mode bumps type size for projection. Worth switching on before you share your screen.

Want your people to actually understand this?

Cocoon's AI for Educators programme is built around exactly this approach: teaching AI by taking it apart, not by demoing chatbots. We bring the activities, the framing and the follow-up.

Copied ✓