Large language models (LLMs) are the systems behind chatbots like ChatGPT, Claude and Gemini. If you want to understand how they work, build apps on top of them, or train a small one yourself, you do not need to pay for a course. The courses below come from universities, companies and independent teachers, and each one is free to access.
This list has 9 free LLM courses, checked on each course's own page as of October 2026. They are grouped by goal, from a short first lesson to a graduate-level Stanford class. For each pick you get what it covers, what it asks you to know first, and any cost that comes with it, such as API fees or GPU time.
If you are brand new to AI, start with our 12-week plan to learn AI from scratch or our wider list of free AI courses. This page is for people who want to focus on language models.

How to use this list
The picks fall into four steps. Each step is named, and you can stop at any of them.
- Understand LLMs: short lessons that explain what a language model is, with little or no code.
- Use and fine-tune models: hands-on courses that load real models, adjust them on your own data and share them.
- Build LLM apps: courses about prompts, retrieval (RAG), tools and agents, using a model through an API.
- Build a model from scratch: video series and university classes where you write the tokenizer, the model and the training loop yourself.
A fifth group, Stay current, is a Stanford seminar series that you can watch at any point.
Most picks below ask for Python. If your math is rusty, our guide to math for machine learning lists free courses for the linear algebra, calculus and probability that the from-scratch courses expect.
Understand LLMs
1. Google Machine Learning Crash Course: Intro to Large Language Models
Google's Machine Learning Crash Course has a module called Intro to Large Language Models. The course page lists it at 45 minutes.
Its stated learning objectives include to "Define a few different types of language models and their components." Others are to "Identify how large language models take advantage of self-attention." and to "Explain how fine-tuning and distillation can improve a model's predictions and efficiency."
- Format: free online text lessons inside Google's crash course.
- Before you start: the module page says it assumes you know six earlier modules of the same course: Introduction to Machine Learning, Linear regression, Working with categorical data, Datasets, generalization, and overfitting, Neural networks, and Embeddings.
- Good for: a short first pass before a longer course.
If you only want the vocabulary, our explainers What Is a Context Window? and What Is RAG? cover two common terms in plain English.
Use and fine-tune models
2. Hugging Face LLM Course
The Hugging Face LLM Course teaches LLMs and natural language processing (NLP) with the Hugging Face libraries: Transformers, Datasets, Tokenizers and Accelerate, plus the Hugging Face Hub. The course page says: "It's completely free and without ads."
The course page groups the chapters like this:
- Chapters 1 to 4: how Transformer models work, how to use a model from the Hub, fine-tune it on a dataset and share the result.
- Chapters 5 to 8: the Datasets and Tokenizers libraries, then classic NLP tasks and LLM techniques.
- Chapter 9: building and sharing demos of your models.
- Chapters 10 to 12: what the page calls "advanced LLM topics like fine-tuning, curating high-quality datasets, and building reasoning models."
- Before you start: the page says the course "Requires a good knowledge of Python" and is better taken after an introductory deep learning course, such as fast.ai's Practical Deep Learning for Coders. It does not expect prior PyTorch or TensorFlow knowledge.
- Extras: the chapter list includes a certification exam page, but the course FAQ says: "Currently we do not have any certification for this course."
If you want a model to experiment on, our explainer What Is Hugging Face? covers how the Hub works.
Build LLM apps
3. Microsoft Generative AI for Beginners
Generative AI for Beginners is a free course on GitHub from Microsoft Cloud Advocates. The repository describes it as "21 Lessons teaching everything you need to know to start building Generative AI applications". It is now labeled Version 3.
Each lesson is either a "Learn" lesson that explains a concept or a "Build" lesson with code examples in Python and TypeScript "when possible." Lesson topics in the list include Introduction to Generative AI and LLMs, Exploring and comparing different LLMs, Understanding Prompt Engineering Fundamentals, Retrieval Augmented Generation (RAG) and Vector Databases, AI Agents, and Fine-Tuning LLMs.
- Before you start: the README says "Basic knowledge of Python or TypeScript is helpful" and links beginner courses for both. You also need a GitHub account to fork the repo.
- Cost to watch: the lessons are free. To run the code you pick a model provider. The README lists Azure OpenAI Service, Microsoft Foundry Models, the OpenAI API, or Foundry Local, which it says runs models "fully offline on your own device, no cloud subscription required". Cloud APIs bill by use on their own terms.
- Note: the README says GitHub Models was set to retire at the end of July 2026 and points learners to Microsoft Foundry Models instead.
4. Anthropic's courses on GitHub
Anthropic publishes five free courses on GitHub as Jupyter notebooks. The README suggests this order:
- Anthropic API fundamentals: getting an API key, model parameters, multimodal prompts, streaming responses.
- Prompt engineering interactive tutorial: a step-by-step guide to prompting techniques.
- Real world prompting: using those techniques in complex, real-world prompts.
- Prompt evaluations: writing production prompt evaluations to measure prompt quality.
- Tool use: implementing tool use in workflows with Claude.
- Cost to watch: the notebooks are free, but running them calls the Claude API, which needs an API key and bills by use. The README says the courses "often favor our lowest-cost model, Claude 3 Haiku, to keep API costs down for students following along with the materials."
- Good for: developers who already have Python basics and want to build with one model provider's API.
For more on agents specifically, see our list of free AI agent courses.
5. Maxime Labonne's LLM Course
The LLM Course by Maxime Labonne is a free roadmap on GitHub with linked articles and Colab notebooks. The README says it is "divided into three parts":
- LLM Fundamentals, which the README calls optional: mathematics, Python, neural networks and NLP.
- The LLM Scientist: LLM architecture, pre-training, post-training datasets, supervised fine-tuning, preference alignment, evaluation, quantization and new trends.
- The LLM Engineer: running LLMs, vector storage, retrieval augmented generation, advanced RAG, agents, inference optimization, deploying LLMs and securing LLMs.
The author also co-wrote a paid book based on the course, the LLM Engineer's Handbook. The README says: "The LLM course will always stay free, but you can support my work by purchasing this book."
- Format: a reading list and roadmap, with notebooks for fine-tuning, quantization and other tasks. You choose the order.
- Good for: self-directed learners who want a map of topics more than a single lecture series.

