transformer encoder and decoder including position embeddings, MHA, and cross-attention mechanisms using NumPy. UC Berkeley CS assignment