llm-course
by mlabonne
Free course with roadmaps and Colab notebooks for learning how large language models work and how to use them.
- Stars
- 85,217 stars
- Forks
- 9.9k forks
- Last push
- 9 months ago
- Activity
- Slowing down
# Get the course locally$ git clone https://github.com/mlabonne/llm-course.gitCommands 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
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
Open the README
The whole roadmap is on the repository's front page; pick a track.
- 1
Clone the repository
Shellgit clone https://github.com/mlabonne/llm-course.git
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 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
Open the Notebooks section
Find Fine-tune Llama 3.1 with Unsloth.
- 2
Read the linked article
It explains the method step by step.
- 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.
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.
Want more depth
The README points to a DeepWiki version and the LLM Engineer's Handbook.
Alternatives
Similar AI repositories
superpowers
obra
Collection of agent skills and a working method that guide AI coding agents through software development step by step.
andrej-karpathy-skills
multica-ai
A single CLAUDE.md file of coding rules, based on Andrej Karpathy's notes, that makes Claude Code ask before assuming, keep code simple and change only what you asked.
tensorflow
tensorflow
Google's open-source machine learning framework for building and training neural networks.
markitdown
microsoft
Python tool from Microsoft that converts PDFs, Word, Excel, PowerPoint and other files into Markdown for use with AI.