File size: 283 Bytes
094cb16 |
1 2 3 4 5 6 7 8 9 10 |
import torch
from safetensors import safe_open
from safetensors.torch import save_file
for d in [1, 2]:
print(d)
model = torch.load(f"pytorch_model-0000{d}-of-00002.bin")
print("loaded", d, len(model))
save_file(model, f"pytorch_model-0000{d}-of-00002.safetensors")
|