Cheat sheet · Specialise
MLOps and LLMOps cheat sheet (LLM apps)
Opens with creditsFor engineers running LLM features in production: prompts and configs as code, versioned eval sets and indexes, tracing, eval gates in CI, caching, token cost, gateways, fine-tuning with LoRA and serving open models with vLLM. It keeps the classic MLOps chapters too, because the same discipline applies to prompts and models.
Chapters
10 chapters · 75 concepts
1From notebook to packageThe shape of the whole lifecycle, the tools that fill each step, and how to turn notebook code into a tested, locked, containerised Python project that anyone can run.8 concepts
- 1The MLOps lifecycleThe loop a production model lives in: data is collected and validated, a model is trained and evaluated, approved and deployed, served to users, monitored, and…
- 2Tool map per stageA reference of common open source tools for each step of the lifecycle.
- 3Project layout and pyproject.tomlA repository where notebook code becomes importable modules under
src/<package>/, with dependencies, entry points and tool settings declared in one… - 4Dependencies and lockfilesA lockfile records the exact version of every package, including indirect ones, that your project resolved to. uv, a fast Python package and project manager…
- 5Config and secretsSettings that change between runs or environments, such as paths, hyperparameters, model names and API keys, kept out of the code: parameters in a versioned…
- 6An LLM client moduleOne module that every feature calls instead of the provider SDK directly.
- 7Tests for ML codeFast tests with pytest for the deterministic parts: feature functions, data loading, schemas and output shapes, plus a smoke test that trains on a tiny sample…
- 8Container imageA packaged file system with your code, a Python runtime and locked dependencies, built from a Dockerfile, that runs the same way on a laptop, in CI and in the…
8 in this chapterOpen this chapter2Data and model versioningGit for code, DVC for large data and model files, validation before training, and a frozen evaluation set, so any model can be traced back to the exact data that made it.6 concepts
- 1DVC (Data Version Control)An open source command-line tool that versions large files next to Git.
- 2DVC pipelinesStages declared in
dvc.yaml, each with a command, its dependencies and its outputs. - 3Data validationAutomatic checks on data before it is used: expected columns and types, value ranges, share of missing values, uniqueness of keys and row counts within a band.
- 4Frozen evaluation setA fixed, versioned set of examples with known correct answers that every candidate model or prompt is scored on, kept separate from training data and changed…
- 5LineageThe recorded chain from a prediction back to the model version, the training run, the code commit, the parameters and the data version that produced it.
- 6Versioning documents and indexesTreating the document snapshot, the chunking settings, the embedding model and the resulting vector index as one versioned artefact for a retrieval-augmented…
6 in this chapterOpen this chapter- Experiment tracking and the registryRecording every run so results can be compared and reproduced, and a registry that names which model version is live. The standalone MLflow sheet goes deeper into the tool itself.7 conceptsOpens with credits
- Pipelines and orchestrationBreaking training into steps, running them as a graph on a schedule or trigger, and making every step safe to retry and rerun.7 conceptsOpens with credits
- Serving: batch, real time and GPUsChoosing how predictions reach users, wrapping a model in a validated API, packaging it as a container, and the latency, batching and scaling ideas that decide cost.8 conceptsOpens with credits
- CI/CD for MLAutomated checks on code, data and model quality before anything ships, and release strategies that make a bad model cheap to catch and undo.8 conceptsOpens with credits
- Monitoring, drift and retrainingWatching the service and the model separately, detecting when live data stops looking like training data, and deciding when and how to retrain.8 conceptsOpens with credits
- LLMOps: prompts, evals, tracing, costRunning LLM features like production software: versioned prompts, eval sets and metrics, judges you can trust, traces of every call, caching, token budgets and defences against prompt injection.10 conceptsOpens with credits
- Fine-tuning and serving open modelsWhen to fine-tune, how LoRA makes it affordable, shrinking models with quantisation, serving them efficiently, and the GPU memory and cost arithmetic behind every choice.8 conceptsOpens with credits
- Capstone: a monitored model in productionThe documents and habits that turn a deployed model into a service someone can own: targets, a model card, a runbook, cost numbers and an honest write-up.5 conceptsOpens with credits
- 11Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.153 terms
About this sheet
Ship, serve and monitor models.
Related on Sefism
Picked from the other libraries by shared topics.
Roadmaps
See allBest practices
See allChecklists
See allProject structures
See all- Machine learning project project structureFor students and analysts whose model works in a notebook and now needs to be reproducible, reviewable, served and watched. It starts from the Cookiecutter Data Science v2 layout (immutable raw data, numbered notebooks, a real Python package) and grows into versioned data with DVC, typed parameters, data validation with pandera, experiment tracking and a model registry with MLflow, a FastAPI prediction service, drift monitoring and, for a team, scheduled retraining, model cards, fairness checks and shadow deployment.
- MLOps pipeline project structureFor engineers who can train a model and now need the training to be a pipeline anyone can rerun, review and release. A uv workspace holds the pipeline package (prepare, validate, featurize, train, evaluate, register steps run by DVC), a small shared feature package, and a separate FastAPI prediction service that loads models from the MLflow registry by alias. It grows into CI that reproduces the pipeline on pull requests, scheduled retraining, approved promotion and monitoring.
Career questions
See all- My machine learning projects never leave a Jupyter notebook. How do I learn to deploy a model?Move the notebook code into a small Python package, save the whole preprocessing and model pipeline, put it behind a FastAPI endpoint in a Docker container and deploy it. Then add what makes it production: tracked runs, a registry, a test in CI, prediction logging and a drift check. Start with batch predictions if you can.
- How do I become an MLOps engineer?MLOps engineers keep models working in production: packaging, versioning, pipelines, serving, CI/CD and monitoring. Come in from either software or DevOps with ML basics, or from ML with engineering habits. Learn the lifecycle in order, then prove it with one model you deploy, monitor and roll back yourself.
- Should I learn AI and machine learning, or become a strong software engineer first?For most people, become a solid software engineer first, then add AI on top. Most AI jobs today are engineering jobs: building products around models, data pipelines and APIs. Research-heavy machine learning is a different path that needs strong maths and usually a postgraduate degree.
Cheat sheets
See all- Machine learning cheat sheetData, models, deep learning.
- PyTorch cheat sheetTensors, autograd, nn.Module, training loops, data loading, GPUs, mixed precision, torch.compile, DDP and export in PyTorch.
- Hugging Face cheat sheetThe Hub, transformers, tokenisers, datasets, fine-tuning, LoRA, quantisation, inference and embeddings with the Hugging Face libraries.
Work with me
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.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com