Muhammad2003 commited on
Commit
e5fd3c7
·
verified ·
1 Parent(s): bb15eb0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -223
README.md CHANGED
@@ -3,226 +3,4 @@ language:
3
  - en
4
  license: other
5
  library_name: transformers
6
- tags:
7
- - axolotl
8
- - finetune
9
- - facebook
10
- - meta
11
- - pytorch
12
- - llama
13
- - llama-3
14
- base_model: meta-llama/Meta-Llama-3-8B-Instruct
15
- datasets:
16
- - mlabonne/chatml-OpenHermes2.5-dpo-binarized-alpha
17
- model_name: Llama-3-8B-Instruct-DPO-v0.1
18
- pipeline_tag: text-generation
19
- license_name: llama3
20
- license_link: LICENSE
21
- inference: false
22
- model_creator: MaziyarPanahi
23
- quantized_by: MaziyarPanahi
24
- model-index:
25
- - name: Llama-3-8B-Instruct-DPO-v0.1
26
- results:
27
- - task:
28
- type: text-generation
29
- name: Text Generation
30
- dataset:
31
- name: AI2 Reasoning Challenge (25-Shot)
32
- type: ai2_arc
33
- config: ARC-Challenge
34
- split: test
35
- args:
36
- num_few_shot: 25
37
- metrics:
38
- - type: acc_norm
39
- value: 61.52
40
- name: normalized accuracy
41
- source:
42
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
43
- name: Open LLM Leaderboard
44
- - task:
45
- type: text-generation
46
- name: Text Generation
47
- dataset:
48
- name: HellaSwag (10-Shot)
49
- type: hellaswag
50
- split: validation
51
- args:
52
- num_few_shot: 10
53
- metrics:
54
- - type: acc_norm
55
- value: 79.06
56
- name: normalized accuracy
57
- source:
58
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
59
- name: Open LLM Leaderboard
60
- - task:
61
- type: text-generation
62
- name: Text Generation
63
- dataset:
64
- name: MMLU (5-Shot)
65
- type: cais/mmlu
66
- config: all
67
- split: test
68
- args:
69
- num_few_shot: 5
70
- metrics:
71
- - type: acc
72
- value: 67.09
73
- name: accuracy
74
- source:
75
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
76
- name: Open LLM Leaderboard
77
- - task:
78
- type: text-generation
79
- name: Text Generation
80
- dataset:
81
- name: TruthfulQA (0-shot)
82
- type: truthful_qa
83
- config: multiple_choice
84
- split: validation
85
- args:
86
- num_few_shot: 0
87
- metrics:
88
- - type: mc2
89
- value: 51.85
90
- source:
91
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
92
- name: Open LLM Leaderboard
93
- - task:
94
- type: text-generation
95
- name: Text Generation
96
- dataset:
97
- name: Winogrande (5-shot)
98
- type: winogrande
99
- config: winogrande_xl
100
- split: validation
101
- args:
102
- num_few_shot: 5
103
- metrics:
104
- - type: acc
105
- value: 74.66
106
- name: accuracy
107
- source:
108
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
109
- name: Open LLM Leaderboard
110
- - task:
111
- type: text-generation
112
- name: Text Generation
113
- dataset:
114
- name: GSM8k (5-shot)
115
- type: gsm8k
116
- config: main
117
- split: test
118
- args:
119
- num_few_shot: 5
120
- metrics:
121
- - type: acc
122
- value: 69.29
123
- name: accuracy
124
- source:
125
- url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1
126
- name: Open LLM Leaderboard
127
- ---
128
-
129
- <img src="./llama-3-merges.webp" alt="Goku 8x22B v0.1 Logo" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
130
-
131
-
132
- # Llama-3-8B-Instruct-DPO-v0.1
133
-
134
- This model is a fine-tune (DPO) of `meta-llama/Meta-Llama-3-8B-Instruct` model.
135
-
136
- # Prompt Template
137
-
138
- This model uses `ChatML` prompt template:
139
-
140
- ```
141
- <|im_start|>system
142
- {System}
143
- <|im_end|>
144
- <|im_start|>user
145
- {User}
146
- <|im_end|>
147
- <|im_start|>assistant
148
- {Assistant}
149
- ````
150
-
151
- # How to use
152
-
153
- You can use this model by using `MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1` as the model name in Hugging Face's
154
- transformers library.
155
-
156
- ```python
157
- from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
158
- from transformers import pipeline
159
- import torch
160
-
161
- model_id = "MaziyarPanahi/Llama-3-8B-Instruct-DPO-v0.1"
162
-
163
- model = AutoModelForCausalLM.from_pretrained(
164
- model_id,
165
- torch_dtype=torch.float16,
166
- device_map="auto",
167
- trust_remote_code=True,
168
- # attn_implementation="flash_attention_2"
169
- )
170
-
171
- tokenizer = AutoTokenizer.from_pretrained(
172
- model_id,
173
- trust_remote_code=True
174
- )
175
-
176
- streamer = TextStreamer(tokenizer)
177
-
178
- pipeline = pipeline(
179
- "text-generation",
180
- model=model,
181
- tokenizer=tokenizer,
182
- model_kwargs={"torch_dtype": torch.bfloat16},
183
- streamer=streamer
184
- )
185
-
186
- # Then you can use the pipeline to generate text.
187
-
188
- messages = [
189
- {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
190
- {"role": "user", "content": "Who are you?"},
191
- ]
192
-
193
- prompt = tokenizer.apply_chat_template(
194
- messages,
195
- tokenize=False,
196
- add_generation_prompt=True
197
- )
198
-
199
- terminators = [
200
- tokenizer.eos_token_id,
201
- tokenizer.convert_tokens_to_ids("<|im_end|>")
202
- ]
203
-
204
- outputs = pipeline(
205
- prompt,
206
- max_new_tokens=256,
207
- eos_token_id=terminators,
208
- do_sample=True,
209
- temperature=0.6,
210
- top_p=0.95,
211
- )
212
- print(outputs[0]["generated_text"][len(prompt):])
213
- ```
214
-
215
-
216
- # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
217
- Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_MaziyarPanahi__Llama-3-8B-Instruct-DPO-v0.1)
218
-
219
- | Metric |Value|
220
- |---------------------------------|----:|
221
- |Avg. |67.25|
222
- |AI2 Reasoning Challenge (25-Shot)|61.52|
223
- |HellaSwag (10-Shot) |79.06|
224
- |MMLU (5-Shot) |67.09|
225
- |TruthfulQA (0-shot) |51.85|
226
- |Winogrande (5-shot) |74.66|
227
- |GSM8k (5-shot) |69.29|
228
-
 
3
  - en
4
  license: other
5
  library_name: transformers
6
+ ---