29/29
Part 5 of 5 · How big is itCheck yourself
Check yourself
5 questions
  1. 1.Your GPT has no position embeddings, and you feed it six copies of token 3. How do the logits at positions 1 and 4 compare?

  2. 2.You forget the causal mask and train on uniformly random tokens. What does the training loss do?

  3. 3.You leave out self.lm_head.weight = self.tok_emb.weight in GPT-2 small. What changes?

  4. 4.Your loss uses reduction="sum" and the batch is (2, 12). What does it report at initialization?

  5. 5.block_size is 16, there's no length check, and a batch arrives with 17 tokens. What happens on a CPU?

That's the lesson.Next lesson: The KV cache
Now the problem this lesson builds to: 03 A GPT from scratch (PyTorch)Practice it