Error after 501 steps

I’m trying to finetune a text generation model but it keeps getting an error after 501 steps. Not sure how to resolve this.
TypeError: cannot unpack non-iterable NoneType object