--debug underflow_overflow
to the normal command line arguments, or pass debug="underflow_overflow" when creating the
[TrainingArguments] object.
If you're using your own training loop or another Trainer you can accomplish the same with:
thon
from transformers.debug_utils import DebugUnderflowOverflow
debug_overflow = DebugUnderflowOverflow(model)