What is a large language model?
You type a question, and an answer appears. So what's going on in there? Today we're looking at the model itself.
Chapters
- 0:00Introduction
- 0:06Where this fits: The AI stack
- 0:09First: Where from?
- 0:21Inside: A mountain of numbers
- 0:32Tokens: Words in pieces
- 0:41The transformer: Paying attention
- 0:50One at a time: Guess the next word
- 0:57Good to know: Smooth isn't true
- 1:04Wrap up
Read the transcript
Introduction
You type a question, and an answer appears. So what's going on in there?
Where this fits: The AI stack
Today we're looking at the model itself.
First: Where from?
Where do models come from? Companies and research groups train them. Some publish the weights, often on a website called Hugging Face. Others only let you use their models online.
Inside: A mountain of numbers
At heart, it's a huge pile of numbers, called weights. Training nudges them, again and again, using masses of text. When you chat with it, they stay put.
Tokens: Words in pieces
It doesn't read like you do. Text is chopped into tokens. Common words are often one piece, and rare ones may be split up.
The transformer: Paying attention
Most are built on a design called the transformer. Its trick is attention: working out which earlier words matter right now.
One at a time: Guess the next word
Then it predicts the next token, adds it on, and goes again. One piece at a time, until the answer's done.
Good to know: Smooth isn't true
Here's the catch. It can sound completely sure, and still be wrong. So check anything that matters.
Wrap up
Numbers, tokens, and one prediction after another.
Sources
- arxiv.org/abs/1706.03762
- huggingface.co/docs/transformers/tokenizer_summary
- huggingface.co/docs/transformers/en/kv_cache