模型转换

#2
by chenbangdong - opened

请问如何将model.safetensors转化为pytorch_model.bin?
按照这种方式转换合理吗? 对应的config.json需要修改吗?
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen1.5-1.8B-Chat")
torch.save(model.state_dict(), '/Qwen1.5-1.8B-Chat/pytorch_model.bin')

Sign up or log in to comment