Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
killbill007
/
backup
like
0
ONNX
Safetensors
License:
apache-2.0
Model card
Files
Files and versions
xet
Community
4608d57
backup
/
scripts
/
utils
/
safetensor_helper.py
killbill007
Upload 754 files
93871a1
verified
over 1 year ago
raw
Copy download link
history
blame
198 Bytes
def
load_x_from_safetensor
(
checkpoint, key
):
x_generator = {}
for
k,v
in
checkpoint.items():
if
key
in
k:
x_generator[k.replace(key+
'.'
,
''
)] = v
return
x_generator