xcx0902 commited on
Commit
0936846
·
verified ·
1 Parent(s): 513b89c

Upload folder using huggingface_hub

Browse files
tiny_llm_hidden2048.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5481b650342e9e5c9cb60053e6e9b4b7f3a1797f270efda94a167cda71c31e94
3
+ size 17810136
to_safetensor.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import torch
3
+ from safetensors.torch import save_file
4
+
5
+ parameters = json.loads(open("parameter.json").read())
6
+ model_path = parameters["model_path"]
7
+
8
+ model = torch.load(model_path, weights_only=False)
9
+ save_file(model.state_dict(), model_path.rstrip(".pth") + ".safetensors")