Course to get into Large Language Models (LLMs) with roadmaps and Colab notebooks.
82,534
stars
96
commits
Feb 5, 2026
updated
𝕏 Follow me on X • 🤗 Hugging Face • 💻 Blog • 📙 LLM Engineer's Handbook
The LLM course is divided into three parts:
[!NOTE] Based on this course, I co-wrote the LLM Engineer's Handbook, a hands-on book that covers an end-to-end LLM application from design to deployment. The LLM course will always stay free, but you can support my work by purchasing this book.
For a more comprehensive version of this course, check out the DeepWiki.
A list of notebooks and articles I wrote about LLMs.
| Notebook | Description | Notebook |
|---|---|---|
| 🧐 LLM AutoEval | Automatically evaluate your LLMs using RunPod | |
| 🥱 LazyMergekit | Easily merge models using MergeKit in one click. | |
| 🦎 LazyAxolotl | Fine-tune models in the cloud using Axolotl in one click. | |
| ⚡ AutoQuant | Quantize LLMs in GGUF, GPTQ, EXL2, AWQ, and HQQ formats in one click. | |
| 🌳 Model Family Tree | Visualize the family tree of merged models. | |
| 🚀 ZeroSpace | Automatically create a Gradio chat interface using a free ZeroGPU. | |
| ✂️ AutoAbliteration | Automatically abliteration models with custom datasets. | |
| 🧼 AutoDedup | Automatically deduplicate datasets using the Rensa library. |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Fine-tune Llama 3.1 with Unsloth | Ultra-efficient supervised fine-tuning in Google Colab. | Article | |
| Fine-tune Llama 3 with ORPO | Cheaper and faster fine-tuning in a single stage with ORPO. | Article | |
| Fine-tune Mistral-7b with DPO | Boost the performance of supervised fine-tuned models with DPO. | Article | |
| Fine-tune Mistral-7b with QLoRA | Supervised fine-tune Mistral-7b in a free-tier Google Colab with TRL. | ||
| Fine-tune CodeLlama using Axolotl | End-to-end guide to the state-of-the-art tool for fine-tuning. | Article | |
| Fine-tune Llama 2 with QLoRA | Step-by-step guide to supervised fine-tune Llama 2 in Google Colab. | Article |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Introduction to Quantization | Large language model optimization using 8-bit quantization. | Article | |
| 4-bit Quantization using GPTQ | Quantize your own open-source LLMs to run them on consumer hardware. | Article | |
| Quantization with GGUF and llama.cpp | Quantize Llama 2 models with llama.cpp and upload GGUF versions to the HF Hub. | Article | |
| ExLlamaV2: The Fastest Library to Run LLMs | Quantize and run EXL2 models and upload them to the HF Hub. | Article |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Merge LLMs with MergeKit | Create your own models easily, no GPU required! | Article | |
| Create MoEs with MergeKit | Combine multiple experts into a single frankenMoE | Article | |
| Uncensor any LLM with abliteration | Fine-tuning without retraining | Article | |
| Improve ChatGPT with Knowledge Graphs | Augment ChatGPT's answers with knowledge graphs. | Article | |
| Decoding Strategies in Large Language Models | A guide to text generation from beam search to nucleus sampling | Article |
This section introduces essential knowledge about mathematics, Python, and neural networks. You might not want to start here but refer to it as needed.

Before mastering machine learning, it is important to understand the fundamental mathematical concepts that power these algorithms.
📚 Resources:
Python is a powerful and flexible programming language that's particularly good for machine learning, thanks to its readability, consistency, and robust ecosystem of data science libraries.
📚 Resources:
Neural networks are a fundamental part of many machine learning models, particularly in the realm of deep learning. To utilize them effectively, a comprehensive understanding of their design and mechanics is essential.
📚 Resources:
NLP is a fascinating branch of artificial intelligence that bridges the gap between human language and machine understanding. From simple text processing to understanding linguistic nuances, NLP plays a crucial role in many applications like translation, sentiment analysis, chatbots, and much more.
📚 Resources:
This section of the course focuses on learning how to build the best possible LLMs using the latest techniques.

