What is the 'attention mechanism' in transformer-based models?
-
A
A method to prune unimportant neurons
-
B
A mechanism that computes weighted relationships between all positions in a sequence
-
C
A technique for data augmentation in NLP
-
D
A regularization method for language models