Views
No views yet
Sharathhebbar24/chat_gpt2 using Intel/orca_dpo_pairs on DPOi only use the inputs from 1 to i but not the future tokens.1>>> from transformers import AutoTokenizer, AutoModelForCausalLM
2>>> model_name = "Sharathhebbar24/chat_gpt2_dpo"
3>>> model = AutoModelForCausalLM.from_pretrained(model_name)
4>>> tokenizer = AutoTokenizer.from_pretrained(model_name)
5>>> def generate_text(prompt):
6>>> inputs = tokenizer.encode(prompt, return_tensors='pt')
7>>> outputs = model.generate(inputs, max_length=64, pad_token_id=tokenizer.eos_token_id)
8>>> generated = tokenizer.decode(outputs[0], skip_special_tokens=True)
9>>> return generated[:generated.rfind(".")+1]
10>>> prompt = """
11>>> user: what are you?
12>>> assistant: I am a Chatbot intended to give a python program
13>>> user: hmm, can you write a python program to print Hii Heloo
14>>> assistant: Sure Here is a python code.\n print("Hii Heloo")
15>>> user: Can you write a Linear search program in python
16>>> """
17>>> res = generate_text(prompt)
18>>> res| Model | Average | ARC | HellaSwag | MMLU | TruthfulQA | Winogrande | GSM8k |
|---|---|---|---|---|---|---|---|
| Sharathhebbar24/chat_gpt2_dpo | 28.56 | 23.98 | 31.22 | 24.95 | 41.26 | 49.96 | 0 |
1{
2 "all": {
3 "acc": 0.24915779048270345,
4 "acc_stderr": 0.030509906389610868,
5 "acc_norm": 0.25041231816215265,
6 "acc_norm_stderr": 0.03132600249114931,
7 "mc1": 0.2521419828641371,
8 "mc1_stderr": 0.015201522246299965,
9 "mc2": 0.41257163824244014,
10 "mc2_stderr": 0.015127188811834062
11 },
12 "harness|arc:challenge|25": {
13 "acc": 0.18686006825938567,
14 "acc_stderr": 0.011391015649694391,
15 "acc_norm": 0.23976109215017063,
16 "acc_norm_stderr": 0.012476304127453954
17 },
18 "harness|hellaswag|10": {
19 "acc": 0.28978291177056364,
20 "acc_stderr": 0.004527343651130803,
21 "acc_norm": 0.3121888070105557,
22 "acc_norm_stderr": 0.0046243936909668975
23 },
24 "harness|hendrycksTest-abstract_algebra|5": {
25 "acc": 0.22,
26 "acc_stderr": 0.04163331998932268,
27 "acc_norm": 0.22,
28 "acc_norm_stderr": 0.04163331998932268
29 },
30 "harness|hendrycksTest-anatomy|5": {
31 "acc": 0.3037037037037037,
32 "acc_stderr": 0.039725528847851375,
33 "acc_norm": 0.3037037037037037,
34 "acc_norm_stderr": 0.039725528847851375
35 },
36 "harness|hendrycksTest-astronomy|5": {
37 "acc": 0.17763157894736842,
38 "acc_stderr": 0.031103182383123398,
39 "acc_norm": 0.17763157894736842,
40 "acc_norm_stderr": 0.031103182383123398
41 },
42 "harness|hendrycksTest-business_ethics|5": {
43 "acc": 0.26,
44 "acc_stderr": 0.0440844002276808,
45 "acc_norm": 0.26,
46 "acc_norm_stderr": 0.0440844002276808
47 },
48 "harness|hendrycksTest-clinical_knowledge|5": {
49 "acc": 0.23018867924528302,
50 "acc_stderr": 0.025907897122408173,
51 "acc_norm": 0.23018867924528302,
52 "acc_norm_stderr": 0.025907897122408173
53 },
54 "harness|hendrycksTest-college_biology|5": {
55 "acc": 0.2569444444444444,
56 "acc_stderr": 0.03653946969442099,
57 "acc_norm": 0.2569444444444444,
58 "acc_norm_stderr": 0.03653946969442099
59 },
60 "harness|hendrycksTest-college_chemistry|5": {
61 "acc": 0.19,
62 "acc_stderr": 0.039427724440366234,
63 "acc_norm": 0.19,
64 "acc_norm_stderr": 0.039427724440366234
65 },
66 "harness|hendrycksTest-college_computer_science|5": {
67 "acc": 0.24,
68 "acc_stderr": 0.04292346959909283,
69 "acc_norm": 0.24,
70 "acc_norm_stderr": 0.04292346959909283
71 },
72 "harness|hendrycksTest-college_mathematics|5": {
73 "acc": 0.29,
74 "acc_stderr": 0.04560480215720684,
75 "acc_norm": 0.29,
76 "acc_norm_stderr": 0.04560480215720684
77 },
78 "harness|hendrycksTest-college_medicine|5": {
79 "acc": 0.2543352601156069,
80 "acc_stderr": 0.0332055644308557,
81 "acc_norm": 0.2543352601156069,
82 "acc_norm_stderr": 0.0332055644308557
83 },
84 "harness|hendrycksTest-college_physics|5": {
85 "acc": 0.21568627450980393,
86 "acc_stderr": 0.04092563958237654,
87 "acc_norm": 0.21568627450980393,
88 "acc_norm_stderr": 0.04092563958237654
89 },
90 "harness|hendrycksTest-computer_security|5": {
91 "acc": 0.34,
92 "acc_stderr": 0.04760952285695236,
93 "acc_norm": 0.34,
94 "acc_norm_stderr": 0.04760952285695236
95 },
96 "harness|hendrycksTest-conceptual_physics|5": {
97 "acc": 0.26382978723404255,
98 "acc_stderr": 0.028809989854102973,
99 "acc_norm": 0.26382978723404255,
100 "acc_norm_stderr": 0.028809989854102973
101 },
102 "harness|hendrycksTest-econometrics|5": {
103 "acc": 0.24561403508771928,
104 "acc_stderr": 0.04049339297748142,
105 "acc_norm": 0.24561403508771928,
106 "acc_norm_stderr": 0.04049339297748142
107 },
108 "harness|hendrycksTest-electrical_engineering|5": {
109 "acc": 0.2413793103448276,
110 "acc_stderr": 0.03565998174135302,
111 "acc_norm": 0.2413793103448276,
112 "acc_norm_stderr": 0.03565998174135302
113 },
114 "harness|hendrycksTest-elementary_mathematics|5": {
115 "acc": 0.24074074074074073,
116 "acc_stderr": 0.02201908001221789,
117 "acc_norm": 0.24074074074074073,
118 "acc_norm_stderr": 0.02201908001221789
119 },
120 "harness|hendrycksTest-formal_logic|5": {
121 "acc": 0.1349206349206349,
122 "acc_stderr": 0.030557101589417515,
123 "acc_norm": 0.1349206349206349,
124 "acc_norm_stderr": 0.030557101589417515
125 },
126 "harness|hendrycksTest-global_facts|5": {
127 "acc": 0.16,
128 "acc_stderr": 0.03684529491774708,
129 "acc_norm": 0.16,
130 "acc_norm_stderr": 0.03684529491774708
131 },
132 "harness|hendrycksTest-high_school_biology|5": {
133 "acc": 0.1774193548387097,
134 "acc_stderr": 0.02173254068932927,
135 "acc_norm": 0.1774193548387097,
136 "acc_norm_stderr": 0.02173254068932927
137 },
138 "harness|hendrycksTest-high_school_chemistry|5": {
139 "acc": 0.24630541871921183,
140 "acc_stderr": 0.030315099285617736,
141 "acc_norm": 0.24630541871921183,
142 "acc_norm_stderr": 0.030315099285617736
143 },
144 "harness|hendrycksTest-high_school_computer_science|5": {
145 "acc": 0.28,
146 "acc_stderr": 0.04512608598542126,
147 "acc_norm": 0.28,
148 "acc_norm_stderr": 0.04512608598542126
149 },
150 "harness|hendrycksTest-high_school_european_history|5": {
151 "acc": 0.21818181818181817,
152 "acc_stderr": 0.03225078108306289,
153 "acc_norm": 0.21818181818181817,
154 "acc_norm_stderr": 0.03225078108306289
155 },
156 "harness|hendrycksTest-high_school_geography|5": {
157 "acc": 0.3282828282828283,
158 "acc_stderr": 0.03345678422756776,
159 "acc_norm": 0.3282828282828283,
160 "acc_norm_stderr": 0.03345678422756776
161 },
162 "harness|hendrycksTest-high_school_government_and_politics|5": {
163 "acc": 0.37305699481865284,
164 "acc_stderr": 0.03490205592048573,
165 "acc_norm": 0.37305699481865284,
166 "acc_norm_stderr": 0.03490205592048573
167 },
168 "harness|hendrycksTest-high_school_macroeconomics|5": {
169 "acc": 0.26666666666666666,
170 "acc_stderr": 0.02242127361292371,
171 "acc_norm": 0.26666666666666666,
172 "acc_norm_stderr": 0.02242127361292371
173 },
174 "harness|hendrycksTest-high_school_mathematics|5": {
175 "acc": 0.21481481481481482,
176 "acc_stderr": 0.025040443877000683,
177 "acc_norm": 0.21481481481481482,
178 "acc_norm_stderr": 0.025040443877000683
179 },
180 "harness|hendrycksTest-high_school_microeconomics|5": {
181 "acc": 0.22268907563025211,
182 "acc_stderr": 0.027025433498882364,
183 "acc_norm": 0.22268907563025211,
184 "acc_norm_stderr": 0.027025433498882364
185 },
186 "harness|hendrycksTest-high_school_physics|5": {
187 "acc": 0.23178807947019867,
188 "acc_stderr": 0.034454062719870546,
189 "acc_norm": 0.23178807947019867,
190 "acc_norm_stderr": 0.034454062719870546
191 },
192 "harness|hendrycksTest-high_school_psychology|5": {
193 "acc": 0.3302752293577982,
194 "acc_stderr": 0.02016446633634298,
195 "acc_norm": 0.3302752293577982,
196 "acc_norm_stderr": 0.02016446633634298
197 },
198 "harness|hendrycksTest-high_school_statistics|5": {
199 "acc": 0.19444444444444445,
200 "acc_stderr": 0.026991454502036733,
201 "acc_norm": 0.19444444444444445,
202 "acc_norm_stderr": 0.026991454502036733
203 },
204 "harness|hendrycksTest-high_school_us_history|5": {
205 "acc": 0.25,
206 "acc_stderr": 0.03039153369274154,
207 "acc_norm": 0.25,
208 "acc_norm_stderr": 0.03039153369274154
209 },
210 "harness|hendrycksTest-high_school_world_history|5": {
211 "acc": 0.26582278481012656,
212 "acc_stderr": 0.028756799629658342,
213 "acc_norm": 0.26582278481012656,
214 "acc_norm_stderr": 0.028756799629658342
215 },
216 "harness|hendrycksTest-human_aging|5": {
217 "acc": 0.17937219730941703,
218 "acc_stderr": 0.0257498195691928,
219 "acc_norm": 0.17937219730941703,
220 "acc_norm_stderr": 0.0257498195691928
221 },
222 "harness|hendrycksTest-human_sexuality|5": {
223 "acc": 0.2366412213740458,
224 "acc_stderr": 0.037276735755969174,
225 "acc_norm": 0.2366412213740458,
226 "acc_norm_stderr": 0.037276735755969174
227 },
228 "harness|hendrycksTest-international_law|5": {
229 "acc": 0.35537190082644626,
230 "acc_stderr": 0.04369236326573981,
231 "acc_norm": 0.35537190082644626,
232 "acc_norm_stderr": 0.04369236326573981
233 },
234 "harness|hendrycksTest-jurisprudence|5": {
235 "acc": 0.25925925925925924,
236 "acc_stderr": 0.042365112580946336,
237 "acc_norm": 0.25925925925925924,
238 "acc_norm_stderr": 0.042365112580946336
239 },
240 "harness|hendrycksTest-logical_fallacies|5": {
241 "acc": 0.2822085889570552,
242 "acc_stderr": 0.03536117886664742,
243 "acc_norm": 0.2822085889570552,
244 "acc_norm_stderr": 0.03536117886664742
245 },
246 "harness|hendrycksTest-machine_learning|5": {
247 "acc": 0.32142857142857145,
248 "acc_stderr": 0.04432804055291519,
249 "acc_norm": 0.32142857142857145,
250 "acc_norm_stderr": 0.04432804055291519
251 },
252 "harness|hendrycksTest-management|5": {
253 "acc": 0.1941747572815534,
254 "acc_stderr": 0.03916667762822585,
255 "acc_norm": 0.1941747572815534,
256 "acc_norm_stderr": 0.03916667762822585
257 },
258 "harness|hendrycksTest-marketing|5": {
259 "acc": 0.2905982905982906,
260 "acc_stderr": 0.02974504857267404,
261 "acc_norm": 0.2905982905982906,
262 "acc_norm_stderr": 0.02974504857267404
263 },
264 "harness|hendrycksTest-medical_genetics|5": {
265 "acc": 0.25,
266 "acc_stderr": 0.04351941398892446,
267 "acc_norm": 0.25,
268 "acc_norm_stderr": 0.04351941398892446
269 },
270 "harness|hendrycksTest-miscellaneous|5": {
271 "acc": 0.23627075351213284,
272 "acc_stderr": 0.015190473717037497,
273 "acc_norm": 0.23627075351213284,
274 "acc_norm_stderr": 0.015190473717037497
275 },
276 "harness|hendrycksTest-moral_disputes|5": {
277 "acc": 0.24566473988439305,
278 "acc_stderr": 0.02317629820399201,
279 "acc_norm": 0.24566473988439305,
280 "acc_norm_stderr": 0.02317629820399201
281 },
282 "harness|hendrycksTest-moral_scenarios|5": {
283 "acc": 0.24581005586592178,
284 "acc_stderr": 0.014400296429225587,
285 "acc_norm": 0.24581005586592178,
286 "acc_norm_stderr": 0.014400296429225587
287 },
288 "harness|hendrycksTest-nutrition|5": {
289 "acc": 0.25163398692810457,
290 "acc_stderr": 0.024848018263875195,
291 "acc_norm": 0.25163398692810457,
292 "acc_norm_stderr": 0.024848018263875195
293 },
294 "harness|hendrycksTest-philosophy|5": {
295 "acc": 0.18006430868167203,
296 "acc_stderr": 0.021823422857744953,
297 "acc_norm": 0.18006430868167203,
298 "acc_norm_stderr": 0.021823422857744953
299 },
300 "harness|hendrycksTest-prehistory|5": {
301 "acc": 0.25617283950617287,
302 "acc_stderr": 0.024288533637726095,
303 "acc_norm": 0.25617283950617287,
304 "acc_norm_stderr": 0.024288533637726095
305 },
306 "harness|hendrycksTest-professional_accounting|5": {
307 "acc": 0.2801418439716312,
308 "acc_stderr": 0.02678917235114023,
309 "acc_norm": 0.2801418439716312,
310 "acc_norm_stderr": 0.02678917235114023
311 },
312 "harness|hendrycksTest-professional_law|5": {
313 "acc": 0.24837027379400262,
314 "acc_stderr": 0.011035212598034503,
315 "acc_norm": 0.24837027379400262,
316 "acc_norm_stderr": 0.011035212598034503
317 },
318 "harness|hendrycksTest-professional_medicine|5": {
319 "acc": 0.3125,
320 "acc_stderr": 0.02815637344037142,
321 "acc_norm": 0.3125,
322 "acc_norm_stderr": 0.02815637344037142
323 },
324 "harness|hendrycksTest-professional_psychology|5": {
325 "acc": 0.25,
326 "acc_stderr": 0.01751781884501444,
327 "acc_norm": 0.25,
328 "acc_norm_stderr": 0.01751781884501444
329 },
330 "harness|hendrycksTest-public_relations|5": {
331 "acc": 0.18181818181818182,
332 "acc_stderr": 0.03694284335337801,
333 "acc_norm": 0.18181818181818182,
334 "acc_norm_stderr": 0.03694284335337801
335 },
336 "harness|hendrycksTest-security_studies|5": {
337 "acc": 0.31020408163265306,
338 "acc_stderr": 0.029613459872484378,
339 "acc_norm": 0.31020408163265306,
340 "acc_norm_stderr": 0.029613459872484378
341 },
342 "harness|hendrycksTest-sociology|5": {
343 "acc": 0.24875621890547264,
344 "acc_stderr": 0.030567675938916707,
345 "acc_norm": 0.24875621890547264,
346 "acc_norm_stderr": 0.030567675938916707
347 },
348 "harness|hendrycksTest-us_foreign_policy|5": {
349 "acc": 0.25,
350 "acc_stderr": 0.04351941398892446,
351 "acc_norm": 0.25,
352 "acc_norm_stderr": 0.04351941398892446
353 },
354 "harness|hendrycksTest-virology|5": {
355 "acc": 0.19879518072289157,
356 "acc_stderr": 0.03106939026078942,
357 "acc_norm": 0.19879518072289157,
358 "acc_norm_stderr": 0.03106939026078942
359 },
360 "harness|hendrycksTest-world_religions|5": {
361 "acc": 0.29239766081871343,
362 "acc_stderr": 0.034886477134579215,
363 "acc_norm": 0.29239766081871343,
364 "acc_norm_stderr": 0.034886477134579215
365 },
366 "harness|truthfulqa:mc|0": {
367 "mc1": 0.2521419828641371,
368 "mc1_stderr": 0.015201522246299965,
369 "mc2": 0.41257163824244014,
370 "mc2_stderr": 0.015127188811834062
371 },
372 "harness|winogrande|5": {
373 "acc": 0.4996053670086819,
374 "acc_stderr": 0.014052481306049512
375 },
376 "harness|gsm8k|5": {
377 "acc": 0.0,
378 "acc_stderr": 0.0
379 }
380}
381| Metric | Value |
|---|---|
| Avg. | 28.56 |
| AI2 Reasoning Challenge (25-Shot) | 23.98 |
| HellaSwag (10-Shot) | 31.22 |
| MMLU (5-Shot) | 24.95 |
| TruthfulQA (0-shot) | 41.26 |
| Winogrande (5-shot) | 49.96 |
| GSM8k (5-shot) | 0.00 |