To expand on the other comment, if you look under the data folder in nanoGPT, you can see examples of how to train the model using various data sources and encoders. "shakespeare_char" is probably the most rudimentary, only converting the characters of the input into integers.
e.g. https://github.com/karpathy/nanoGPT/blob/master/data/shakesp...