CodeLoom
Python · advanced · 12 modules

The LLM Engineer's Handbook

Build an end-to-end LLM product: data pipelines, RAG, fine-tuning, evaluation, inference and LLMOps.

46 sessions 16 h of study 7 graded labs 27 quiz questions Updated 2026-11-26

Most LLM material stops at a notebook. This course is the other half: the pipelines, storage, training runs, evaluation and deployment that turn a model into a product. You will follow one system from the first crawled document to an autoscaling inference endpoint, and every chapter ends with code you have to make pass.

The running example is an LLM twin — a model trained on a single person's writing, able to answer in their voice, grounded in their own articles and repositories by retrieval. It is small enough to build on one machine and complete enough to expose every real problem: messy HTML, chunking that destroys meaning, instruction data you have to curate yourself, preference pairs, evaluation that is not vibes, and inference that has to be fast enough to pay for itself.

How the sessions are built

Each session is one section of the book, edited into a reading of 12 to 45 minutes, with the code blocks kept intact and the figures captioned where they matter. Chapters 1 and 2 are concepts and tooling; chapters 3 to 11 are the build itself; the appendix collects the MLOps principles the whole book leans on.

What you need before the first lab

Python 3.11 or newer, comfortable with classes and decorators, and a terminal. The labs on this site are pure Python and run in seconds. The book's full pipelines need Docker, MongoDB and Qdrant; you do not need them to finish the sessions or the graded exercises.

What you will be able to do

  • Design an LLM product as feature, training and inference pipelines instead of one notebook
  • Crawl, clean and store unstructured documents in a NoSQL warehouse
  • Build the ingestion side of RAG: cleaning, chunking, embedding and indexing
  • Curate an instruction dataset and fine-tune with LoRA and QLoRA
  • Align a model with DPO and explain why it replaced a full RLHF loop
  • Evaluate a RAG system with retrieval and generation metrics, not intuition
  • Reason about KV cache, batching, quantisation and parallelism when latency matters
  • Ship an inference service and wire up CI/CD, CT and prompt monitoring

Syllabus

Every session is a reading with optional audio. Labs are graded by tests; quizzes are instant.

M01
Understanding the LLM Twin Concept and Its Architecture

What an LLM twin is, why the FTI pipeline design exists, and the full system diagram you will build.

5 sessions · 75 min
M02
Tooling and Installation

Poetry, ZenML, Comet, Opik, MongoDB, Qdrant, Hugging Face and the AWS account that ties them together.

4 sessions · 63 min
M03
Data Engineering

Crawlers for Medium, GitHub and articles, an ODM layer, and a MongoDB data warehouse.

2 sessions · 58 min
M04
RAG Feature Pipeline

Embeddings, vector indexes, advanced RAG, and the batch pipeline that cleans, chunks and embeds documents.

4 sessions · 127 min
M05
Supervised Fine-Tuning

Curating an instruction dataset, chat templates, LoRA and QLoRA, and the training parameters that matter.

4 sessions · 111 min
M06
Fine-Tuning with Preference Alignment

Preference pairs, RLHF versus DPO, and a full DPO run on top of the SFT model.

4 sessions · 61 min
M07
Evaluating LLMs

General, domain and task-specific evaluation, RAG metrics with Ragas and ARES, and an honest look at TwinLlama.

3 sessions · 58 min
M08
Inference Optimization

KV cache, continuous batching, speculative decoding, quantisation formats and the three kinds of parallelism.

3 sessions · 53 min
M09
RAG Inference Pipeline

Query expansion, self-querying, filtered vector search and reranking, wired into one retrieval module.

3 sessions · 63 min
M10
Inference Pipeline Deployment

Deployment types, monolith versus microservices, SageMaker endpoints, FastAPI and autoscaling policies.

6 sessions · 96 min
M11
MLOps and LLMOps

DevOps to MLOps to LLMOps, cloud deployment of every pipeline, CI/CD/CT, prompt monitoring and alerting.

4 sessions · 117 min
M12
Appendix — MLOps Principles

Automation, versioning, experiment tracking, testing, monitoring and reproducibility, in one place.

4 sessions · 52 min

Before you start

You need. Comfort with Python functions and classes, and a terminal you are not afraid of. A 6 GB laptop GPU is enough to follow the labs; the heavy ones are graded on the instructor's machine.

You do not need. A cloud account, a paid API key, or a GPU for the reading and most quizzes.