http://bactra.org/notebooks/nn-attention-and-transformers.ht...
Definitely read through to the last section.