The LLM Engineer's Handbook
Build an end-to-end LLM product: data pipelines, RAG, fine-tuning, evaluation, inference and LLMOps.
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.
What an LLM twin is, why the FTI pipeline design exists, and the full system diagram you will build.
Poetry, ZenML, Comet, Opik, MongoDB, Qdrant, Hugging Face and the AWS account that ties them together.
Crawlers for Medium, GitHub and articles, an ODM layer, and a MongoDB data warehouse.
Embeddings, vector indexes, advanced RAG, and the batch pipeline that cleans, chunks and embeds documents.
Curating an instruction dataset, chat templates, LoRA and QLoRA, and the training parameters that matter.
Preference pairs, RLHF versus DPO, and a full DPO run on top of the SFT model.
General, domain and task-specific evaluation, RAG metrics with Ragas and ARES, and an honest look at TwinLlama.
KV cache, continuous batching, speculative decoding, quantisation formats and the three kinds of parallelism.
Query expansion, self-querying, filtered vector search and reranking, wired into one retrieval module.
Deployment types, monolith versus microservices, SageMaker endpoints, FastAPI and autoscaling policies.
- 33Criteria for choosing deployment types12 minRead
- 34Understanding inference deployment types12 minRead
- 35Monolithic versus microservices architecture in model serving12 minRead
- 36Exploring the LLM Twin's inference pipeline deployment strategy12 minRead
- 37Deploying the LLM Twin service32 minRead
- 38Autoscaling capabilities to handle spikes in usage16 minQuiz
DevOps to MLOps to LLMOps, cloud deployment of every pipeline, CI/CD/CT, prompt monitoring and alerting.
Automation, versioning, experiment tracking, testing, monitoring and reproducibility, in one place.
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.