This might be of use

https://github.com/raiyanyahya/how-to-train-your-gpt