cCarebun Reading‹ All reading
Carebun Interactive/How an LLM works LabCheat sheet Study view

Part V · Practice

Chapter 16

Questions readers ask

Thirty-two questions that come up when people first understand how a language model works, answered briefly, each with the chapter where the long answer is.

14 min read

On this page
  1. About the machine
  2. About tokens and numbers
  3. About answers
  4. About using a model
  5. About size and machines
  6. Try it yourself
  7. Carry this
  8. Check yourself

In this chapter, we will learn by question and answer. These are the questions people ask when they have understood the machine for the first time. Each answer is short and names the chapter with the long version. Try to answer each question yourself before you open it.

About the machine

In one sentence, what is a large language model?

A very large table of numbers, the weights, together with a fixed calculation that takes a text and returns a chance for every possible next piece of text. Chapter 1.

Is it a database of facts?

No. There are no rows, no entries and nothing to look up. What the model knows is spread over its weights as patterns. That is why it can answer questions nobody wrote down, and also why it can be wrong without noticing. Chapter 11.

Is it a program that somebody wrote?

The calculation is a program, and a short one. The weights are not written by anyone. They were found by training. The behaviour of the model is in the weights, so in the sense that matters, nobody wrote it. Chapter 8.

What is the difference between a weight, a parameter and a feature?

A weight is one learned number of a matrix. "Parameter" is the common name for all learned numbers, weights and biases. A feature is one of the inputs X and changes with every text. A model has a fixed number of parameters. It has no fixed features. Chapter 3.

Is the equation Y = W · X the whole model?

It is the brick the model is built from. Between the multiplications there is a bend, the activation function, without which many layers would be worth one. And attention decides which tokens are mixed. Both are made of the same multiplications and additions. Chapter 3 and Chapter 6.

How does a model differ from the brain?

In at least four ways. Its weights are frozen after training, and the brain changes all the time. A weight is one number, and a connection in the brain is a living structure. The model learns from what people have recorded, mostly text, and not from living in the world. And the machines that run it need far more power than the brain, which is estimated to use about 20 watts. What the two share is the idea that knowledge is stored as the strength of connections. Chapter 2 and Chapter 13.

How many weights does the largest model have, and how many connections has the brain?

OpenAI has not published the size of GPT-6 Astra. The figure most often reported is 10 trillion, and another report says 4.8 trillion. Neither is confirmed. Estimates for the connections of a human brain run from 100 to 1,000 trillion. We use 200 trillion as a round number. A weight is not a connection, so the two numbers give a sense of scale and no more. Chapter 13.

What do GPT and LLM stand for?

LLM is large language model. GPT is generative pre-trained transformer: generative because it produces text, pre-trained because it learned from a large amount of text before anyone used it, transformer for the design of its layers. Chapters 1, 8 and 6.

About tokens and numbers

Why does the model work on tokens and not on words?

Because a list of all words can never be complete, and a list of pieces can build any text. Common words are one token, and rare ones are put together from several. Chapter 4.

How many tokens is my text?

For English, divide the number of words by 0.75: 600 words are about 800 tokens. We measured 0.87 words per token on plain text, so the rule is on the careful side. For code, numbers and other languages, count with a tokenizer. Chapter 4.

What is the difference between a token id and an embedding?

The id is a position in the list, a house number. The embedding is the row of numbers the id points to in the embedding table, a place on the map. The model calculates with the embedding and never with the id. Chapter 5.

Is the embedding in a language model the same as in a vector database?

The idea is the same: a list of numbers as a place on a map of meaning. The job differs. Inside a language model every token has a row. A vector database stores one vector for a whole sentence or page, made by a separate embedding model, so that texts can be found by meaning. Chapter 5, and Thinking in Vectors.

What is a logit?

The raw score the model gives to one token, before softmax turns the scores into chances. Only the gaps between logits matter. Chapter 7.

About answers

Why do I get a different answer when I ask again?

Because the next token is drawn by chance. After the first different token the two texts go separate ways. With temperature 0 the highest token is always taken, and the answer is nearly always the same. Chapter 7.

What temperature should I use?

0 where there is one right answer, 0.3 to 0.7 for answers and summaries, 0.8 to 1.2 for ideas and stories. These ranges are common practice and not a law. In our test a small model wrote broken text at 1.6. Chapter 7.

