Back to the lesson libraryMECHANISM · 10 MIN
M15.4 CONNECT THE MECHANISM

Run several learned comparisons in parallel

GPT-2 small splits every attention layer into 12 heads of 64 numbers each. Trace the split, the concat, and the output projection, and count the 2.4 million weights involved.

LESSON OVERVIEW10 min lesson

Lesson overview

GPT-2 small splits every attention layer into 12 heads of 64 numbers each. Trace the split, the concat, and the output projection, and count the 2.4 million weights involved.

What you’ll explore

  • Compute per-head attention outputs, concatenate them, and apply the output projection; track head width (d_model = h·d_head) and projection parameters (4·d_model²) without treating heads as guaranteed named specialists.
Suggest a correction

A precise note can make an explanation better.

Choose the scene and describe what needs attention. Download a feedback file to share through a channel you already use. This page does not send feedback or connect you with a reviewer.

The file includes this note, the scene title, and lesson metadata. Your saved progress and quiz responses are excluded. Download before leaving or reloading to keep your note.