ffn

1 posts

Understanding Attention and Transformers from Scratch

Transformer FFN: every token runs its own tiny MLP

Attention mixes information between tokens; the FFN transforms each token independently. This article explains where the FFN sits in a Transformer block, position-wise computation, the 4x expansion, GELU/SwiGLU, parameter counts, and why the FFN often holds most of a layer's parameters.

Want to leave a message?

Technical questions, feedback and leads: use the guestbook.

Guestbook →