In transformer-based models, what is the role of the feed-forward sublayer that follows multi-head attention in each encoder block?
-
A
To compute cross-attention with the decoder
-
B
To apply a position-wise non-linear transformation independently to each token
-
C
To reduce sequence length via pooling
-
D
To convert token embeddings to one-hot vectors