Tokens and Next-Token Prediction

A language model is a prediction engine

Analogy: Phone autocomplete guesses the next word from what you already typed. A large language model, or LLM, repeats that basic act many times with a much richer statistical model.

An LLM reads text as tokens. A token is a small piece of text: perhaps a whole word, punctuation, or part of a long word. The model gives each possible next token a probability, chooses one, adds it to the text, and starts again. It is predicting, not checking a fact database, unless your application supplies a trustworthy source.

A neural network is a computer system made from many connected calculations. A parameter is one number that the network learned during training. Qwen2.5:0.5b has about 0.5 billion parameters; SmolLM2-135M has about 135 million. More parameters can improve what a model can do, but they also need more memory and central processing unit (CPU) time.

Scenario: You ask a model when a server was restarted. It writes a confident time, but it cannot see the server log. The answer sounds good and is still invented.
Warning: A believable but unsupported answer is called a hallucination. Real systems check important output and connect factual answers to trusted data.