Constructs next-character training pairs from one long sequence. For a chunk x = text[start:start+chunk_size], the label sequence y is shifted one character: text[start+1:start+1+chunk_size]. Each position therefore teaches the model to predict the following character. section 7.5.1
A practical construction follows these steps:
- Represent the corpus as one long string and map each character to a vocabulary index. section 7.5.1
Character-level Shakespeare data
A lowercased corpus of about 100,000 Shakespeare characters can use chunks of 250 characters. The input contains positions start through start+249; the labels contain the immediately following 250 positions. Fixed lengths avoid padded inputs and simplify GPU batching. section 7.5.1
