https://github.com/huggingface/transformers/blob/1f0b490a2c42eb129dccc69031ccb537058689c4/examples/pytorch/language-modeling/run_clm_no_trainer.py#L311 `w+` mode will truncate the file to zero length. Also, https://github.com/huggingface/transformers/blob/1f0b490a2c42eb129dccc69031ccb537058689c4/examples/pytorch/language-modeling/run_clm_no_trainer.py#L314 the file cannot be iterated over twice.