An in-depth knowledge of the Transformer architecture is not required, but it's important to understand the main steps of modern LLMs: converting text into numbers through tokenization, processing these tokens through layers including attention mechanisms, and finally generating new text through various sampling strategies.
📚 References:
Pre-training is a computationally intensive and expensive process. While it's not the focus of this course, it's important to have a solid understanding of how models are pre-trained, especially in terms of data and parameters. Pre-training can also be performed by hobbyists at a small scale with <1B models.
📚 References:
Post-training datasets have a precise structure with instructions and answers (supervised fine-tuning) or instructions and chosen/rejected answers (preference alignment). Conversational structures are a lot rarer than the raw text used for pre-training, which is why we often need to process seed data and refine it to improve the accuracy, diversity, and complexity of the samples. More information and examples are available in my repo 💾 LLM Datasets.
📚 References:
SFT turns base models into helpful assistants, capable of answering questions and following instructions. During this process, they learn how to structure answers and reactivate a subset of knowledge learned during pre-training. Instilling new knowledge is possible but superficial: it cannot be used to learn a completely new language. Always prioritize data quality over parameter optimization.
📚 References:
Preference alignment is a second stage in the post-training pipeline, focused on aligning generated answers with human preferences. This stage was designed to tune the tone of LLMs and reduce toxicity and hallucinations. However, it has become increasingly important to also boost their performance and improve their usefulness. Unlike SFT, there are many preference alignment algorithms. Here, we'll focus on the three most important ones: DPO, GRPO, and PPO.
📚 References:
Reliably evaluating LLMs is a complex but essential task guiding data generation and training. It provides invaluable feedback about areas of improvement, which can be leveraged to modify the data mixture, quality, and training parameters. However, it's always good to remember Goodhart's law: "When a measure becomes a target, it ceases to be a good measure."
📚 References:
Quantization is the process of converting the parameters and activations of a model to a lower precision. For example, weights stored using 16 bits can be converted into a 4-bit representation. This technique has become increasingly important to reduce the computational and memory costs associated with LLMs.
📚 References:
Here are notable topics that didn't fit into other categories. Some are established techniques (model merging, multimodal), but others are more experimental (interpretability, test-time compute scaling) and the focus of numerous research papers.
📚 References:
This section of the course focuses on learning how to build LLM-powered applications that can be used in production, with a focus on augmenting models and deploying them.

