Machine Learning Engineering Open Book
Stas Bekman's free, open book on the engineering side of training and serving large models: accelerators, memory, networking, storage, orchestration, debugging and inference. Written from hands-on experience, including leading the BLOOM-176B training, it is the reference to reach for when your models meet real GPUs.
19.1k (stas00/ml-engineering)
GitHub · Sept 2026
CC BY-SA 4.0
GitHub · Sept 2026
GitHub repo
AI & Machine Learning
Stas Bekman
Reference, read chapter by chapter
Advanced
Free
What it is
The Machine Learning Engineering Open Book is a free collection of methods, tools and step-by-step instructions for training, fine-tuning and serving large language and multimodal models. The author, Stas Bekman, led the training of the open BLOOM-176B model at Hugging Face and later built training and inference systems at Contextual AI, and the book reads like the notes of someone who has fixed these problems at three in the morning. It lives on GitHub, with PDF and EPUB versions hosted on the Hugging Face Hub.
What it covers
- Insights: what it takes to succeed with large-scale ML, choosing a cloud provider, and when a GPU upgrade is worth its cost.
- Hardware: accelerators, CPU memory, storage and networking, with comparison tables of theoretical throughput and memory.
- Orchestration: managing containers and resources, with a SLURM section and cheat sheet.
- Training and inference: practical guides and inference insights.
- Debugging and testing: copy-and-paste fixes for hanging or crashing PyTorch programs, and ways to debug with tiny models and datasets.
Is it worth reading?
Yes, once you have a model on a GPU and something is slow, running out of memory or failing across machines. It is not a beginner course, and you will not read it cover to cover. Treat it as the reference you open when the question is "why is my GPU idle?" or "how much memory does this really need?". The benchmarking scripts, such as the one measuring real achievable TFLOPS, are useful on their own.
Prerequisites
Comfort with Python, PyTorch and Linux, and a basic understanding of how neural networks are trained. The inference and hardware chapters are the easiest entry points for MLOps work.
How long it takes
Pick one chapter at a time. The inference and accelerator chapters take an evening each; the rest you will return to as problems appear.
Free or paid?
Completely free, under the Creative Commons Attribution-ShareAlike 4.0 licence.
How it fits an MLOps roadmap
It goes deeper than any course on the GPU side of serving and fine-tuning: memory arithmetic, throughput, networking between machines and debugging. Read it alongside the vLLM docs when you serve open models, and alongside your fine-tuning tool when training runs misbehave.
Common questions
Is it only for huge training runs? Much of it is, but the debugging, memory and inference sections help anyone running models on one GPU.
What can I do after it? Reason about GPU memory and throughput from first principles, debug stuck or slow PyTorch jobs, and choose hardware with numbers rather than guesses.
Best for: ML engineers and students who have moved from notebooks to real GPU workloads.
Ready to start?
Opens on Stas Bekman in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.