Skip to content
AIRepoHub

llm-course

by mlabonne

Free course with roadmaps and Colab notebooks for learning how large language models work and how to use them.

Developer ToolsApache 2.0 license
Stars
85,217
stars
Forks
9.9k
forks
Last push
9 months ago
Activity
Slowing down
llm-course: quick start
# Get the course locally$ git clone https://github.com/mlabonne/llm-course.git

Commands from the project's README. Run them after installing (see below).

Overview

Understand llm-course in 60 seconds

What it does
The LLM Course is a free roadmap for learning large language models, written by Maxime Labonne. It has three tracks: optional fundamentals, the LLM Scientist (building better models) and the LLM Engineer (building and deploying LLM apps), plus Colab notebooks.
The problem it solves
Learning LLMs means sorting through a flood of papers, videos and blog posts. This course organises the topics in order and points to the best free resources for each one, with hands-on notebooks for fine-tuning, quantization and merging.
Why choose it
Choose it for a well-organised, free map of the whole LLM field with practical notebooks. It is a curated roadmap, so most depth lives in the linked resources.
Who should use it
  • Developers moving into LLM engineering
  • ML practitioners learning fine-tuning and alignment
  • Students wanting a structured reading list
  • Engineers building RAG and agent apps
Setup difficulty

You'll need:

  • A web browser
  • A Google account to run the Colab notebooks
  • Python knowledge for the hands-on parts

How llm-course works

The course has three parts. LLM Fundamentals is optional and covers mathematics, Python for machine learning, neural networks and NLP. The LLM Scientist covers model architecture, pre-training, post-training datasets, fine-tuning, preference alignment, evaluation, quantization and new trends.

The LLM Engineer covers running LLMs, vector storage, retrieval-augmented generation, advanced RAG, agents, inference optimisation, deployment and securing LLMs. Each section explains the key ideas briefly and lists recommended videos, articles and courses.

A notebooks section links Colab notebooks and articles by the author, including fine-tuning Llama 3.1 with Unsloth, ORPO and DPO fine-tuning, GPTQ and GGUF quantization, model merging with MergeKit, and tools such as LLM AutoEval and LazyMergekit. The author also co-wrote the LLM Engineer's Handbook based on the course, and says the course will stay free.

Features

Key features

Three learning tracks

Fundamentals, LLM Scientist and LLM Engineer.

Curated resources

The best free videos, articles and courses for each topic.

Colab notebooks

Fine-tuning, quantization and merging you can run in the browser.

Fine-tuning guides

Unsloth, ORPO, DPO and QLoRA walkthroughs.

Quantization

GPTQ, GGUF, EXL2 and more.

One-click tools

LazyMergekit, AutoQuant, LLM AutoEval and others.

Strengths

  • Free and well organised
  • Covers both research and engineering
  • Hands-on notebooks
  • Maintained by an active practitioner

Limitations

  • A roadmap, not a full textbook; depth lives in linked resources
  • Some notebooks need a GPU runtime
  • Fast-moving field, so some links age

Practical use cases

Self-study plan

Follow the Scientist or Engineer track in order.

Fine-tune a model

Run the Unsloth Llama 3.1 notebook in Colab.

Quantize a model

Use the GGUF or GPTQ notebook.

Installation

Install llm-course

Based on official documentation

Commands come from LLM Course's README. AIRepoHub hasn't run them yet. View source

Prerequisites

  • A web browser

Supported systems

  • Windows
  • macOS
  • Linux
  1. 1

    Open the README

    The whole roadmap is on the repository's front page; pick a track.

  1. 1

    Clone the repository

    Shell
    git clone https://github.com/mlabonne/llm-course.git

Configuration and API keys

SettingWhat it's for

First run

  1. 1

    Pick a track

    Start with LLM Fundamentals if you need the basics, otherwise the Scientist or Engineer track.

llm-course's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.

Your first project

Fine-tune your first LLM with the course notebook

Run a supervised fine-tune in Google Colab following the course.

Before you start

  • A Google account for Colab
  1. 1

    Open the Notebooks section

    Find Fine-tune Llama 3.1 with Unsloth.

  2. 2

    Read the linked article

    It explains the method step by step.

  3. 3

    Open the notebook in Colab and run the cells

What to expect

A fine-tuned model trained in Colab, following the article.

Next steps

  • Try DPO or ORPO fine-tuning
  • Quantize the result with GGUF
  • Read the LLM Engineer track to deploy it

Costs and requirements

What it costs to run

License
Apache-2.0.Free
Course
Free.Free
Compute
Colab free tier may be enough for small runs; bigger runs may need paid GPUs.Depends

Troubleshooting

Common setup issues

Not sure where to start

Fundamentals is optional; skip to the track that matches your goal.

Source: README.md

Notebook runs out of memory on free Colab

The README marks the Mistral-7b QLoRA notebook as working in a free-tier Colab; larger runs need a bigger GPU runtime.

Source: README.md

Want more depth

The README points to a DeepWiki version and the LLM Engineer's Handbook.

Source: README.md

Alternatives

Similar AI repositories