Model save
Browse files- README.md +57 -0
- all_results.json +9 -0
- runs/Nov29_08-03-41_RLHF000/events.out.tfevents.1732867429.RLHF000.552686.0 +2 -2
- train_results.json +9 -0
- trainer_state.json +106 -0
README.md
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: meta-llama/Meta-Llama-3.1-8B-Instruct
|
3 |
+
library_name: transformers
|
4 |
+
model_name: llama-sft-qlora
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- trl
|
8 |
+
- sft
|
9 |
+
licence: license
|
10 |
+
---
|
11 |
+
|
12 |
+
# Model Card for llama-sft-qlora
|
13 |
+
|
14 |
+
This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct).
|
15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
16 |
+
|
17 |
+
## Quick start
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
+
|
22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
23 |
+
generator = pipeline("text-generation", model="fenguhao/llama-sft-qlora", device="cuda")
|
24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
25 |
+
print(output["generated_text"])
|
26 |
+
```
|
27 |
+
|
28 |
+
## Training procedure
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
This model was trained with SFT.
|
33 |
+
|
34 |
+
### Framework versions
|
35 |
+
|
36 |
+
- TRL: 0.12.1
|
37 |
+
- Transformers: 4.46.3
|
38 |
+
- Pytorch: 2.5.1
|
39 |
+
- Datasets: 3.1.0
|
40 |
+
- Tokenizers: 0.20.3
|
41 |
+
|
42 |
+
## Citations
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
Cite TRL as:
|
47 |
+
|
48 |
+
```bibtex
|
49 |
+
@misc{vonwerra2022trl,
|
50 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
51 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
|
52 |
+
year = 2020,
|
53 |
+
journal = {GitHub repository},
|
54 |
+
publisher = {GitHub},
|
55 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
56 |
+
}
|
57 |
+
```
|
all_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 5.19321114598441e+16,
|
4 |
+
"train_loss": 0.29687737567084177,
|
5 |
+
"train_runtime": 332.0278,
|
6 |
+
"train_samples": 9000,
|
7 |
+
"train_samples_per_second": 1.678,
|
8 |
+
"train_steps_per_second": 0.105
|
9 |
+
}
|
runs/Nov29_08-03-41_RLHF000/events.out.tfevents.1732867429.RLHF000.552686.0
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f99edd6daae5bc4bd9da8acd8638327cf11b39f5443fabcedb54d179e9b2680
|
3 |
+
size 9163
|
train_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 5.19321114598441e+16,
|
4 |
+
"train_loss": 0.29687737567084177,
|
5 |
+
"train_runtime": 332.0278,
|
6 |
+
"train_samples": 9000,
|
7 |
+
"train_samples_per_second": 1.678,
|
8 |
+
"train_steps_per_second": 0.105
|
9 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.0,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 35,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 0.02857142857142857,
|
13 |
+
"grad_norm": 1.1770261526107788,
|
14 |
+
"learning_rate": 5e-05,
|
15 |
+
"loss": 0.781,
|
16 |
+
"step": 1
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 0.14285714285714285,
|
20 |
+
"grad_norm": 0.7865971326828003,
|
21 |
+
"learning_rate": 0.00019948693233918952,
|
22 |
+
"loss": 0.6954,
|
23 |
+
"step": 5
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.2857142857142857,
|
27 |
+
"grad_norm": 0.3400590717792511,
|
28 |
+
"learning_rate": 0.00018207634412072764,
|
29 |
+
"loss": 0.4525,
|
30 |
+
"step": 10
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"epoch": 0.42857142857142855,
|
34 |
+
"grad_norm": 0.24245862662792206,
|
35 |
+
"learning_rate": 0.00014403941515576344,
|
36 |
+
"loss": 0.306,
|
37 |
+
"step": 15
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 0.5714285714285714,
|
41 |
+
"grad_norm": 0.23055194318294525,
|
42 |
+
"learning_rate": 9.493508311612874e-05,
|
43 |
+
"loss": 0.2153,
|
44 |
+
"step": 20
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.7142857142857143,
|
48 |
+
"grad_norm": 0.25304117798805237,
|
49 |
+
"learning_rate": 4.710359896730379e-05,
|
50 |
+
"loss": 0.1602,
|
51 |
+
"step": 25
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 0.8571428571428571,
|
55 |
+
"grad_norm": 0.2968534231185913,
|
56 |
+
"learning_rate": 1.2565338385541792e-05,
|
57 |
+
"loss": 0.1206,
|
58 |
+
"step": 30
|
59 |
+
},
|
60 |
+
{
|
61 |
+
"epoch": 1.0,
|
62 |
+
"grad_norm": 0.11835439503192902,
|
63 |
+
"learning_rate": 0.0,
|
64 |
+
"loss": 0.111,
|
65 |
+
"step": 35
|
66 |
+
},
|
67 |
+
{
|
68 |
+
"epoch": 1.0,
|
69 |
+
"eval_loss": 0.11065573990345001,
|
70 |
+
"eval_runtime": 10.7768,
|
71 |
+
"eval_samples_per_second": 5.66,
|
72 |
+
"eval_steps_per_second": 0.371,
|
73 |
+
"step": 35
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"epoch": 1.0,
|
77 |
+
"step": 35,
|
78 |
+
"total_flos": 5.19321114598441e+16,
|
79 |
+
"train_loss": 0.29687737567084177,
|
80 |
+
"train_runtime": 332.0278,
|
81 |
+
"train_samples_per_second": 1.678,
|
82 |
+
"train_steps_per_second": 0.105
|
83 |
+
}
|
84 |
+
],
|
85 |
+
"logging_steps": 5,
|
86 |
+
"max_steps": 35,
|
87 |
+
"num_input_tokens_seen": 0,
|
88 |
+
"num_train_epochs": 1,
|
89 |
+
"save_steps": 100,
|
90 |
+
"stateful_callbacks": {
|
91 |
+
"TrainerControl": {
|
92 |
+
"args": {
|
93 |
+
"should_epoch_stop": false,
|
94 |
+
"should_evaluate": false,
|
95 |
+
"should_log": false,
|
96 |
+
"should_save": true,
|
97 |
+
"should_training_stop": true
|
98 |
+
},
|
99 |
+
"attributes": {}
|
100 |
+
}
|
101 |
+
},
|
102 |
+
"total_flos": 5.19321114598441e+16,
|
103 |
+
"train_batch_size": 4,
|
104 |
+
"trial_name": null,
|
105 |
+
"trial_params": null
|
106 |
+
}
|