Learn / Lessons

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

  1. 0:00Introduction
  2. 0:06Where this fits: The AI stack
  3. 0:09First: Where from?
  4. 0:21Inside: A mountain of numbers
  5. 0:32Tokens: Words in pieces
  6. 0:41The transformer: Paying attention
  7. 0:50One at a time: Guess the next word
  8. 0:57Good to know: Smooth isn't true
  9. 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

More lessons