mtasic85 commited on
Commit
6aa783f
1 Parent(s): d4d6807

safetensors model

Browse files
out/converted_model/config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2450dd7b3d4f2ac3e0d1d68ffd0275c88374354adf0ebe8519c682d2306dc3ed
3
+ size 715
out/converted_model/model.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:917083108aebdf999483d240272412d42a8cd47ebab1059ab8bd96ff10d2b002
3
+ size 66562045
out/converted_model/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85e0d90b050e8b65afa291dca4f06938140338f35d30aeac77d96838efa33c7d
3
+ size 66551672
scripts/TRAIN.md CHANGED
@@ -47,11 +47,10 @@ cp config.json out/converted_model/
47
 
48
  ```python
49
  import torch
50
- from transformers import AutoModel
51
 
52
- state_dict = torch.load('out/converted_model/model.pth')
53
- model = AutoModel.from_pretrained('TinyLlama/TinyLlama_v1.1', state_dict=state_dict, ignore_mismatched_sizes=True)
54
- model.save_pretrained('out/converted_model/')
55
  ```
56
 
57
  ## Evaluate
 
47
 
48
  ```python
49
  import torch
50
+ from safetensors.torch import save_file
51
 
52
+ state_dict = torch.load('out/converted_model/model.pth', map_location='cpu')
53
+ save_file(state_dict, 'out/converted_model/model.safetensors')
 
54
  ```
55
 
56
  ## Evaluate