We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae5cb30 commit e846b1cCopy full SHA for e846b1c
src/transformers/modeling_utils.py
@@ -3667,7 +3667,8 @@ def save_pretrained(
3667
for key, value in state_dict.items():
3668
if hasattr(value, "_local_tensor"):
3669
gathered_state_dict[key] = value.to_local()
3670
- gathered_state_dict[key] = value
+ else:
3671
+ gathered_state_dict[key] = value
3672
3673
del state_dict
3674
state_dict = gathered_state_dict
0 commit comments