Not a complete answer, but here are the most helpful resources for understanding transformer basics in particular: Original transformer paper: https://arxiv.org/abs/1706.03762 Illustrated transformer: http://jalammar.github.io/illustrated-transformer/ Transformer visualization: https://bbycroft.net/llm minGPT (Karpathy): https://github.com/karpathy/minGPT --- Next, some foundational textbooks for general ML and deep…
"Elements" is a great reference book, but it isn't really a textbook. There's a popular introductory textbook by some of the same authors called "An Introduction to Statistical Learning", which focuses on applications but elides a lot of the mathematical details.