A Transformer is a neural network architecture that processes sequences by learning which parts of the input to pay attention to. The architecture has two main blocks:


Encoder: reads and understands the input
Decoder: generates the output


We are going to start building each component of transformers one by one.




Task 1: Input...