candle-mistral / convert.py
lmz's picture
Upload 4 files
094cb16
raw
history blame contribute delete
283 Bytes
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")