Pretrain gpt2 example

Are there any docs or notebooks that show how to train GPT2 from scratch with a custom text corpus?