ML systems
0 of 18 steps read
Evolution
Foundations
Automatic differentiation, layers, optimizers and GPU operations, each built from scratch into a small deep learning library. In English.
CMU· 2026Frameworks and kernels
Eager PyTorch is flexible but hard to compile, so TorchDynamo captures graphs from ordinary Python bytecode and TorchInductor compiles them to Triton and C++.
Meta· 2024Fast CUDA kernels need expert tuning, so Triton lets you write them in Python over blocks while the compiler handles memory and scheduling.
OpenAI· 2021Attention is bound by GPU memory traffic, so FlashAttention computes it tile by tile in on-chip SRAM.
Stanford· 2022Distributed training
Data-parallel training waits on gradient sync, so PyTorch DDP all-reduces gradients in buckets while the backward pass is still running.
Meta· 2020Data parallelism copies all model state to every GPU, so ZeRO shards optimizer state, gradients and weights across workers.
Microsoft· 2019Large models need more than data parallelism, and this playbook explains tensor, context, pipeline and expert parallelism and how to combine them.
Hugging Face· 2025Serving
KV cache fragmentation capped serving batch sizes, so vLLM's PagedAttention stores the cache in fixed-size blocks like OS pages.
UC Berkeley· 2023Each generated token needs a full pass of the large model, so a small model drafts tokens and the large model verifies them together, with unchanged output.
Google· 2022Large models are too big to serve cheaply, so GPTQ quantizes their weights to a few bits after training using second-order error correction.
IST Austria· 2022Prefill and decoding interfere when batched together, so DistServe runs them on separate GPUs, each with its own parallelism.
Peking University· 2024Case study: recommendation
Scoring every video per request is impossible, so YouTube splits recommendation into a candidate generation network and a ranking network.
Google· 2016Recommendation models are dominated by huge embedding tables, so DLRM shards them with model parallelism and replicates the MLPs with data parallelism.
Meta· 2019Aggregated features lose the order and detail of user events, so Meta's ads models embed each event and pool the sequence with attention.
Meta· 2024Feature-heavy recommenders stop improving with more compute, so HSTU recasts recommendation as generative sequence transduction that scales like an LLM.
Meta· 2024Sequence recommenders at LLM scale waste GPUs on padding and exposed communication, so GEM training uses jagged attention and topology-aware parallelism.
Meta· 2026Case study: search
Term matching misses semantically related results, so Facebook Search adds embedding retrieval and serves ANN inside its existing inverted index.
Meta· 2020Vector search trades accuracy, speed and memory, and the Faiss paper maps that space through compression codecs, inverted-file indexes and graph indexes.
Meta· 2024