 The self-attention mechanism takes in a set of input encodings from the previous encoder and weighs their relevance to each other to generate a set of output encodings.The feed-forward neural network then further processes each output encoding individually.These output encodings are finally passed to the next encoder as its input, as well as the decoders.