How Large Language Models Work
Type any sentence and watch it get broken into tokens. Then simulate how an LLM predicts the next word in a sequence.
Token Visualiser
Type or paste any text below. The visualiser will approximate how an LLM tokeniser breaks it into tokens — the fundamental units the model processes.
Click "Tokenise" to see the breakdown
Why this matters: Every token costs money and uses up your context window. A 1,000-word document might be 1,300 tokens. Understanding tokenisation helps you write more efficient prompts and estimate costs.
Next-Token Predictor
See how an LLM decides what word comes next. Choose a sentence starter and watch the probability distribution — then pick the next token yourself to build a sentence.
Key insight: A real LLM has hundreds of billions of parameters and considers ~100,000 possible tokens at each step. This simplified version shows the principle: pick the most likely next word, then repeat. That's the entire mechanism.