Dive into Deep Learning · §5
Deep Learning Computation: From Prototype Code to Production Systems
module trees · parameter state · initialization · custom layers · numerics · checkpoints · GPUs · reproducibility
The Systems Challenge
128 GB floor): Storing 8B weights takes 16 GB in bfloat16, yet training with Adam in float32 requires 128 GB of parameters, gradients, and optimizer moments before computing a single activation.96 GB), safetensors vs. pickle RCE, synced GPU timers, and non-invasive layer hooks.Core Mental Model
safetensors serialization, dtype casting, GPU placement, and hooks all walk registered children recursively.Architectural & Systems Roadmap
__setattr__ registration, the 16\text{ B/param} fp32 Adam floor, weight tying, (1+g^2)^N residual variance scaling (g = 1/\sqrt{N}), RMSNorm, fixed buffers, and the Straight-Through Estimator.fp32 master weights with bf16/fp16 compute, zero-copy safetensors and 5-part atomic checkpoints, asynchronous GPU queues, O(\sqrt{K}) activation checkpointing, PRNG seeding, and forward/backward hooks.Quantitative Anchors
16 GB bf16 inference, 128 GB fp32 Adam training floor).96 GB checkpoints resume bit for bit.Study & Engineering Guide
Each section combines runnable multi-framework code with systems diagnostics that prevent silent training failures: