aashish1904 commited on
Commit
472589e
1 Parent(s): 7f102e8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +262 -0
README.md ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ language:
5
+ - en
6
+ license: llama3.1
7
+ tags:
8
+ - fireplace
9
+ - fireplace-2
10
+ - valiant
11
+ - valiant-labs
12
+ - llama
13
+ - llama-3.1
14
+ - llama-3.1-instruct
15
+ - llama-3.1-instruct-8b
16
+ - llama-3
17
+ - llama-3-instruct
18
+ - llama-3-instruct-8b
19
+ - 8b
20
+ - function-calling
21
+ - sql
22
+ - database
23
+ - data-visualization
24
+ - matplotlib
25
+ - json
26
+ - conversational
27
+ - chat
28
+ - instruct
29
+ pipeline_tag: text-generation
30
+ model_type: llama
31
+ model-index:
32
+ - name: Llama3.1-8B-Fireplace2
33
+ results:
34
+ - task:
35
+ type: text-generation
36
+ name: Text Generation
37
+ dataset:
38
+ name: IFEval (0-Shot)
39
+ type: HuggingFaceH4/ifeval
40
+ args:
41
+ num_few_shot: 0
42
+ metrics:
43
+ - type: inst_level_strict_acc and prompt_level_strict_acc
44
+ value: 54.83
45
+ name: strict accuracy
46
+ source:
47
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
48
+ name: Open LLM Leaderboard
49
+ - task:
50
+ type: text-generation
51
+ name: Text Generation
52
+ dataset:
53
+ name: BBH (3-Shot)
54
+ type: BBH
55
+ args:
56
+ num_few_shot: 3
57
+ metrics:
58
+ - type: acc_norm
59
+ value: 24.07
60
+ name: normalized accuracy
61
+ source:
62
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
63
+ name: Open LLM Leaderboard
64
+ - task:
65
+ type: text-generation
66
+ name: Text Generation
67
+ dataset:
68
+ name: MATH Lvl 5 (4-Shot)
69
+ type: hendrycks/competition_math
70
+ args:
71
+ num_few_shot: 4
72
+ metrics:
73
+ - type: exact_match
74
+ value: 5.82
75
+ name: exact match
76
+ source:
77
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
78
+ name: Open LLM Leaderboard
79
+ - task:
80
+ type: text-generation
81
+ name: Text Generation
82
+ dataset:
83
+ name: GPQA (0-shot)
84
+ type: Idavidrein/gpqa
85
+ args:
86
+ num_few_shot: 0
87
+ metrics:
88
+ - type: acc_norm
89
+ value: 5.15
90
+ name: acc_norm
91
+ source:
92
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
93
+ name: Open LLM Leaderboard
94
+ - task:
95
+ type: text-generation
96
+ name: Text Generation
97
+ dataset:
98
+ name: MuSR (0-shot)
99
+ type: TAUR-Lab/MuSR
100
+ args:
101
+ num_few_shot: 0
102
+ metrics:
103
+ - type: acc_norm
104
+ value: 4.38
105
+ name: acc_norm
106
+ source:
107
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
108
+ name: Open LLM Leaderboard
109
+ - task:
110
+ type: text-generation
111
+ name: Text Generation
112
+ dataset:
113
+ name: MMLU-PRO (5-shot)
114
+ type: TIGER-Lab/MMLU-Pro
115
+ config: main
116
+ split: test
117
+ args:
118
+ num_few_shot: 5
119
+ metrics:
120
+ - type: acc
121
+ value: 15.63
122
+ name: accuracy
123
+ source:
124
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
125
+ name: Open LLM Leaderboard
126
+
127
+ ---
128
+
129
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
130
+
131
+ # QuantFactory/Llama3.1-8B-Fireplace2-GGUF
132
+ This is quantized version of [ValiantLabs/Llama3.1-8B-Fireplace2](https://huggingface.co/ValiantLabs/Llama3.1-8B-Fireplace2) created using llama.cpp
133
+
134
+ # Original Model Card
135
+
136
+
137
+
138
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/64f267a8a4f79a118e0fcc89/JYkaXrk2DqpXhaL9WymKY.jpeg)
139
+
140
+
141
+ Fireplace 2 is a chat model, adding helpful structured outputs to Llama 3.1 8b Instruct.
142
+ - an expansion pack of supplementary outputs - request them at will within your chat:
143
+ - Inline function calls
144
+ - SQL queries
145
+ - JSON objects
146
+ - Data visualization with matplotlib
147
+ - Mix normal chat and structured outputs within the same conversation.
148
+ - Fireplace 2 supplements the existing strengths of Llama 3.1, providing inline capabilities within the Llama 3 Instruct format.
149
+
150
+
151
+ ## Version
152
+
153
+ This is the **2024-07-23** release of Fireplace 2 for Llama 3.1 8b.
154
+
155
+ We're excited to bring further upgrades and releases to Fireplace 2 in the future.
156
+
157
+ Help us and recommend Fireplace 2 to your friends!
158
+
159
+
160
+ ## Prompting Guide
161
+ Fireplace uses the [Llama 3.1 Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) prompt format. The example script below can be used as a starting point for general chat with Llama 3.1 and also includes the different special tokens used for Fireplace 2's added features:
162
+
163
+
164
+ import transformers
165
+ import torch
166
+
167
+ model_id = "ValiantLabs/Llama3.1-8B-Fireplace2"
168
+
169
+ pipeline = transformers.pipeline(
170
+ "text-generation",
171
+ model=model_id,
172
+ model_kwargs={"torch_dtype": torch.bfloat16},
173
+ device_map="auto",
174
+ )
175
+
176
+ messages = [
177
+ {"role": "system", "content": "You are Fireplace, an expert technical assistant."},
178
+ {"role": "user", "content": "Hi, can you explain local area networking to me?"}, #general Llama 3.1 chat
179
+ #{"role": "user", "content": "I have the following SQL table: employees (job_id VARCHAR, salary INTEGER)\n\nCan you find all employees with a salary above $75000?<|request_sql|>"}, #for SQL query
180
+ #{"role": "user", "content": "{""name"": ""get_news_headlines"",""description"": ""Get the latest news headlines"",""parameters"": {""type"": ""object"",""properties"": {""country"": {""type"": ""string"",""description"": ""The country for which news headlines are to be retrieved""}},""required"": [""country""]}}\n\nHi, can you get me the latest news headlines for the United States?<|request_function_call|>"}, # for function call
181
+ #{"role": "user", "content": "Show me an example of a histogram with a fixed bin size. Use attractive colors.<|request_matplotlib|>"}, #for data visualization
182
+ #{"role": "user", "content": "Can you define the word 'presence' for me, thanks!<|request_json|>"}, #for JSON output
183
+ ]
184
+
185
+ outputs = pipeline(
186
+ messages,
187
+ max_new_tokens=512,
188
+ )
189
+ print(outputs[0]["generated_text"][-1])
190
+
191
+
192
+ While Fireplace 2 is trained to minimize incorrect structured outputs, they can still occur occasionally. Production uses of Fireplace 2 should verify the structure of all model outputs and remove any unneeded components of the output.
193
+
194
+ For handling of function call responses, use the [Llama 3.1 Instruct tool response style.](https://huggingface.co/blog/llama31#custom-tool-calling)
195
+
196
+
197
+ ## Special Tokens
198
+
199
+ Fireplace 2 utilizes special tokens applied to the Llama 3.1 tokenizer:
200
+
201
+ - <|request_json|>
202
+ - <|start_json|>
203
+ - <|end_json|>
204
+ - <|request_sql|>
205
+ - <|start_sql|>
206
+ - <|end_sql|>
207
+ - <|request_matplotlib|>
208
+ - <|start_matplotlib|>
209
+ - <|end_matplotlib|>
210
+ - <|request_function_call|>
211
+ - <|start_function_call|>
212
+ - <|end_function_call|>
213
+
214
+ These are supplemental to the existing special tokens used by Llama 3.1, such as <|python_tag|> and <|start_header_id|>. Fireplace 2 has been trained using the Llama 3.1 Instruct chat structure, with new special tokens added within the conversation.
215
+
216
+ The 'request' tokens are used by the user to request a specific type of structured output. They should be appended to the end of the user's message and can be alternated with normal chat responses throughout the conversation.
217
+
218
+
219
+ ## The Model
220
+ Fireplace 2 is built on top of Llama 3.1 8b Instruct.
221
+
222
+ This version of Fireplace 2 uses data from the following datasets:
223
+
224
+ - [glaiveai/glaive-function-calling-v2](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2)
225
+ - [b-mc2/sql-create-context](https://huggingface.co/datasets/b-mc2/sql-create-context)
226
+ - [sequelbox/Cadmium](https://huggingface.co/datasets/sequelbox/Cadmium)
227
+ - [sequelbox/Harlequin](https://huggingface.co/datasets/sequelbox/Harlequin)
228
+ - [migtissera/Tess-v1.5](https://huggingface.co/datasets/migtissera/Tess-v1.5)
229
+ - [LDJnr/Pure-Dove](https://huggingface.co/datasets/LDJnr/Pure-Dove)
230
+
231
+ Additional capabilities will be added to future releases.
232
+
233
+
234
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
235
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ValiantLabs__Llama3.1-8B-Fireplace2)
236
+
237
+ | Metric |Value|
238
+ |-------------------|----:|
239
+ |Avg. |18.31|
240
+ |IFEval (0-Shot) |54.83|
241
+ |BBH (3-Shot) |24.07|
242
+ |MATH Lvl 5 (4-Shot)| 5.82|
243
+ |GPQA (0-shot) | 5.15|
244
+ |MuSR (0-shot) | 4.38|
245
+ |MMLU-PRO (5-shot) |15.63|
246
+
247
+
248
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/63444f2687964b331809eb55/VCJ8Fmefd8cdVhXSSxJiD.jpeg)
249
+
250
+
251
+ Fireplace 2 is created by [Valiant Labs.](http://valiantlabs.ca/)
252
+
253
+ [Check out our HuggingFace page for Shining Valiant 2 and our other models!](https://huggingface.co/ValiantLabs)
254
+
255
+ [Follow us on X for updates on our models!](https://twitter.com/valiant_labs)
256
+
257
+ We care about open source.
258
+ For everyone to use.
259
+
260
+ We encourage others to finetune further from our models.
261
+
262
+