the.ai

Architecture / Blocks

verified

Feed-Forward Network

Attention decides which tokens a position should look at. The feed-forward network is what the position does with what it found — a small two-layer network applied to each position independently. Attention moves information between positions; the feed-forward block thinks about it in place.

Viz primitive · budget-splitd-model = 512 · d-ff = 1024

d-ff holds 33% of the budget; rest holds the remaining 67%.

Share of a transformer block's parameters held by the feed-forward layer, against the attention it sits beside. Drag d_ff up to the conventional 4× d_model and the feed-forward side takes two thirds of the block.

Attention costs about 4·d_model² in projections; the feed-forward layer costs about 2·d_model·d_ff. The split is d_ff / (d_ff + 2·d_model) — at d_ff = 4·d_model that is exactly 4/6, which is where the two-thirds figure comes from.

1024

Reviewed by opendroid · 2026-08-01