You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Fine-tuning mt5 model, and trying to save the fine-tuned model is throwing a ValueError: You are trying to save a non contiguous tensor:
To Reproduce
Attaching a notebook to reproduce the issue: Colab
Expected behavior
Model.train() should train the model and should save the model to the output directory
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Run on google Colab
Select:
Since that time until now, the "workaround" I've been using is downgrading transformers to 4.42.4. Your explanation of the error added a lot of clarity, but I don't know if what I've been doing is satisfactory for the time being.
Describe the bug
Fine-tuning mt5 model, and trying to save the fine-tuned model is throwing a ValueError: You are trying to save a non contiguous tensor:
To Reproduce
Attaching a notebook to reproduce the issue: Colab
Expected behavior
Model.train() should train the model and should save the model to the output directory
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Run on google Colab
Select:
Cause of Error:
In the Hugging Face transformers repository, the PR #27064 - "Safetensors serialization by default" updates the save_pretrained() method in transformers/src/transformers/modeling_utils.py to set the safe_serialization argument to True by default. However, the simpletransformers library's model.train_model() function does not currently offer a way to pass a different value for safe_serialization to the save_pretrained() method, which limits control over this setting when saving models.
Please help me with a workaround to this issue
The text was updated successfully, but these errors were encountered: