aashish1904 commited on
Commit
cb2d6e9
•
1 Parent(s): 82e7345

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +365 -0
README.md ADDED
@@ -0,0 +1,365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ pipeline_tag: text-generation
5
+ inference: false
6
+ license: apache-2.0
7
+ library_name: transformers
8
+ tags:
9
+ - language
10
+ - granite-3.0
11
+ model-index:
12
+ - name: granite-3.0-2b-instruct
13
+ results:
14
+ - task:
15
+ type: text-generation
16
+ dataset:
17
+ type: instruction-following
18
+ name: IFEval
19
+ metrics:
20
+ - name: pass@1
21
+ type: pass@1
22
+ value: 52.27
23
+ veriefied: false
24
+ - task:
25
+ type: text-generation
26
+ dataset:
27
+ type: instruction-following
28
+ name: MT-Bench
29
+ metrics:
30
+ - name: pass@1
31
+ type: pass@1
32
+ value: 8.22
33
+ veriefied: false
34
+ - task:
35
+ type: text-generation
36
+ dataset:
37
+ type: human-exams
38
+ name: AGI-Eval
39
+ metrics:
40
+ - name: pass@1
41
+ type: pass@1
42
+ value: 40.52
43
+ veriefied: false
44
+ - task:
45
+ type: text-generation
46
+ dataset:
47
+ type: human-exams
48
+ name: MMLU
49
+ metrics:
50
+ - name: pass@1
51
+ type: pass@1
52
+ value: 65.82
53
+ veriefied: false
54
+ - task:
55
+ type: text-generation
56
+ dataset:
57
+ type: human-exams
58
+ name: MMLU-Pro
59
+ metrics:
60
+ - name: pass@1
61
+ type: pass@1
62
+ value: 34.45
63
+ veriefied: false
64
+ - task:
65
+ type: text-generation
66
+ dataset:
67
+ type: commonsense
68
+ name: OBQA
69
+ metrics:
70
+ - name: pass@1
71
+ type: pass@1
72
+ value: 46.60
73
+ veriefied: false
74
+ - task:
75
+ type: text-generation
76
+ dataset:
77
+ type: commonsense
78
+ name: SIQA
79
+ metrics:
80
+ - name: pass@1
81
+ type: pass@1
82
+ value: 71.21
83
+ veriefied: false
84
+ - task:
85
+ type: text-generation
86
+ dataset:
87
+ type: commonsense
88
+ name: Hellaswag
89
+ metrics:
90
+ - name: pass@1
91
+ type: pass@1
92
+ value: 82.61
93
+ veriefied: false
94
+ - task:
95
+ type: text-generation
96
+ dataset:
97
+ type: commonsense
98
+ name: WinoGrande
99
+ metrics:
100
+ - name: pass@1
101
+ type: pass@1
102
+ value: 77.51
103
+ veriefied: false
104
+ - task:
105
+ type: text-generation
106
+ dataset:
107
+ type: commonsense
108
+ name: TruthfulQA
109
+ metrics:
110
+ - name: pass@1
111
+ type: pass@1
112
+ value: 60.32
113
+ veriefied: false
114
+ - task:
115
+ type: text-generation
116
+ dataset:
117
+ type: reading-comprehension
118
+ name: BoolQ
119
+ metrics:
120
+ - name: pass@1
121
+ type: pass@1
122
+ value: 88.65
123
+ veriefied: false
124
+ - task:
125
+ type: text-generation
126
+ dataset:
127
+ type: reading-comprehension
128
+ name: SQuAD 2.0
129
+ metrics:
130
+ - name: pass@1
131
+ type: pass@1
132
+ value: 21.58
133
+ veriefied: false
134
+ - task:
135
+ type: text-generation
136
+ dataset:
137
+ type: reasoning
138
+ name: ARC-C
139
+ metrics:
140
+ - name: pass@1
141
+ type: pass@1
142
+ value: 64.16
143
+ veriefied: false
144
+ - task:
145
+ type: text-generation
146
+ dataset:
147
+ type: reasoning
148
+ name: GPQA
149
+ metrics:
150
+ - name: pass@1
151
+ type: pass@1
152
+ value: 33.81
153
+ veriefied: false
154
+ - task:
155
+ type: text-generation
156
+ dataset:
157
+ type: reasoning
158
+ name: BBH
159
+ metrics:
160
+ - name: pass@1
161
+ type: pass@1
162
+ value: 51.55
163
+ veriefied: false
164
+ - task:
165
+ type: text-generation
166
+ dataset:
167
+ type: code
168
+ name: HumanEvalSynthesis
169
+ metrics:
170
+ - name: pass@1
171
+ type: pass@1
172
+ value: 64.63
173
+ veriefied: false
174
+ - task:
175
+ type: text-generation
176
+ dataset:
177
+ type: code
178
+ name: HumanEvalExplain
179
+ metrics:
180
+ - name: pass@1
181
+ type: pass@1
182
+ value: 57.16
183
+ veriefied: false
184
+ - task:
185
+ type: text-generation
186
+ dataset:
187
+ type: code
188
+ name: HumanEvalFix
189
+ metrics:
190
+ - name: pass@1
191
+ type: pass@1
192
+ value: 65.85
193
+ veriefied: false
194
+ - task:
195
+ type: text-generation
196
+ dataset:
197
+ type: code
198
+ name: MBPP
199
+ metrics:
200
+ - name: pass@1
201
+ type: pass@1
202
+ value: 49.60
203
+ veriefied: false
204
+ - task:
205
+ type: text-generation
206
+ dataset:
207
+ type: math
208
+ name: GSM8K
209
+ metrics:
210
+ - name: pass@1
211
+ type: pass@1
212
+ value: 68.99
213
+ veriefied: false
214
+ - task:
215
+ type: text-generation
216
+ dataset:
217
+ type: math
218
+ name: MATH
219
+ metrics:
220
+ - name: pass@1
221
+ type: pass@1
222
+ value: 30.94
223
+ veriefied: false
224
+ - task:
225
+ type: text-generation
226
+ dataset:
227
+ type: multilingual
228
+ name: PAWS-X (7 langs)
229
+ metrics:
230
+ - name: pass@1
231
+ type: pass@1
232
+ value: 64.94
233
+ veriefied: false
234
+ - task:
235
+ type: text-generation
236
+ dataset:
237
+ type: multilingual
238
+ name: MGSM (6 langs)
239
+ metrics:
240
+ - name: pass@1
241
+ type: pass@1
242
+ value: 48.20
243
+ veriefied: false
244
+
245
+ ---
246
+
247
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
248
+
249
+
250
+ # QuantFactory/granite-3.0-8b-instruct-GGUF
251
+ This is quantized version of [ibm-granite/granite-3.0-8b-instruct](https://huggingface.co/ibm-granite/granite-3.0-8b-instruct) created using llama.cpp
252
+
253
+ # Original Model Card
254
+
255
+
256
+ <!-- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62cd5057674cdb524450093d/1hzxoPwqkBJXshKVVe6_9.png) -->
257
+ <!-- ![image/png](granite-3_0-language-models_Group_1.png) -->
258
+
259
+ # Granite-3.0-8B-Instruct
260
+
261
+ **Model Summary:**
262
+ Granite-3.0-8B-Instruct is a 8B parameter model finetuned from *Granite-3.0-8B-Base* using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets. This model is developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging.
263
+
264
+ - **Developers:** Granite Team, IBM
265
+ - **GitHub Repository:** [ibm-granite/granite-3.0-language-models](https://github.com/ibm-granite/granite-3.0-language-models)
266
+ - **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
267
+ - **Paper:** [Granite 3.0 Language Models](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/paper.pdf)
268
+ - **Release Date**: October 21st, 2024
269
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
270
+
271
+ **Supported Languages:**
272
+ English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 3.0 models for languages beyond these 12 languages.
273
+
274
+ **Intended use:**
275
+ The model is designed to respond to general instructions and can be used to build AI assistants for multiple domains, including business applications.
276
+
277
+ *Capabilities*
278
+ * Summarization
279
+ * Text classification
280
+ * Text extraction
281
+ * Question-answering
282
+ * Retrieval Augmented Generation (RAG)
283
+ * Code related tasks
284
+ * Function-calling tasks
285
+ * Multilingual dialog use cases
286
+
287
+ **Generation:**
288
+ This is a simple example of how to use Granite-3.0-8B-Instruct model.
289
+
290
+ Install the following libraries:
291
+
292
+ ```shell
293
+ pip install torch torchvision torchaudio
294
+ pip install accelerate
295
+ pip install transformers
296
+ ```
297
+ Then, copy the snippet from the section that is relevant for your use case.
298
+
299
+ ```python
300
+ import torch
301
+ from transformers import AutoModelForCausalLM, AutoTokenizer
302
+
303
+ device = "auto"
304
+ model_path = "ibm-granite/granite-3.0-8b-instruct"
305
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
306
+ # drop device_map if running on CPU
307
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
308
+ model.eval()
309
+ # change input text as desired
310
+ chat = [
311
+ { "role": "user", "content": "Please list one IBM Research laboratory located in the United States. You should only output its name and location." },
312
+ ]
313
+ chat = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
314
+ # tokenize the text
315
+ input_tokens = tokenizer(chat, return_tensors="pt").to(device)
316
+ # generate output tokens
317
+ output = model.generate(**input_tokens,
318
+ max_new_tokens=100)
319
+ # decode output tokens into text
320
+ output = tokenizer.batch_decode(output)
321
+ # print output
322
+ print(output)
323
+ ```
324
+
325
+ **Model Architecture:**
326
+ Granite-3.0-8B-Instruct is based on a decoder-only dense transformer architecture. Core components of this architecture are: GQA and RoPE, MLP with SwiGLU, RMSNorm, and shared input/output embeddings.
327
+
328
+ | Model | 2B Dense | 8B Dense | 1B MoE | 3B MoE |
329
+ | :-------- | :--------| :-------- | :------| :------|
330
+ | Embedding size | 2048 | **4096** | 1024 | 1536 |
331
+ | Number of layers | 40 | **40** | 24 | 32 |
332
+ | Attention head size | 64 | **128** | 64 | 64 |
333
+ | Number of attention heads | 32 | **32** | 16 | 24 |
334
+ | Number of KV heads | 8 | **8** | 8 | 8 |
335
+ | MLP hidden size | 8192 | **12800** | 512 | 512 |
336
+ | MLP activation | SwiGLU | **SwiGLU** | SwiGLU | SwiGLU |
337
+ | Number of Experts | — | **—** | 32 | 40 |
338
+ | MoE TopK | — | **—** | 8 | 8 |
339
+ | Initialization std | 0.1 | **0.1** | 0.1 | 0.1 |
340
+ | Sequence Length | 4096 | **4096** | 4096 | 4096 |
341
+ | Position Embedding | RoPE | **RoPE** | RoPE | RoPE |
342
+ | # Paremeters | 2.5B | **8.1B** | 1.3B | 3.3B |
343
+ | # Active Parameters | 2.5B | **8.1B** | 400M | 800M |
344
+ | # Training tokens | 12T | **12T** | 10T | 10T |
345
+
346
+ **Training Data:**
347
+ Overall, our SFT data is largely comprised of three key sources: (1) publicly available datasets with permissive license, (2) internal synthetic data targeting specific capabilities, and (3) very small amounts of human-curated data. A detailed attribution of datasets can be found in the [Granite Technical Report](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/paper.pdf) and [Accompanying Author List](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/author-ack.pdf).
348
+
349
+ **Infrastructure:**
350
+ We train Granite 3.0 Language Models using IBM's super computing cluster, Blue Vela, which is outfitted with NVIDIA H100 GPUs. This cluster provides a scalable and efficient infrastructure for training our models over thousands of GPUs while minimizing environmental impact by utilizing 100% renewable energy sources.
351
+
352
+ **Ethical Considerations and Limitations:**
353
+ Granite 3.0 Instruct Models are primarily finetuned using instruction-response pairs mostly in English, but also multilingual data covering eleven languages. Although this model can handle multilingual dialog use cases, its performance might not be similar to English tasks. In such case, introducing a small number of examples (few-shot) can help the model in generating more accurate outputs. While this model has been aligned by keeping safety in consideration, the model may in some cases produce inaccurate, biased, or unsafe responses to user prompts. So we urge the community to use this model with proper safety testing and tuning tailored for their specific tasks.
354
+
355
+ <!-- ## Citation
356
+ ```
357
+ @misc{granite-models,
358
+ author = {author 1, author2, ...},
359
+ title = {},
360
+ journal = {},
361
+ volume = {},
362
+ year = {2024},
363
+ url = {https://arxiv.org/abs/0000.00000},
364
+ }
365
+ ``` -->