eval
Browse files- scripts/TRAIN.md +18 -1
scripts/TRAIN.md
CHANGED
@@ -39,8 +39,25 @@ pip install -U -r requirements-lit.in
|
|
39 |
litgpt pretrain --config ./model.yaml
|
40 |
```
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
## Evaluate
|
43 |
|
44 |
```bash
|
45 |
-
litgpt evaluate --tasks 'hellaswag,gsm8k,truthfulqa_mc2,mmlu,winogrande,arc_challenge' --batch_size 8 out/pretrain/final/
|
|
|
|
|
46 |
```
|
|
|
39 |
litgpt pretrain --config ./model.yaml
|
40 |
```
|
41 |
|
42 |
+
```bash
|
43 |
+
litgpt convert_from_litgpt out/pretrain/final/ out/converted_model
|
44 |
+
cp config.json out/pretrain/final/
|
45 |
+
cp config.json out/converted_model/
|
46 |
+
```
|
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
|
58 |
|
59 |
```bash
|
60 |
+
# litgpt evaluate --tasks 'hellaswag,gsm8k,truthfulqa_mc2,mmlu,winogrande,arc_challenge' --batch_size 8 out/pretrain/final/
|
61 |
+
|
62 |
+
litgpt evaluate --tasks 'hellaswag,gsm8k,truthfulqa_mc2,mmlu,mmlu_pro,winogrande,arc_challenge,leaderboard,ifeval,mgsm_direct,mathqa,gpqa' --batch_size 8 out/pretrain/final/
|
63 |
```
|