Language modeling and text generation with n-gram models and a decoder-only Transformer, implemented in Pytorch.