Running LLMs can be difficult due to high hardware requirements. Depending on your use case, you might want to simply consume a model through an API (like GPT-4) or run it locally. In any case, additional prompting and guidance techniques can improve and constrain the output for your applications.
📚 References:
Creating a vector storage is the first step to building a Retrieval Augmented Generation (RAG) pipeline. Documents are loaded, split, and relevant chunks are used to produce vector representations (embeddings) that are stored for future use during inference.
📚 References:
With RAG, LLMs retrieve contextual documents from a database to improve the accuracy of their answers. RAG is a popular way of augmenting the model's knowledge without any fine-tuning.
📚 References:
Real-life applications can require complex pipelines, including SQL or graph databases, as well as automatically selecting relevant tools and APIs. These advanced techniques can improve a baseline solution and provide additional features.
📚 References:
An LLM agent can autonomously perform tasks by taking actions based on reasoning about its environment, typically through the use of tools or functions to interact with external systems.
📚 References:
Text generation is a costly process that requires expensive hardware. In addition to quantization, various techniques have been proposed to maximize throughput and reduce inference costs.
📚 References:
Deploying LLMs at scale is an engineering feat that can require multiple clusters of GPUs. In other scenarios, demos and local apps can be achieved with much lower complexity.
📚 References:
In addition to traditional security problems associated with software, LLMs have unique weaknesses due to the way they are trained and prompted.
📚 References:
This roadmap was inspired by the excellent DevOps Roadmap from Milan Milanović and Romano Roth.
Special thanks to:
Disclaimer: I am not affiliated with any sources listed here.
Course to get into Large Language Models (LLMs) with roadmaps and Colab notebooks.
82,534
stars
96
commits
Feb 5, 2026
updated
𝕏 Follow me on X • 🤗 Hugging Face • 💻 Blog • 📙 LLM Engineer's Handbook
The LLM course is divided into three parts:
[!NOTE] Based on this course, I co-wrote the LLM Engineer's Handbook, a hands-on book that covers an end-to-end LLM application from design to deployment. The LLM course will always stay free, but you can support my work by purchasing this book.
For a more comprehensive version of this course, check out the DeepWiki.
A list of notebooks and articles I wrote about LLMs.
| Notebook | Description | Notebook |
|---|---|---|
| 🧐 LLM AutoEval | Automatically evaluate your LLMs using RunPod | |
| 🥱 LazyMergekit | Easily merge models using MergeKit in one click. | |
| 🦎 LazyAxolotl | Fine-tune models in the cloud using Axolotl in one click. | |
| ⚡ AutoQuant | Quantize LLMs in GGUF, GPTQ, EXL2, AWQ, and HQQ formats in one click. | |
| 🌳 Model Family Tree | Visualize the family tree of merged models. | |
| 🚀 ZeroSpace | Automatically create a Gradio chat interface using a free ZeroGPU. | |
| ✂️ AutoAbliteration | Automatically abliteration models with custom datasets. | |
| 🧼 AutoDedup | Automatically deduplicate datasets using the Rensa library. |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Fine-tune Llama 3.1 with Unsloth | Ultra-efficient supervised fine-tuning in Google Colab. | Article | |
| Fine-tune Llama 3 with ORPO | Cheaper and faster fine-tuning in a single stage with ORPO. | Article | |
| Fine-tune Mistral-7b with DPO | Boost the performance of supervised fine-tuned models with DPO. | Article | |
| Fine-tune Mistral-7b with QLoRA | Supervised fine-tune Mistral-7b in a free-tier Google Colab with TRL. | ||
| Fine-tune CodeLlama using Axolotl | End-to-end guide to the state-of-the-art tool for fine-tuning. | Article | |
| Fine-tune Llama 2 with QLoRA | Step-by-step guide to supervised fine-tune Llama 2 in Google Colab. | Article |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Introduction to Quantization | Large language model optimization using 8-bit quantization. | Article | |
| 4-bit Quantization using GPTQ | Quantize your own open-source LLMs to run them on consumer hardware. | Article | |
| Quantization with GGUF and llama.cpp | Quantize Llama 2 models with llama.cpp and upload GGUF versions to the HF Hub. | Article | |
| ExLlamaV2: The Fastest Library to Run LLMs | Quantize and run EXL2 models and upload them to the HF Hub. | Article |
| Notebook | Description | Article | Notebook |
|---|---|---|---|
| Merge LLMs with MergeKit | Create your own models easily, no GPU required! | Article | |
| Create MoEs with MergeKit | Combine multiple experts into a single frankenMoE | Article | |
| Uncensor any LLM with abliteration | Fine-tuning without retraining | Article | |
| Improve ChatGPT with Knowledge Graphs | Augment ChatGPT's answers with knowledge graphs. | Article | |
| Decoding Strategies in Large Language Models | A guide to text generation from beam search to nucleus sampling | Article |
This section introduces essential knowledge about mathematics, Python, and neural networks. You might not want to start here but refer to it as needed.

Before mastering machine learning, it is important to understand the fundamental mathematical concepts that power these algorithms.
📚 Resources:
Python is a powerful and flexible programming language that's particularly good for machine learning, thanks to its readability, consistency, and robust ecosystem of data science libraries.
📚 Resources:
Neural networks are a fundamental part of many machine learning models, particularly in the realm of deep learning. To utilize them effectively, a comprehensive understanding of their design and mechanics is essential.
📚 Resources:
NLP is a fascinating branch of artificial intelligence that bridges the gap between human language and machine understanding. From simple text processing to understanding linguistic nuances, NLP plays a crucial role in many applications like translation, sentiment analysis, chatbots, and much more.
📚 Resources:
This section of the course focuses on learning how to build the best possible LLMs using the latest techniques.

