Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardWooSJTU committed Dec 20, 2023
1 parent d5ab849 commit 340d6d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion paddlenlp/transformers/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,6 @@ def from_pretrained(cls, pretrained_model_name_or_path, *args, **kwargs):
use_safetensors=use_safetensors,
variant=variant,
)


# load pt weights early so that we know which dtype to init the model under
if not is_sharded and state_dict is None:
Expand Down
2 changes: 1 addition & 1 deletion paddlenlp/transformers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def _ndarray_to_tensor(obj, return_numpy=False):
return _parse_every_object(state_dict, _transformed_from_lodtensor, _ndarray_to_tensor)

else:

return paddle.load(path)


Expand Down

0 comments on commit 340d6d1

Please sign in to comment.