Skip to content

Commit

Permalink
Fix safe open. (#8422)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHUI committed May 13, 2024
1 parent 6bd2b0d commit fe6277f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/utils/safetensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def nbytes(self):

# a simple file writer object
class fast_safe_open:
def __init__(self, filename, framework=None):
def __init__(self, filename, framework=None, device="cpu"):
self.filename = filename
self.framework = framework
self.file = open(self.filename, "rb")
Expand Down

0 comments on commit fe6277f

Please sign in to comment.