mtasic85 commited on
Commit
7e65b5b
1 Parent(s): 1450610
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
scripts/requirements-lit.in DELETED
@@ -1,11 +0,0 @@
1
- # pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
2
- tqdm
3
- datasets
4
- jinja2
5
- transformers
6
- bitsandbytes
7
- wandb
8
- # litgpt[all]
9
- litgpt[all] @ git+https://github.com/Lightning-AI/litgpt.git
10
- litdata
11
- grokadamw
 
 
 
 
 
 
 
 
 
 
 
 
scripts/requirements.in CHANGED
@@ -4,4 +4,8 @@ datasets
4
  jinja2
5
  transformers
6
  bitsandbytes
7
- wandb
 
 
 
 
 
4
  jinja2
5
  transformers
6
  bitsandbytes
7
+ wandb
8
+ # litgpt[all]
9
+ litgpt[all] @ git+https://github.com/Lightning-AI/litgpt.git
10
+ litdata
11
+ grokadamw