r/deeplearning • u/Jumbledsaturn52 • 10h ago
Can a gpt model predict the same token again?
I recently coded trained a gpt model from scratch after lots and lots of debugging and when I test it with some input worlds , I can see some correct grammar prediction but , it also sometimes predicts words twice in a row like "this is is ..."
Is this normal for a gpt model , or did I do something wrong while creating it?
Model Specifications -
•Dataset used- tiny Shakespeare
•attention head blocks used -16
•number of gpt blocks -12
•using nn.parameterlist with the above values to loop the calculation for each block.
Here is my code if needed-
2
u/Full-World8839 10h ago
Hey, first congratulations on training a model! I did something similar and it was a great feeling! It's tiny so looping is normal. Maybe under trained? What was the size of the dataset. Work to chinchilla rule. What was your final train/Val loss? Could be greedy sampling. What is your temp and top k. Check out other similar models on HF. It happens to everyone! If your GPU allows it you could always move on to llama or mamba with your own dataset!