Model save
Browse files- README.md +52 -193
- all_results.json +4 -17
- train_results.json +4 -4
- trainer_state.json +0 -0
README.md
CHANGED
@@ -1,209 +1,68 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
type: obiwit/criteria-faireval
|
11 |
-
metrics:
|
12 |
-
- type: accuracy
|
13 |
-
value: 0.5402380952380952
|
14 |
---
|
15 |
|
16 |
-
# Model Card for
|
17 |
|
18 |
-
|
|
|
19 |
|
|
|
20 |
|
|
|
|
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
|
|
|
28 |
|
|
|
29 |
|
30 |
-
-
|
31 |
-
-
|
32 |
-
-
|
33 |
-
-
|
34 |
-
-
|
35 |
-
- **License:** [More Information Needed]
|
36 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
59 |
-
|
60 |
-
[More Information Needed]
|
61 |
-
|
62 |
-
### Out-of-Scope Use
|
63 |
-
|
64 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
65 |
-
|
66 |
-
[More Information Needed]
|
67 |
-
|
68 |
-
## Bias, Risks, and Limitations
|
69 |
-
|
70 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
71 |
-
|
72 |
-
[More Information Needed]
|
73 |
-
|
74 |
-
### Recommendations
|
75 |
-
|
76 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
77 |
-
|
78 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
79 |
-
|
80 |
-
## How to Get Started with the Model
|
81 |
-
|
82 |
-
Use the code below to get started with the model.
|
83 |
-
|
84 |
-
[More Information Needed]
|
85 |
-
|
86 |
-
## Training Details
|
87 |
-
|
88 |
-
### Training Data
|
89 |
-
|
90 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
91 |
-
|
92 |
-
[More Information Needed]
|
93 |
-
|
94 |
-
### Training Procedure
|
95 |
-
|
96 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
97 |
-
|
98 |
-
#### Preprocessing [optional]
|
99 |
-
|
100 |
-
[More Information Needed]
|
101 |
-
|
102 |
-
|
103 |
-
#### Training Hyperparameters
|
104 |
-
|
105 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
106 |
-
|
107 |
-
#### Speeds, Sizes, Times [optional]
|
108 |
-
|
109 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
110 |
-
|
111 |
-
[More Information Needed]
|
112 |
-
|
113 |
-
## Evaluation
|
114 |
-
|
115 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
116 |
-
|
117 |
-
### Testing Data, Factors & Metrics
|
118 |
-
|
119 |
-
#### Testing Data
|
120 |
-
|
121 |
-
<!-- This should link to a Dataset Card if possible. -->
|
122 |
-
|
123 |
-
[More Information Needed]
|
124 |
-
|
125 |
-
#### Factors
|
126 |
-
|
127 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Metrics
|
132 |
-
|
133 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
134 |
-
|
135 |
-
[More Information Needed]
|
136 |
-
|
137 |
-
### Results
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
#### Summary
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
## Model Examination [optional]
|
146 |
-
|
147 |
-
<!-- Relevant interpretability work for the model goes here -->
|
148 |
-
|
149 |
-
[More Information Needed]
|
150 |
-
|
151 |
-
## Environmental Impact
|
152 |
-
|
153 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
154 |
-
|
155 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
156 |
-
|
157 |
-
- **Hardware Type:** [More Information Needed]
|
158 |
-
- **Hours used:** [More Information Needed]
|
159 |
-
- **Cloud Provider:** [More Information Needed]
|
160 |
-
- **Compute Region:** [More Information Needed]
|
161 |
-
- **Carbon Emitted:** [More Information Needed]
|
162 |
-
|
163 |
-
## Technical Specifications [optional]
|
164 |
-
|
165 |
-
### Model Architecture and Objective
|
166 |
-
|
167 |
-
[More Information Needed]
|
168 |
-
|
169 |
-
### Compute Infrastructure
|
170 |
-
|
171 |
-
[More Information Needed]
|
172 |
-
|
173 |
-
#### Hardware
|
174 |
-
|
175 |
-
[More Information Needed]
|
176 |
-
|
177 |
-
#### Software
|
178 |
-
|
179 |
-
[More Information Needed]
|
180 |
-
|
181 |
-
## Citation [optional]
|
182 |
-
|
183 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
184 |
-
|
185 |
-
**BibTeX:**
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
**APA:**
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
-
|
193 |
-
## Glossary [optional]
|
194 |
-
|
195 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
196 |
-
|
197 |
-
[More Information Needed]
|
198 |
-
|
199 |
-
## More Information [optional]
|
200 |
-
|
201 |
-
[More Information Needed]
|
202 |
-
|
203 |
-
## Model Card Authors [optional]
|
204 |
-
|
205 |
-
[More Information Needed]
|
206 |
-
|
207 |
-
## Model Card Contact
|
208 |
-
|
209 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
+
base_model: CriteriaPO/llama3.2-3b-sft
|
3 |
+
library_name: transformers
|
4 |
+
model_name: llama3.2-3b-dpo-mini
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- trl
|
8 |
+
- dpo
|
9 |
+
licence: license
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
+
# Model Card for llama3.2-3b-dpo-mini
|
13 |
|
14 |
+
This model is a fine-tuned version of [CriteriaPO/llama3.2-3b-sft](https://huggingface.co/CriteriaPO/llama3.2-3b-sft).
|
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="obiwit/llama3.2-3b-dpo-mini", 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 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/bborges/CriteriaPreferences/runs/reql6e82)
|
31 |
|
32 |
+
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).
|
33 |
|
34 |
+
### Framework versions
|
35 |
|
36 |
+
- TRL: 0.12.2
|
37 |
+
- Transformers: 4.46.3
|
38 |
+
- Pytorch: 2.1.2+cu121
|
39 |
+
- Datasets: 3.1.0
|
40 |
+
- Tokenizers: 0.20.3
|
|
|
|
|
41 |
|
42 |
+
## Citations
|
43 |
|
44 |
+
Cite DPO as:
|
45 |
|
46 |
+
```bibtex
|
47 |
+
@inproceedings{rafailov2023direct,
|
48 |
+
title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
|
49 |
+
author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
|
50 |
+
year = 2023,
|
51 |
+
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},
|
52 |
+
url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
|
53 |
+
editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
|
54 |
+
}
|
55 |
+
```
|
56 |
|
57 |
+
Cite TRL as:
|
58 |
+
|
59 |
+
```bibtex
|
60 |
+
@misc{vonwerra2022trl,
|
61 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
62 |
+
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},
|
63 |
+
year = 2020,
|
64 |
+
journal = {GitHub repository},
|
65 |
+
publisher = {GitHub},
|
66 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
67 |
+
}
|
68 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all_results.json
CHANGED
@@ -1,22 +1,9 @@
|
|
1 |
{
|
2 |
"epoch": 0.9999360981532366,
|
3 |
-
"eval_logits/chosen": -2.921875,
|
4 |
-
"eval_logits/rejected": -3.078125,
|
5 |
-
"eval_logps/chosen": -296.0,
|
6 |
-
"eval_logps/rejected": -576.0,
|
7 |
-
"eval_loss": 0.27326104044914246,
|
8 |
-
"eval_rewards/accuracies": 0.8810483813285828,
|
9 |
-
"eval_rewards/chosen": -1.71875,
|
10 |
-
"eval_rewards/margins": 2.96875,
|
11 |
-
"eval_rewards/rejected": -4.6875,
|
12 |
-
"eval_runtime": 1472.2304,
|
13 |
-
"eval_samples": 55582,
|
14 |
-
"eval_samples_per_second": 37.702,
|
15 |
-
"eval_steps_per_second": 0.59,
|
16 |
"total_flos": 0.0,
|
17 |
-
"train_loss": 0.
|
18 |
-
"train_runtime":
|
19 |
"train_samples": 1001516,
|
20 |
-
"train_samples_per_second":
|
21 |
-
"train_steps_per_second": 0.
|
22 |
}
|
|
|
1 |
{
|
2 |
"epoch": 0.9999360981532366,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
"total_flos": 0.0,
|
4 |
+
"train_loss": 0.2718314818565587,
|
5 |
+
"train_runtime": 68698.2546,
|
6 |
"train_samples": 1001516,
|
7 |
+
"train_samples_per_second": 14.578,
|
8 |
+
"train_steps_per_second": 0.114
|
9 |
}
|
train_results.json
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
{
|
2 |
"epoch": 0.9999360981532366,
|
3 |
"total_flos": 0.0,
|
4 |
-
"train_loss": 0.
|
5 |
-
"train_runtime":
|
6 |
"train_samples": 1001516,
|
7 |
-
"train_samples_per_second":
|
8 |
-
"train_steps_per_second": 0.
|
9 |
}
|
|
|
1 |
{
|
2 |
"epoch": 0.9999360981532366,
|
3 |
"total_flos": 0.0,
|
4 |
+
"train_loss": 0.2718314818565587,
|
5 |
+
"train_runtime": 68698.2546,
|
6 |
"train_samples": 1001516,
|
7 |
+
"train_samples_per_second": 14.578,
|
8 |
+
"train_steps_per_second": 0.114
|
9 |
}
|
trainer_state.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|