Model save
Browse files- README.md +69 -0
- all_results.json +9 -0
- generation_config.json +8 -0
- train_results.json +9 -0
- trainer_state.json +132 -0
README.md
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: Rudra-ai/Llama-3.2-3B-Instruct-cot-19-11-1
|
3 |
+
library_name: transformers
|
4 |
+
model_name: Llama-3.2-3B-Instruct-cot-19-11-2
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- trl
|
8 |
+
- dpo
|
9 |
+
- unsloth
|
10 |
+
licence: license
|
11 |
+
---
|
12 |
+
|
13 |
+
# Model Card for Llama-3.2-3B-Instruct-cot-19-11-2
|
14 |
+
|
15 |
+
This model is a fine-tuned version of [Rudra-ai/Llama-3.2-3B-Instruct-cot-19-11-1](https://huggingface.co/Rudra-ai/Llama-3.2-3B-Instruct-cot-19-11-1).
|
16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
17 |
+
|
18 |
+
## Quick start
|
19 |
+
|
20 |
+
```python
|
21 |
+
from transformers import pipeline
|
22 |
+
|
23 |
+
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?"
|
24 |
+
generator = pipeline("text-generation", model="Rudra-ai/Llama-3.2-3B-Instruct-cot-19-11-2", device="cuda")
|
25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
26 |
+
print(output["generated_text"])
|
27 |
+
```
|
28 |
+
|
29 |
+
## Training procedure
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
This model was trained with DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290).
|
34 |
+
|
35 |
+
### Framework versions
|
36 |
+
|
37 |
+
- TRL: 0.12.1
|
38 |
+
- Transformers: 4.46.1
|
39 |
+
- Pytorch: 2.4.1+cu124
|
40 |
+
- Datasets: 3.1.0
|
41 |
+
- Tokenizers: 0.20.3
|
42 |
+
|
43 |
+
## Citations
|
44 |
+
|
45 |
+
Cite DPO as:
|
46 |
+
|
47 |
+
```bibtex
|
48 |
+
@inproceedings{rafailov2023direct,
|
49 |
+
title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
|
50 |
+
author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
|
51 |
+
year = 2023,
|
52 |
+
booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023},
|
53 |
+
url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
|
54 |
+
editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
|
55 |
+
}
|
56 |
+
```
|
57 |
+
|
58 |
+
Cite TRL as:
|
59 |
+
|
60 |
+
```bibtex
|
61 |
+
@misc{vonwerra2022trl,
|
62 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
63 |
+
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},
|
64 |
+
year = 2020,
|
65 |
+
journal = {GitHub repository},
|
66 |
+
publisher = {GitHub},
|
67 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
68 |
+
}
|
69 |
+
```
|
all_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 0.0,
|
4 |
+
"train_loss": 2.0509657764434817,
|
5 |
+
"train_runtime": 2877.0971,
|
6 |
+
"train_samples": 2000,
|
7 |
+
"train_samples_per_second": 0.695,
|
8 |
+
"train_steps_per_second": 0.017
|
9 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token_id": 128000,
|
3 |
+
"do_sample": true,
|
4 |
+
"max_length": 131072,
|
5 |
+
"temperature": 0.6,
|
6 |
+
"top_p": 0.9,
|
7 |
+
"transformers_version": "4.46.1"
|
8 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 1.0,
|
3 |
+
"total_flos": 0.0,
|
4 |
+
"train_loss": 2.0509657764434817,
|
5 |
+
"train_runtime": 2877.0971,
|
6 |
+
"train_samples": 2000,
|
7 |
+
"train_samples_per_second": 0.695,
|
8 |
+
"train_steps_per_second": 0.017
|
9 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.0,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 50,
|
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.02,
|
13 |
+
"grad_norm": 2673.435546875,
|
14 |
+
"learning_rate": 2.0000000000000003e-06,
|
15 |
+
"logits/chosen": 0.6171875,
|
16 |
+
"logits/rejected": 0.294921875,
|
17 |
+
"logps/chosen": -414.0,
|
18 |
+
"logps/rejected": -478.0,
|
19 |
+
"loss": 6.9141,
|
20 |
+
"rewards/accuracies": 0.0,
|
21 |
+
"rewards/chosen": 0.0,
|
22 |
+
"rewards/margins": 0.0,
|
23 |
+
"rewards/rejected": 0.0,
|
24 |
+
"step": 1
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"epoch": 0.2,
|
28 |
+
"grad_norm": 368.8966369628906,
|
29 |
+
"learning_rate": 9.698463103929542e-06,
|
30 |
+
"logits/chosen": 0.58203125,
|
31 |
+
"logits/rejected": 0.41015625,
|
32 |
+
"logps/chosen": -370.0,
|
33 |
+
"logps/rejected": -496.0,
|
34 |
+
"loss": 3.4334,
|
35 |
+
"rewards/accuracies": 0.7666666507720947,
|
36 |
+
"rewards/chosen": -3.03125,
|
37 |
+
"rewards/margins": 6.5,
|
38 |
+
"rewards/rejected": -9.5625,
|
39 |
+
"step": 10
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"epoch": 0.4,
|
43 |
+
"grad_norm": 122.28874969482422,
|
44 |
+
"learning_rate": 7.500000000000001e-06,
|
45 |
+
"logits/chosen": 0.8984375,
|
46 |
+
"logits/rejected": 0.75390625,
|
47 |
+
"logps/chosen": -560.0,
|
48 |
+
"logps/rejected": -832.0,
|
49 |
+
"loss": 2.7651,
|
50 |
+
"rewards/accuracies": 0.9700000286102295,
|
51 |
+
"rewards/chosen": -20.25,
|
52 |
+
"rewards/margins": 23.25,
|
53 |
+
"rewards/rejected": -43.5,
|
54 |
+
"step": 20
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"epoch": 0.6,
|
58 |
+
"grad_norm": 270.5760498046875,
|
59 |
+
"learning_rate": 4.131759111665349e-06,
|
60 |
+
"logits/chosen": 1.1015625,
|
61 |
+
"logits/rejected": 0.93359375,
|
62 |
+
"logps/chosen": -560.0,
|
63 |
+
"logps/rejected": -808.0,
|
64 |
+
"loss": 1.6426,
|
65 |
+
"rewards/accuracies": 1.0,
|
66 |
+
"rewards/chosen": -19.75,
|
67 |
+
"rewards/margins": 21.25,
|
68 |
+
"rewards/rejected": -41.0,
|
69 |
+
"step": 30
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"epoch": 0.8,
|
73 |
+
"grad_norm": 198.14657592773438,
|
74 |
+
"learning_rate": 1.1697777844051105e-06,
|
75 |
+
"logits/chosen": 1.109375,
|
76 |
+
"logits/rejected": 0.91015625,
|
77 |
+
"logps/chosen": -500.0,
|
78 |
+
"logps/rejected": -780.0,
|
79 |
+
"loss": 0.3845,
|
80 |
+
"rewards/accuracies": 0.9800000190734863,
|
81 |
+
"rewards/chosen": -16.625,
|
82 |
+
"rewards/margins": 20.875,
|
83 |
+
"rewards/rejected": -37.5,
|
84 |
+
"step": 40
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"epoch": 1.0,
|
88 |
+
"grad_norm": 122.92610931396484,
|
89 |
+
"learning_rate": 0.0,
|
90 |
+
"logits/chosen": 1.0625,
|
91 |
+
"logits/rejected": 0.75,
|
92 |
+
"logps/chosen": -520.0,
|
93 |
+
"logps/rejected": -836.0,
|
94 |
+
"loss": 1.6812,
|
95 |
+
"rewards/accuracies": 0.9800000190734863,
|
96 |
+
"rewards/chosen": -17.125,
|
97 |
+
"rewards/margins": 24.5,
|
98 |
+
"rewards/rejected": -41.75,
|
99 |
+
"step": 50
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"epoch": 1.0,
|
103 |
+
"step": 50,
|
104 |
+
"total_flos": 0.0,
|
105 |
+
"train_loss": 2.0509657764434817,
|
106 |
+
"train_runtime": 2877.0971,
|
107 |
+
"train_samples_per_second": 0.695,
|
108 |
+
"train_steps_per_second": 0.017
|
109 |
+
}
|
110 |
+
],
|
111 |
+
"logging_steps": 10,
|
112 |
+
"max_steps": 50,
|
113 |
+
"num_input_tokens_seen": 0,
|
114 |
+
"num_train_epochs": 1,
|
115 |
+
"save_steps": 100,
|
116 |
+
"stateful_callbacks": {
|
117 |
+
"TrainerControl": {
|
118 |
+
"args": {
|
119 |
+
"should_epoch_stop": false,
|
120 |
+
"should_evaluate": false,
|
121 |
+
"should_log": false,
|
122 |
+
"should_save": true,
|
123 |
+
"should_training_stop": true
|
124 |
+
},
|
125 |
+
"attributes": {}
|
126 |
+
}
|
127 |
+
},
|
128 |
+
"total_flos": 0.0,
|
129 |
+
"train_batch_size": 1,
|
130 |
+
"trial_name": null,
|
131 |
+
"trial_params": null
|
132 |
+
}
|