Loading lesson…
Level 1 · Apprentice0 XP
Train and validation splits, context windows, and inputs shifted by one.
Step 1 / 6
Problem"Predict the next token" sounds vague. In code, it is very precise: for every position in a window, the correct answer is the token that comes next.
← → step
Before this: Build a tokenizer
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Write a test that checks get_batch: shapes are (batch, block_size), y equals x shifted by one, and no window crosses the end of the data. Then print one decoded x and y pair.