Building: the videos/tutorials from Andrej Karpathy in Python [3] are considered to be very good at building and understanding the basics, from a small/toy neural network engine to transformers and tokenizers.
There was a post here a few weeks ago [4] on reasoning models using Python/PyTorch with links to an older series on non-reasoning transformers.
[1] https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_6700...
[2] https://www.youtube.com/@WelchLabs/videos