koesn commited on
Commit
31d6546
1 Parent(s): 6a2fd16

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +272 -3
README.md CHANGED
@@ -1,3 +1,272 @@
1
- ---
2
- license: llama3.1
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: llama3.1
5
+ tags:
6
+ - fireplace
7
+ - fireplace-2
8
+ - valiant
9
+ - valiant-labs
10
+ - llama
11
+ - llama-3.1
12
+ - llama-3.1-instruct
13
+ - llama-3.1-instruct-8b
14
+ - llama-3
15
+ - llama-3-instruct
16
+ - llama-3-instruct-8b
17
+ - 8b
18
+ - function-calling
19
+ - sql
20
+ - database
21
+ - data-visualization
22
+ - matplotlib
23
+ - json
24
+ - conversational
25
+ - chat
26
+ - instruct
27
+ pipeline_tag: text-generation
28
+ base_model: meta-llama/Meta-Llama-3.1-8B-Instruct
29
+ model_type: llama
30
+ model-index:
31
+ - name: Llama3.1-8B-Fireplace2
32
+ results:
33
+ - task:
34
+ type: text-generation
35
+ name: Text Generation
36
+ dataset:
37
+ name: IFEval (0-Shot)
38
+ type: HuggingFaceH4/ifeval
39
+ args:
40
+ num_few_shot: 0
41
+ metrics:
42
+ - type: inst_level_strict_acc and prompt_level_strict_acc
43
+ value: 54.83
44
+ name: strict accuracy
45
+ source:
46
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
47
+ name: Open LLM Leaderboard
48
+ - task:
49
+ type: text-generation
50
+ name: Text Generation
51
+ dataset:
52
+ name: BBH (3-Shot)
53
+ type: BBH
54
+ args:
55
+ num_few_shot: 3
56
+ metrics:
57
+ - type: acc_norm
58
+ value: 24.07
59
+ name: normalized accuracy
60
+ source:
61
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
62
+ name: Open LLM Leaderboard
63
+ - task:
64
+ type: text-generation
65
+ name: Text Generation
66
+ dataset:
67
+ name: MATH Lvl 5 (4-Shot)
68
+ type: hendrycks/competition_math
69
+ args:
70
+ num_few_shot: 4
71
+ metrics:
72
+ - type: exact_match
73
+ value: 5.82
74
+ name: exact match
75
+ source:
76
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
77
+ name: Open LLM Leaderboard
78
+ - task:
79
+ type: text-generation
80
+ name: Text Generation
81
+ dataset:
82
+ name: GPQA (0-shot)
83
+ type: Idavidrein/gpqa
84
+ args:
85
+ num_few_shot: 0
86
+ metrics:
87
+ - type: acc_norm
88
+ value: 5.15
89
+ name: acc_norm
90
+ source:
91
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
92
+ name: Open LLM Leaderboard
93
+ - task:
94
+ type: text-generation
95
+ name: Text Generation
96
+ dataset:
97
+ name: MuSR (0-shot)
98
+ type: TAUR-Lab/MuSR
99
+ args:
100
+ num_few_shot: 0
101
+ metrics:
102
+ - type: acc_norm
103
+ value: 4.38
104
+ name: acc_norm
105
+ source:
106
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
107
+ name: Open LLM Leaderboard
108
+ - task:
109
+ type: text-generation
110
+ name: Text Generation
111
+ dataset:
112
+ name: MMLU-PRO (5-shot)
113
+ type: TIGER-Lab/MMLU-Pro
114
+ config: main
115
+ split: test
116
+ args:
117
+ num_few_shot: 5
118
+ metrics:
119
+ - type: acc
120
+ value: 15.63
121
+ name: accuracy
122
+ source:
123
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=ValiantLabs/Llama3.1-8B-Fireplace2
124
+ name: Open LLM Leaderboard
125
+ ---
126
+
127
+ ## Description
128
+ This repo contains GGUF format model files for Llama3.1-8B-Fireplace2.
129
+
130
+ ## Files Provided
131
+ | Name | Quant | Bits | File Size | Remark |
132
+ | -------------------------------- | ----- | ---- | --------- | -------------------------------- |
133
+ | llama3.1-8b-fireplace2.Q2_K.gguf | Q2_K | 2 | 3.18 GB | 2.96G, +3.5199 ppl @ Llama-3-8B |
134
+ | llama3.1-8b-fireplace2.Q3_K.gguf | Q3_K | 3 | 4.02 GB | 3.74G, +0.6569 ppl @ Llama-3-8B |
135
+ | llama3.1-8b-fireplace2.Q4_0.gguf | Q4_0 | 4 | 4.66 GB | 4.34G, +0.4685 ppl @ Llama-3-8B |
136
+ | llama3.1-8b-fireplace2.Q4_K.gguf | Q4_K | 4 | 4.92 GB | 4.58G, +0.1754 ppl @ Llama-3-8B |
137
+ | llama3.1-8b-fireplace2.Q5_K.gguf | Q5_K | 5 | 5.73 GB | 5.33G, +0.0569 ppl @ Llama-3-8B |
138
+ | llama3.1-8b-fireplace2.Q6_K.gguf | Q6_K | 6 | 6.60 GB | 6.14G, +0.0217 ppl @ Llama-3-8B |
139
+ | llama3.1-8b-fireplace2.Q8_0.gguf | Q8_0 | 8 | 8.54 GB | 7.96G, +0.0026 ppl @ Llama-3-8B |
140
+
141
+ ## Parameters
142
+ | path | type | architecture | rope_theta | sliding_win | max_pos_embed |
143
+ | ---------------------------------- | ----- | ---------------- | ---------- | ----------- | ------------- |
144
+ | ValiantLabs/Llama3.1-8B-Fireplace2 | llama | LlamaForCausalLM | 500000.0 | null | 131072 |
145
+
146
+ # Original Model Card
147
+
148
+
149
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/64f267a8a4f79a118e0fcc89/JYkaXrk2DqpXhaL9WymKY.jpeg)
150
+
151
+
152
+ Fireplace 2 is a chat model, adding helpful structured outputs to Llama 3.1 8b Instruct.
153
+ - an expansion pack of supplementary outputs - request them at will within your chat:
154
+ - Inline function calls
155
+ - SQL queries
156
+ - JSON objects
157
+ - Data visualization with matplotlib
158
+ - Mix normal chat and structured outputs within the same conversation.
159
+ - Fireplace 2 supplements the existing strengths of Llama 3.1, providing inline capabilities within the Llama 3 Instruct format.
160
+
161
+
162
+ ## Version
163
+
164
+ This is the **2024-07-23** release of Fireplace 2 for Llama 3.1 8b.
165
+
166
+ We're excited to bring further upgrades and releases to Fireplace 2 in the future.
167
+
168
+ Help us and recommend Fireplace 2 to your friends!
169
+
170
+
171
+ ## Prompting Guide
172
+ 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:
173
+
174
+
175
+ import transformers
176
+ import torch
177
+
178
+ model_id = "ValiantLabs/Llama3.1-8B-Fireplace2"
179
+
180
+ pipeline = transformers.pipeline(
181
+ "text-generation",
182
+ model=model_id,
183
+ model_kwargs={"torch_dtype": torch.bfloat16},
184
+ device_map="auto",
185
+ )
186
+
187
+ messages = [
188
+ {"role": "system", "content": "You are Fireplace, an expert technical assistant."},
189
+ {"role": "user", "content": "Hi, can you explain local area networking to me?"}, #general Llama 3.1 chat
190
+ #{"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
191
+ #{"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
192
+ #{"role": "user", "content": "Show me an example of a histogram with a fixed bin size. Use attractive colors.<|request_matplotlib|>"}, #for data visualization
193
+ #{"role": "user", "content": "Can you define the word 'presence' for me, thanks!<|request_json|>"}, #for JSON output
194
+ ]
195
+
196
+ outputs = pipeline(
197
+ messages,
198
+ max_new_tokens=512,
199
+ )
200
+ print(outputs[0]["generated_text"][-1])
201
+
202
+
203
+ 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.
204
+
205
+ For handling of function call responses, use the [Llama 3.1 Instruct tool response style.](https://huggingface.co/blog/llama31#custom-tool-calling)
206
+
207
+
208
+ ## Special Tokens
209
+
210
+ Fireplace 2 utilizes special tokens applied to the Llama 3.1 tokenizer:
211
+
212
+ - <|request_json|>
213
+ - <|start_json|>
214
+ - <|end_json|>
215
+ - <|request_sql|>
216
+ - <|start_sql|>
217
+ - <|end_sql|>
218
+ - <|request_matplotlib|>
219
+ - <|start_matplotlib|>
220
+ - <|end_matplotlib|>
221
+ - <|request_function_call|>
222
+ - <|start_function_call|>
223
+ - <|end_function_call|>
224
+
225
+ 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.
226
+
227
+ 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.
228
+
229
+
230
+ ## The Model
231
+ Fireplace 2 is built on top of Llama 3.1 8b Instruct.
232
+
233
+ This version of Fireplace 2 uses data from the following datasets:
234
+
235
+ - [glaiveai/glaive-function-calling-v2](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2)
236
+ - [b-mc2/sql-create-context](https://huggingface.co/datasets/b-mc2/sql-create-context)
237
+ - [sequelbox/Cadmium](https://huggingface.co/datasets/sequelbox/Cadmium)
238
+ - [sequelbox/Harlequin](https://huggingface.co/datasets/sequelbox/Harlequin)
239
+ - [migtissera/Tess-v1.5](https://huggingface.co/datasets/migtissera/Tess-v1.5)
240
+ - [LDJnr/Pure-Dove](https://huggingface.co/datasets/LDJnr/Pure-Dove)
241
+
242
+ Additional capabilities will be added to future releases.
243
+
244
+
245
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
246
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_ValiantLabs__Llama3.1-8B-Fireplace2)
247
+
248
+ | Metric |Value|
249
+ |-------------------|----:|
250
+ |Avg. |18.31|
251
+ |IFEval (0-Shot) |54.83|
252
+ |BBH (3-Shot) |24.07|
253
+ |MATH Lvl 5 (4-Shot)| 5.82|
254
+ |GPQA (0-shot) | 5.15|
255
+ |MuSR (0-shot) | 4.38|
256
+ |MMLU-PRO (5-shot) |15.63|
257
+
258
+
259
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/63444f2687964b331809eb55/VCJ8Fmefd8cdVhXSSxJiD.jpeg)
260
+
261
+
262
+ Fireplace 2 is created by [Valiant Labs.](http://valiantlabs.ca/)
263
+
264
+ [Check out our HuggingFace page for Shining Valiant 2 and our other models!](https://huggingface.co/ValiantLabs)
265
+
266
+ [Follow us on X for updates on our models!](https://twitter.com/valiant_labs)
267
+
268
+ We care about open source.
269
+ For everyone to use.
270
+
271
+ We encourage others to finetune further from our models.
272
+