An in-depth knowledge of the Transformer architecture is not required, but it's important to understand the main steps of modern LLMs: converting text into numbers through tokenization, processing these tokens through layers including attention mechanisms, and finally generating new text through various sampling strategies.
📚 References:
Pre-training is a computationally intensive and expensive process. While it's not the focus of this course, it's important to have a solid understanding of how models are pre-trained, especially in terms of data and parameters. Pre-training can also be performed by hobbyists at a small scale with <1B models.
📚 References:
Post-training datasets have a precise structure with instructions and answers (supervised fine-tuning) or instructions and chosen/rejected answers (preference alignment). Conversational structures are a lot rarer than the raw text used for pre-training, which is why we often need to process seed data and refine it to improve the accuracy, diversity, and complexity of the samples. More information and examples are available in my repo 💾 LLM Datasets.
📚 References:
SFT turns base models into helpful assistants, capable of answering questions and following instructions. During this process, they learn how to structure answers and reactivate a subset of knowledge learned during pre-training. Instilling new knowledge is possible but superficial: it cannot be used to learn a completely new language. Always prioritize data quality over parameter optimization.
📚 References:
Preference alignment is a second stage in the post-training pipeline, focused on aligning generated answers with human preferences. This stage was designed to tune the tone of LLMs and reduce toxicity and hallucinations. However, it has become increasingly important to also boost their performance and improve their usefulness. Unlike SFT, there are many preference alignment algorithms. Here, we'll focus on the three most important ones: DPO, GRPO, and PPO.
📚 References:
Reliably evaluating LLMs is a complex but essential task guiding data generation and training. It provides invaluable feedback about areas of improvement, which can be leveraged to modify the data mixture, quality, and training parameters. However, it's always good to remember Goodhart's law: "When a measure becomes a target, it ceases to be a good measure."
📚 References:
Quantization is the process of converting the parameters and activations of a model to a lower precision. For example, weights stored using 16 bits can be converted into a 4-bit representation. This technique has become increasingly important to reduce the computational and memory costs associated with LLMs.
📚 References:
Here are notable topics that didn't fit into other categories. Some are established techniques (model merging, multimodal), but others are more experimental (interpretability, test-time compute scaling) and the focus of numerous research papers.
📚 References:
This section of the course focuses on learning how to build LLM-powered applications that can be used in production, with a focus on augmenting models and deploying them.

Running LLMs can be difficult due to high hardware requirements. Depending on your use case, you might want to simply consume a model through an API (like GPT-4) or run it locally. In any case, additional prompting and guidance techniques can improve and constrain the output for your applications.
📚 References:
Creating a vector storage is the first step to building a Retrieval Augmented Generation (RAG) pipeline. Documents are loaded, split, and relevant chunks are used to produce vector representations (embeddings) that are stored for future use during inference.
📚 References:
With RAG, LLMs retrieve contextual documents from a database to improve the accuracy of their answers. RAG is a popular way of augmenting the model's knowledge without any fine-tuning.
📚 References:
Real-life applications can require complex pipelines, including SQL or graph databases, as well as automatically selecting relevant tools and APIs. These advanced techniques can improve a baseline solution and provide additional features.
📚 References:
An LLM agent can autonomously perform tasks by taking actions based on reasoning about its environment, typically through the use of tools or functions to interact with external systems.
📚 References:
Text generation is a costly process that requires expensive hardware. In addition to quantization, various techniques have been proposed to maximize throughput and reduce inference costs.
📚 References:
Deploying LLMs at scale is an engineering feat that can require multiple clusters of GPUs. In other scenarios, demos and local apps can be achieved with much lower complexity.
📚 References:
In addition to traditional security problems associated with software, LLMs have unique weaknesses due to the way they are trained and prompted.
📚 References:
This roadmap was inspired by the excellent DevOps Roadmap from Milan Milanović and Romano Roth.
Special thanks to:
Disclaimer: I am not affiliated with any sources listed here.