those frameworks are old but very popular.
The models that you and I are using require thousands of GPU's to complete a training run in 2 - 3 weeks. That adds up to millions of dollars in GPU rental cost.
This is covered a little bit in this book I read:
Build a Large Language Model (From Scratch): Raschka, Sebastian: 9781633437166: Amazon.com: Books https://share.google/7z5GA1OjKbg9esxz7
I used PyTorch to recreate GPT-2.