Large Language Model Basics
Level 1 · What an LLM is
What a large language model is, and what its billions of numbers do. Why a bigger model needs far more memory to run.
Course contentsLesson 1 of 15
Level 1 · What an LLM is
Level 2 · Inside the model
Level 3 · How a model is trained
Level 4 · Choosing and running a model
Level 5 · Where LLMs go wrong
After this lesson you can
- Say what an LLM does when it writes
- Explain what a parameter is
- Work out the memory a model needs
10 mincovers 4 glossary entries
What a large language model is
A large language model, or LLM, is a program that writes text by guessing what comes next. It learned that skill from a huge pile of text. Inside, it is a long list of numbers. GPT-3, from 2020, held 175 billion of them. The big models today are built the same way.
Those numbers are called parameters, or weights. Each one works like a tiny dial. Before learning starts, the dials are set at random, and the model writes nonsense. Learning nudges every dial, over and over, until the guesses get good. Nobody sets a dial by hand. The text sets them.
The parameter count says how big a model is. GPT-2 had 1.5 billion in 2019. GPT-3 had 175 billion a year later. More dials can hold more patterns, so a bigger model is often more capable. It also needs more memory and more power to run.
Each number takes up space. Stored at the usual size, one parameter takes 2 bytes. So a model with 7 billion parameters needs about 14 gigabytes of memory just to load. That is why the biggest models run on large servers, while small ones can run on a laptop.
A model that learned from a broad mix of text is called a foundation model. It is built once, at great cost. Then many products are built on top of it: a chat app, a coding helper, a search tool, a translator. Each one reuses the same model rather than making a new one.
The model does not look facts up. There is no list of answers stored inside it. What it has is closer to a strong sense of how text usually goes, the way a keen reader can guess the end of a sentence before they reach it.
So a smooth answer is not proof of a true one. The model writes what sounds likely, and most of the time that is also right. When it is wrong, it sounds just as sure. Knowing how it works is how you learn when to check it.
Worked example
Emma picks a model for her laptop
Emma wants to run a model on her own laptop. It has 16 gigabytes of memory. A model with 7 billion parameters needs about 14 of them.
That barely fits, and it leaves nothing for her other apps. A model with 3 billion parameters needs about 6, so she picks that one. It runs with room to spare.
The words for this lesson4
Check yourself
What is inside a large language model?
Finished this lesson?
Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.