For things regarding np.dot and perhaps torch.bmm Notebooks My own notebooks for nlp with transformers are included.