This Hugging Face article traces how tensor shapes flow through each layer of a decoder-only transformer, from tokenisation and embedding through masked multi-head attention, feed-forward networks, and the language model output head. The main focus is the multi-head attention layer, where dimensions are split into heads, processed independently, and recombined — a pattern that must be understood to debug shape mismatches and implement custom architectures. The walkthrough uses a concrete model with explicit dimension values at each step, making abstract tensor operations tangible.