aashish1904 commited on
Commit
861143b
1 Parent(s): 4882426

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +314 -0
README.md ADDED
@@ -0,0 +1,314 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-8b-base
13
+ results:
14
+ - task:
15
+ type: text-generation
16
+ dataset:
17
+ type: human-exams
18
+ name: MMLU
19
+ metrics:
20
+ - name: pass@1
21
+ type: pass@1
22
+ value: 65.54
23
+ veriefied: false
24
+ - task:
25
+ type: text-generation
26
+ dataset:
27
+ type: human-exams
28
+ name: MMLU-Pro
29
+ metrics:
30
+ - name: pass@1
31
+ type: pass@1
32
+ value: 33.27
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: 34.45
43
+ veriefied: false
44
+ - task:
45
+ type: text-generation
46
+ dataset:
47
+ type: commonsense
48
+ name: WinoGrande
49
+ metrics:
50
+ - name: pass@1
51
+ type: pass@1
52
+ value: 80.90
53
+ veriefied: false
54
+ - task:
55
+ type: text-generation
56
+ dataset:
57
+ type: commonsense
58
+ name: OBQA
59
+ metrics:
60
+ - name: pass@1
61
+ type: pass@1
62
+ value: 46.80
63
+ veriefied: false
64
+ - task:
65
+ type: text-generation
66
+ dataset:
67
+ type: commonsense
68
+ name: SIQA
69
+ metrics:
70
+ - name: pass@1
71
+ type: pass@1
72
+ value: 67.80
73
+ veriefied: false
74
+ - task:
75
+ type: text-generation
76
+ dataset:
77
+ type: commonsense
78
+ name: PIQA
79
+ metrics:
80
+ - name: pass@1
81
+ type: pass@1
82
+ value: 82.32
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: 83.61
93
+ veriefied: false
94
+ - task:
95
+ type: text-generation
96
+ dataset:
97
+ type: commonsense
98
+ name: TruthfulQA
99
+ metrics:
100
+ - name: pass@1
101
+ type: pass@1
102
+ value: 52.89
103
+ veriefied: false
104
+ - task:
105
+ type: text-generation
106
+ dataset:
107
+ type: reading-comprehension
108
+ name: BoolQ
109
+ metrics:
110
+ - name: pass@1
111
+ type: pass@1
112
+ value: 86.97
113
+ veriefied: false
114
+ - task:
115
+ type: text-generation
116
+ dataset:
117
+ type: reading-comprehension
118
+ name: SQuAD 2.0
119
+ metrics:
120
+ - name: pass@1
121
+ type: pass@1
122
+ value: 32.92
123
+ veriefied: false
124
+ - task:
125
+ type: text-generation
126
+ dataset:
127
+ type: reasoning
128
+ name: ARC-C
129
+ metrics:
130
+ - name: pass@1
131
+ type: pass@1
132
+ value: 63.40
133
+ veriefied: false
134
+ - task:
135
+ type: text-generation
136
+ dataset:
137
+ type: reasoning
138
+ name: GPQA
139
+ metrics:
140
+ - name: pass@1
141
+ type: pass@1
142
+ value: 32.13
143
+ veriefied: false
144
+ - task:
145
+ type: text-generation
146
+ dataset:
147
+ type: reasoning
148
+ name: BBH
149
+ metrics:
150
+ - name: pass@1
151
+ type: pass@1
152
+ value: 49.31
153
+ veriefied: false
154
+ - task:
155
+ type: text-generation
156
+ dataset:
157
+ type: reasoning
158
+ name: MUSR
159
+ metrics:
160
+ - name: pass@1
161
+ type: pass@1
162
+ value: 41.08
163
+ veriefied: false
164
+ - task:
165
+ type: text-generation
166
+ dataset:
167
+ type: code
168
+ name: HumanEval
169
+ metrics:
170
+ - name: pass@1
171
+ type: pass@1
172
+ value: 52.44
173
+ veriefied: false
174
+ - task:
175
+ type: text-generation
176
+ dataset:
177
+ type: code
178
+ name: MBPP
179
+ metrics:
180
+ - name: pass@1
181
+ type: pass@1
182
+ value: 41.40
183
+ veriefied: false
184
+ - task:
185
+ type: text-generation
186
+ dataset:
187
+ type: math
188
+ name: GSM8K
189
+ metrics:
190
+ - name: pass@1
191
+ type: pass@1
192
+ value: 64.06
193
+ veriefied: false
194
+ - task:
195
+ type: text-generation
196
+ dataset:
197
+ type: math
198
+ name: MATH
199
+ metrics:
200
+ - name: pass@1
201
+ type: pass@1
202
+ value: 29.28
203
+ veriefied: false
204
+
205
+ ---
206
+
207
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
208
+
209
+
210
+ # QuantFactory/granite-3.0-8b-base-GGUF
211
+ This is quantized version of [ibm-granite/granite-3.0-8b-base](https://huggingface.co/ibm-granite/granite-3.0-8b-base) created using llama.cpp
212
+
213
+ # Original Model Card
214
+
215
+ <!-- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62cd5057674cdb524450093d/1hzxoPwqkBJXshKVVe6_9.png) -->
216
+ <!-- ![image/png](granite-3_0-language-models_Group_1.png) -->
217
+
218
+ # Granite-3.0-8B-Base
219
+
220
+ **Model Summary:**
221
+ Granite-3.0-8B-Base is a decoder-only language model to support a variety of text-to-text generation tasks. It is trained from scratch following a two-stage training strategy. In the first stage, it is trained on 10 trillion tokens sourced from diverse domains. During the second stage, it is further trained on 2 trillion tokens using a carefully curated mix of high-quality data, aiming to enhance its performance on specific tasks.
222
+
223
+ - **Developers:** Granite Team, IBM
224
+ - **GitHub Repository:** [ibm-granite/granite-3.0-language-models](https://github.com/ibm-granite/granite-3.0-language-models)
225
+ - **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
226
+ - **Paper:** [Granite 3.0 Language Models](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/paper.pdf)
227
+ - **Release Date**: October 21st, 2024
228
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
229
+
230
+ **Supported Languages:**
231
+ 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.
232
+
233
+ **Intended use:**
234
+ Prominent use cases of LLMs in text-to-text generation include summarization, text classification, extraction, question-answering, and more. All Granite Base models are able to handle these tasks as they were trained on a large amount of data from various domains. Moreover, they can serve as baseline to create specialized models for specific application scenarios.
235
+
236
+ **Generation:**
237
+ This is a simple example of how to use Granite-3.0-8B-Base model.
238
+
239
+ Install the following libraries:
240
+
241
+ ```shell
242
+ pip install torch torchvision torchaudio
243
+ pip install accelerate
244
+ pip install transformers
245
+ ```
246
+ Then, copy the code snippet below to run the example.
247
+
248
+ ```python
249
+ from transformers import AutoModelForCausalLM, AutoTokenizer
250
+ device = "auto"
251
+ model_path = "ibm-granite/granite-3.0-8b-base"
252
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
253
+ # drop device_map if running on CPU
254
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
255
+ model.eval()
256
+ # change input text as desired
257
+ input_text = "Where is the Thomas J. Watson Research Center located?"
258
+ # tokenize the text
259
+ input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
260
+ # generate output tokens
261
+ output = model.generate(**input_tokens,
262
+ max_length=4000)
263
+ # decode output tokens into text
264
+ output = tokenizer.batch_decode(output)
265
+ # print output
266
+ print(output)
267
+ ```
268
+
269
+ **Model Architecture:**
270
+ Granite-3.0-8B-Base 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.
271
+
272
+ | Model | 2B Dense | 8B Dense | 1B MoE | 3B MoE |
273
+ | :-------- | :--------| :-------- | :------| :------|
274
+ | Embedding size | 2048 | **4096** | 1024 | 1536 |
275
+ | Number of layers | 40 | **40** | 24 | 32 |
276
+ | Attention head size | 64 | **128** | 64 | 64 |
277
+ | Number of attention heads | 32 | **32** | 16 | 24 |
278
+ | Number of KV heads | 8 | **8** | 8 | 8 |
279
+ | MLP hidden size | 8192 | **12800** | 512 | 512 |
280
+ | MLP activation | SwiGLU | **SwiGLU** | SwiGLU | SwiGLU |
281
+ | Number of Experts | — | **—** | 32 | 40 |
282
+ | MoE TopK | — | **—** | 8 | 8 |
283
+ | Initialization std | 0.1 | **0.1** | 0.1 | 0.1 |
284
+ | Sequence Length | 4096 | **4096** | 4096 | 4096 |
285
+ | Position Embedding | RoPE | **RoPE** | RoPE | RoPE |
286
+ | # Paremeters | 2.5B | **8.1B** | 1.3B | 3.3B |
287
+ | # Active Parameters | 2.5B | **8.1B** | 400M | 800M |
288
+ | # Training tokens | 12T | **12T** | 10T | 10T |
289
+
290
+ **Training Data:**
291
+ This model is trained on a mix of open source and proprietary data following a two-stage training strategy.
292
+ * Stage 1 data: The data for stage 1 is sourced from diverse domains, such as: web, code, academic sources, books, and math data.
293
+ * Stage 2 data: The data for stage 2 comprises a curated mix of high-quality data from the same domains, plus multilingual and instruction data. The goal of this second training phase is to enhance the model’s performance on specific tasks.
294
+
295
+ 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).
296
+
297
+ **Infrastructure:**
298
+ 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.
299
+
300
+ **Ethical Considerations and Limitations:**
301
+ The use of Large Language Models involves risks and ethical considerations people must be aware of, including but not limited to: bias and fairness, misinformation, and autonomous decision-making. Granite-3.0-8B-Base model is not the exception in this regard. Even though this model is suited for multiple generative AI tasks, it has not undergone any safety alignment, there it may produce problematic outputs. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in generation scenarios by copying text verbatim from the training dataset due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain. Regarding ethics, a latent risk associated with all Large Language Models is their malicious utilization. We urge the community to use Granite-3.0-8B-Base model with ethical intentions and in a responsible way.
302
+
303
+ <!-- ## Citation
304
+ ```
305
+ @misc{granite-models,
306
+ author = {author 1, author2, ...},
307
+ title = {},
308
+ journal = {},
309
+ volume = {},
310
+ year = {2024},
311
+ url = {https://arxiv.org/abs/0000.00000},
312
+ }
313
+ ``` -->
314
+