ml-engineering
stas00/ml-engineering
Machine Learning Engineering Open Book
Machine Learning Engineering Open Book
Categories
Tags
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
hermes-agent
NousResearch/hermes-agent
The self-improving AI agent built by Nous Research
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
prompts.chat
f/prompts.chat
The world's largest open-source prompt library for AI
transformers
huggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models
Install
pip install ml-engineeringREADME
Machine Learning Engineering Open Book
This is an open collection of methodologies, tools and step by step instructions to help with successful training and fine-tuning of large language models and multi-modal models and their inference.
This is a technical material suitable for LLM/VLM training engineers and operators. That is the content here contains lots of scripts and copy-n-paste commands to enable you to quickly address your needs.
This repo is an ongoing brain dump of my experiences training Large Language Models (LLM) (and VLMs); a lot of the know-how I acquired while training the open-source BLOOM-176B model in 2022 and IDEFICS-80B multi-modal model in 2023, and RAG models at Contextual.AI in 2024.
I've been compiling this information mostly for myself so that I could quickly find solutions I have already researched in the past and which have worked, but as usual I'm happy to share these notes with the wider ML community.
Table of Contents
Part 1. Insights
-
The AI Battlefield Engineering - what you need to know in order to succeed.
-
How to Choose a Cloud Provider - these questions will empower you to have a successful compute cloud experience.
Part 2. Hardware
-
Compute - accelerators, CPUs, CPU memory.
-
Storage - local, distributed and shared file systems.
-
Network - intra- and inter-node networking.
Part 3. Orchestration
- Orchestration Systems - managing containers and resources
- SLURM - Simple Linux Utility for Resource Management
Part 4. Training
- Training - model training-related guides
Part 5. Inference
- Inference - model inference insights
Part 6. Development
-
Debugging and Troubleshooting - how to debug easy and difficult issues
-
Testing - numerous tips and tools to make test writing enjoyable
Part 7. Miscellaneous
- Resources - LLM/VLM chronicles
Updates
I announce any significant updates on my twitter channel https://twitter.com/StasBekman.
Ebook versions of the book
You can download various ebook formats of this book:
I will try to rebuild these once in a few weeks or so, but if you want the latest ebook versions, the instructions for building are here.
Thanks to HuggingFace for giving me permission to host my book's ebook formats at the HF hub.
SKILL.md for AI agents
I maintain a SKILL.md file that you can use to teach your AI agent to train and operate large-scale ML models better.
See also the companion skills: The Art of Debugging and Stas' Python Cookbook.
Lectures/Talks
- Building resilient ML Engineering skills given on 2026-01-10 for the GPU Mode community. Only had time to discuss performance reality of accelerators, network and storage and how each of them can be crucial to the ensemble's performance. Thanks to Mark Saroufim for organizing and providing an awesome support during the talk.