yujiepan commited on
Commit
56c6cd4
·
verified ·
1 Parent(s): 6db29ac

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +7 -0
  2. model.safetensors +2 -2
README.md CHANGED
@@ -169,6 +169,13 @@ with torch.no_grad():
169
  torch.nn.init.normal_(p, 0, 0.1)
170
  print(name, p.shape)
171
  model.save_pretrained(save_folder)
 
 
 
 
 
 
 
172
  ```
173
 
174
  ### Printing the model:
 
169
  torch.nn.init.normal_(p, 0, 0.1)
170
  print(name, p.shape)
171
  model.save_pretrained(save_folder)
172
+ # print(list(model.state_dict().keys()))
173
+ # there is some bug in model.save_pretrained... Re-save the model weights here.
174
+ import safetensors.torch
175
+ safetensors.torch.save_file(
176
+ tensors=model.state_dict(),
177
+ filename=f"{save_folder}/model.safetensors"
178
+ )
179
  ```
180
 
181
  ### Printing the model:
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20016f8717edbf11d8a2cfbfc65f4c83548cefddfb7f5828332d37911c44f0bb
3
- size 4324560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39846bd3215ea587e1858ec5be2ee0b47cc7af99d941237ad52165abbfa8d18c
3
+ size 3805256