Transformers from Scratch (2021)
An early explainer of transformers, which is a quicker read, that I found very useful when they were still new to me, is The Illustrated Transformer[1], by Jay Alammar.A more recent academic but high-level explanation of transformers, very good for detail on the different flow flavors (e.g. encoder-decoder vs decoder only), is Formal Algorithms for Transformers[2], from DeepMind.[1] https://jalammar.github.io/illustrated-transformer/
[2] https://arxiv.org/abs/2207.09238