AI Video Academy · How LLMs Work · beginner

How Does an LLM Process a Prompt?

One request, from your text to the generated answer.

1:10 · captions in English · instrumental music, no narration

Transcript

What happens inside a language model after you press Enter?

Messages are tokenized, turned into vectors, processed by many layers, and scored for every possible next token.

The prompt becomes token IDs.

In every layer, attention lets each token gather information from the tokens before it.

The model scores every token in its vocabulary. Softmax turns the scores into probabilities.

Generation repeats: pick a token, append it, run again, until a stop token.

A language model writes one token at a time.

Experiment with this concept in PromptFlowEngine.