---
title: "Transformer architecture"
description: "Assembling the full block: attention, residual connections, layer norm, and the feed-forward MLP, stacked N times between an embedding layer and an output"
canonical_url: "https://fanout.sh/ai-engineering/lessons/transformer-architecture"
md_url: "https://fanout.sh/ai-engineering/lessons/transformer-architecture.md"
access: "public"
---

# Transformer architecture

Assembling the full block: attention, residual connections, layer norm, and the feed-forward MLP, stacked N times between an embedding layer and an output

## Public overview

Assembling the full block: attention, residual connections, layer norm, and the feed-forward MLP, stacked N times between an embedding layer and an output head. Why residuals make deep stacks trainable, and how the decoder-only variant became the template for essentially every modern LLM.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
