This is a free preview. Enrol on the course to save your progress and open every lesson.

Lesson 1 of 24 · 20 min

What a large language model is

A very well-read guesser

A large language model (LLM) is a computer program that has learned patterns in language by reading an enormous amount of text — websites, books, articles, code. Its whole job is to look at some text and predict what comes next, one small piece at a time.

We gave llama3.2 the start of a sentence, with no question or instructions:

The three most popular coffees in Australia are

It carried on:

The three most popular coffees in Australia areflat whites, cappuccinos, and lattes. These three coffee drinks are often considered to be
the most popular in Australia due to their widespread availability and popularity among
coffee lovers.

Flat whites

Nobody programmed in facts about coffee. The model has seen so much writing about coffee that continuing the sentence sensibly is what its training taught it to do. Answering a question, writing an email or explaining code is the same trick: predicting the most likely next words, again and again.

How a model is made

  1. Pre-training. The model reads trillions of words and practises predicting the next one, billions of times. Every guess slightly adjusts its parameters — billions of numbers that store what it has learned. This takes huge computers weeks or months, and costs millions of dollars
  2. Fine-tuning. It's then trained on examples of helpful conversations, so it answers questions and follows instructions instead of just carrying on the text. This makes a chat model (also called an instruct model)
  3. Safety training. People rate its answers, and it learns to be helpful and to refuse harmful requests

The "large" means the number of parameters. The model you'll use, llama3.2, has about 3 billion. The biggest models behind ChatGPT, Claude and Gemini are much bigger, and run in huge data centres.

Model, app and chatbot

WordMeansExamples
ModelThe trained LLM itself: a big file of parametersGPT, Claude, Gemini, Llama, Gemma, Qwen
Chatbot appA program that sends your messages to a model and shows its repliesChatGPT, Claude.ai, Copilot — and the one you'll build
Open-weight modelA model whose parameter file anyone can download and runLlama (Meta), Gemma (Google), Qwen (Alibaba), Mistral
APIA way for your code to send text to a model and get a replyOllama's API on your computer; cloud APIs from AI companies

Why run a model yourself?

Cloud models are the most capable, but using them from code needs an account and usually costs money for each message. In this course you'll use Ollama, a free app that runs open-weight models on your own computer:

  • Free — no account, no API key, no bill, however much you use it
  • Private — nothing you type leaves your computer
  • The same skills — messages, system prompts, streaming and RAG work the same way with cloud models, so everything you learn carries over

The trade-off: a small model on a laptop is slower and less clever than the giant ones. That's fine for learning — and for lots of focused jobs, like answering questions about one café.

Try it

  1. Think of three tasks at a job you'd like where an LLM could help — and one where it would be a bad idea.
  2. Download the course files from this lesson. You'll use them from Module 3.

Downloads

1 file to download once you enrol.