A small network applied to each position: a linear layer, an activation, and another linear layer.
In ML papers
FFN or MLP in a formula stands for a whole sub-network, usually defined once in the paper: two linear layers with an activation between them. In the Transformer (Vaswani et al. 2017) it is max(0,xW1+b1)W2+b2, applied to each token's vector separately and identically.
The inner width is usually about 4 times the model width (dmodel=512, dff=2048 in the original). Newer models swap ReLU for GELU or use a gated form such as SwiGLU (SiLU / Swish (and SwiGLU)). When a paper writes MLP without defining it, assume this shape with some activation.
How to type it
LaTeX
Shows
\operatorname{FFN}(\mathbf{x})
FFN(x)
\operatorname{MLP}(\mathbf{x})
MLP(x)
A worked example
x∈R512→R2048→R512
Each token goes up to 2048 features, through the activation, and back down to 512.
Common confusions
It is a function with its own weights, not a product of the letters F⋅F⋅N (Multi-letter names).