How to load weights which was trained older version of PyTorch?

using torch.save(model.state_dict(), os.path.join(output_dir, ‘pytorch_model.bin’), _use_new_zipfile_serialization=False) instead of model.save_pretrained() or trainer.save_model()

4 Likes