train
Browse files- scripts/TRAIN.md +3 -4
- scripts/requirements-lit.in +0 -11
- scripts/requirements.in +5 -1
scripts/TRAIN.md
CHANGED
@@ -47,11 +47,10 @@ cp config.json out/converted_model/
|
|
47 |
|
48 |
```python
|
49 |
import torch
|
50 |
-
from
|
51 |
|
52 |
-
state_dict = torch.load('out/converted_model/model.pth')
|
53 |
-
|
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
|