Build a model from scratch
6. Andrej Karpathy: Neural Networks, Zero to Hero
Neural Networks: Zero to Hero is a free video course by Andrej Karpathy "on building neural networks, from scratch, in code." The page says: "We start with the basics of backpropagation and build up to modern deep neural networks, like GPT."
The syllabus lists eight videos, marked "ongoing":
- The spelled-out intro to neural networks and backpropagation: building micrograd (2h25m)
- The spelled-out intro to language modeling: building makemore (1h57m)
- Building makemore Part 2: MLP (1h15m)
- Building makemore Part 3: Activations & Gradients, BatchNorm (1h55m)
- Building makemore Part 4: Becoming a Backprop Ninja (1h55m)
- Building makemore Part 5: Building a WaveNet (56m)
- Let's build GPT: from scratch, in code, spelled out. (1h56m)
- Let's build the GPT Tokenizer (2h13m)
By our count of those listed runtimes, that is about 14.5 hours of video.
- Before you start: the page lists "solid programming (Python), intro-level math (e.g. derivative, gaussian)."
- Good for: learners who want to write each part of a GPT-style model and see why it works.
7. Sebastian Raschka: Build a Large Language Model (From Scratch) code
The LLMs-from-scratch repository holds the official code for Sebastian Raschka's book Build a Large Language Model (From Scratch). The README says the repository contains "the code for developing, pretraining, and finetuning a GPT-like LLM".
The chapter notebooks run from Understanding Large Language Models and Working with Text Data to Coding Attention Mechanisms and beyond. The README says the book's method for a "small-but-functional model for educational purposes" mirrors the approach used for large foundation models, and that the book "includes code for loading the weights of larger pretrained models for finetuning."
- Cost to watch: the code on GitHub is free. The book itself is sold by Manning and other stores, and the notebooks are written to go with it.
- Good for: readers who learn from text and code more than from video.
8. Stanford CS336: Language Modeling from Scratch
Stanford CS336 teaches language models "by walking them through the entire process of developing their own." The Spring 2026 offering was taught by Tatsunori Hashimoto and Percy Liang, and the site links a YouTube playlist of lecture recordings. Spring 2025 and Spring 2024 pages are also linked.
The site lists these assignments:
- Basics: implement the tokenizer, model architecture and optimizer to train a standard Transformer language model.
- Systems: profile and benchmark the model, write your own Triton implementation of FlashAttention2, and build a memory-efficient, distributed version of the training code.
- Scaling: query a training API to fit a scaling law.
- Data: convert raw Common Crawl dumps into pretraining data, with filtering and deduplication.
- A fifth assignment covers safety alignment methods such as DPO.
- Before you start: the site lists proficiency in Python, experience with deep learning and systems optimization, college calculus and linear algebra, basic probability and statistics, and machine learning basics. It says: "Note that this is a 5-unit class. This is a very implementation-heavy class, so please allocate enough time for it."
- Cost to watch: lectures and assignments are online, but the site says people following along at home "can access GPU compute from a cloud provider to complete the assignments." It recommends debugging on CPU first to save money. Our guide to free GPU for AI covers free and student options.
Stay current
9. Stanford CS25: Transformers United
CS25: Transformers United is a Stanford seminar series, now on its sixth version (V6). Each week, the page says, "we dive into the latest breakthroughs in AI, from large language models like GPT to applications in art, biology, and robotics."
The Spring 2026 run was listed for March 30 to June 3. For that run the page said: "Anybody is free to audit in-person or join our Zoom livestreams". It adds that you do not have to sign up or be affiliated with Stanford. The site also has a Recordings section and a Discord community it lists at over 5,000 members.
- Format: guest talks, not a structured course with assignments.
- Good for: hearing researchers discuss current work once you know the basics.
Which one should you start with?
Match the course to the step you are on:
- Understand LLMs: Google's Intro to Large Language Models module.
- Use and fine-tune models: the Hugging Face LLM Course.
- Build LLM apps: Microsoft's Generative AI for Beginners, Anthropic's GitHub courses, or the LLM Engineer part of Maxime Labonne's roadmap.
- Build a model from scratch: Karpathy's Zero to Hero videos or Raschka's notebooks first, then Stanford CS336 if you want university-level assignments.
- Stay current: Stanford CS25 talks.
If you want to turn these courses into a job, our guides on how to become an AI engineer and building an AI portfolio show how to turn finished projects into proof of skill.
Sources
- Google Machine Learning Crash Course: Intro to Large Language Models
- Hugging Face LLM Course: Introduction
- Microsoft: Generative AI for Beginners (GitHub)
- Anthropic courses (GitHub)
- Maxime Labonne: LLM Course (GitHub)
- Andrej Karpathy: Neural Networks, Zero to Hero
- Sebastian Raschka: LLMs-from-scratch (GitHub)
- Stanford CS336: Language Modeling from Scratch
- Stanford CS336 lecture recordings (YouTube)
- Stanford CS25: Transformers United
