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.You forget the causal mask and train on uniformly random tokens. What does the training loss do?
3.You leave out self.lm_head.weight = self.tok_emb.weight in GPT-2 small. What changes?
4.Your loss uses reduction="sum" and the batch is (2, 12). What does it report at initialization?
5.block_size is 16, there's no length check, and a batch arrives with 17 tokens. What happens on a CPU?