Split into h heads, run scaled dot-product attention per head with an optional causal mask, concatenate the heads, and apply an output projection.