File size: 253 Bytes
d7b01dc |
1 2 3 4 5 6 7 |
from transformers import AutoModelForCausalLM
from safetensors.torch import save_file
model_path = "microsoft/phi-2"
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype="auto")
save_file(model.state_dict(), "ProTalkModel.safetensors")
|