Architecture Hyperparameters › Architecture Hyperparameters

Michael BrenndoerferUpdated June 18, 20251 min read
Language AI HandbookAll chapters
Part 16 of 67Transformer Architectures
Chapter 116Architecture Hyperparameters › Architecture Hyperparameters
Reading section 1 of 10 · Architecture Hyperparameters · 1 minSection 1 of 10 · 1 min

Book contents

Section 1 of 10 · 1 min read

Architecture Hyperparameters › Architecture HyperparametersOne section · Sections in this chapter1 / 10 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Building a transformer is like designing a building: you must decide how tall to make it, how wide each floor should be, and how to allocate space between different rooms. These architectural decisions, the hyperparameters of transformer design, determine everything from model capacity to training dynamics to inference speed. Get them wrong, and your model might train slowly, underperform, or consume excessive memory. Get them right, and the model can reach its target performance without wasting compute or memory.

This chapter explores the key architectural hyperparameters: model depth versus width trade-offs, the number of attention heads, feed-forward network dimensions, and how these choices interact. We'll derive formulas for calculating total parameters, examine how successful models like GPT and BERT, along with LLaMA, made these decisions, and develop intuition for designing architectures tailored to specific constraints.