Why does it invent things with such confidence?

Because a true answer and an invented one are made by the same steps, and no step checks facts. The confident tone is the tone of the text it learned from. Chapter 11.

Why is it bad at arithmetic, when computers are good at it?

The computer is good at it. The model does not use the computer in that way. It guesses the digits of the result as tokens. Give it a calculator as a tool, and the answer is exact. Chapter 12.

Why does it not know what happened last week?

Its weights were frozen at the knowledge cutoff. News reaches it only through the prompt, for example when the application searches the web first. Chapter 11.

Does it remember what I told it yesterday?

The model does not. It keeps nothing between requests. If an assistant remembers you, the application around the model stored something and put it into today's prompt. Chapter 9, and the memory book.

Does it learn from my conversation?

Not while you talk to it. A provider may use conversations later as training text for a future model, if its terms allow that. Chapter 8.

About using a model

What do I need to call a model from a program?

An API key, the address of the service, and a request in JSON with the model, the messages and the settings. With the library it is about a dozen lines of Python. Chapter 9.

What is a system prompt?

The first message of a request, written by the developer and not by the user. It holds the standing instructions. Its role is called system, and on OpenAI's newer models developer. Chapter 9.

Why did my answer stop in the middle of a sentence?

It ran into max_tokens. The field finish_reason of the response says length. Chapter 9.

Why is a long conversation so expensive?

Every request resends the whole conversation, and all of it is paid for again. In our example, with a system prompt of 500 tokens and 250 tokens for each turn, 20 turns cost 62,500 tokens and 40 turns cost 225,000. Chapter 10.

Why do output tokens cost more than input tokens?

The tokens of the prompt can be read together in one pass. Every token of the answer needs a trip of its own. On OpenAI's published price list of September 2026 a token written costs five times a token read: $0.50 against $0.10 per million for gpt-6-luna. Chapter 10.

What is RAG?

Retrieval-augmented generation: search your documents first, put the passages that fit into the prompt, and let the model answer from them. Chapter 12.

What is an agent?

A program that lets the model ask for tools again and again until a task is done. The model writes the requests, and the program runs them. Chapter 12.

Should I fine-tune a model for my task?

Rarely as a first step. Try a better prompt, examples, retrieval and tools first. They are faster, cheaper and easier to change. Chapter 12.

About size and machines

Can I run a model on my own computer?

Yes, a small one. The file must fit into memory with about 20% to spare, by our rule of thumb. At 4 bits per weight a billion weights are 0.5 GB, so a laptop with 16 GB has room for about 26.7 billion at most, and in practice for fewer, because other programs need memory too. Chapter 13.

What does "4-bit" or "quantized" mean?

Each weight is stored with fewer bits than in training, so the file is smaller and the weights a little less exact. Our "4-bit" file weighed 4.5 bits per weight. Chapter 13.

Why do models need graphics cards?

A small model runs without one, as GPT-2 did on our laptop. For a large one the ordinary processor is too slow. The work is a very large number of small multiplications that do not depend on each other, and a graphics card does many of them at the same moment. Chapter 13.

How does one server answer thousands of people at once?

By packing the requests of many users together so that one graphics card works on all of them in the same pass, and by keeping and reusing work already done. This is the subject of a book that is planned for this shelf and not yet written. Chapter 17 gives the plan.

Try it yourself

Pick the five questions of this chapter that you found hardest. Write your own answer to each, in two sentences, without looking. Then compare. An answer you can write down in your own words is one you own.

Carry this

  • The model is weights and one calculation. It is not a database and nobody wrote its behaviour.
  • It works on tokens, calculates with embeddings and ends with a chance for every token.
  • It keeps nothing, learns nothing while in use and knows nothing after its cutoff.
  • What it lacks is put into the prompt: documents, examples, results of tools, memories.

Check yourself

1. A friend says: "The assistant looked up my question in its database and found the wrong entry." Put it right in two sentences.

Answer

There is no database and no entry. The model produced the most likely continuation of the question, and for this question the likely continuation was not the true one.

2. Which two things must be in every request to a chat model, and which third thing should a real application add?

Answer

The name of the model and the list of messages must be there. A real application adds a limit on the length of the answer. Temperature and the other settings have default values.