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
ValueError: You are trying to save a non contiguous tensor: `tapas.encoder.layer.0.attention.self.query.weight` which is not allowed. It either means you are trying to save tensors which are reference of each other in which case it's recommended to save only the full tensors, and reslice at load time, or simply call `.contiguous()` on your tensor to pack it before saving.
I'm not sure exactly what's going on, but when reverting this commit, it saves successfully.
Is there any way to disable superfast init as a workaround?
Expected behavior
Saving a pretrained pipeline should not fail with an exception.
The text was updated successfully, but these errors were encountered:
I got around the issue eventually by loading the model separately from the pipeline and specifying low_cpu_mem_usage=True, but I'm still curious what the problem is
@daniellok-db Could you try adding _supports_param_buffer_assignment = False to the pretrained model class? If this works, would you like to open a PR to add this? This way you get the github contribution
cc @muellerzr Could you look into why this wasn't caught for this model? We'll want to make sure all the models are load/save compatible before the next release
System Info
transformers
version: 4.43.0.dev0 (installed from source)Who can help?
@muellerzr @amyeroberts
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Run the following script (just saving and loading a pipeline)
this gives the exception:
I'm not sure exactly what's going on, but when reverting this commit, it saves successfully.
Is there any way to disable superfast init as a workaround?
Expected behavior
Saving a pretrained pipeline should not fail with an exception.
The text was updated successfully, but these errors were encountered: