aashish1904 commited on
Commit
942633a
1 Parent(s): 196d996

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-1b-a400m-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: 25.69
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: 11.38
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: 19.96
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: 62.43
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: 39.00
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: 35.76
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: 75.35
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: 64.92
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: 39.49
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: 65.44
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: 17.78
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: 38.14
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: 24.41
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: 29.84
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: 33.99
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: 21.95
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: 23.20
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: 19.26
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: 8.96
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-1b-a400m-base-GGUF
211
+ This is quantized version of [ibm-granite/granite-3.0-1b-a400m-base](https://huggingface.co/ibm-granite/granite-3.0-1b-a400m-base) created using llama.cpp
212
+
213
+ # Original Model Card
214
+
215
+
216
+ <!-- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62cd5057674cdb524450093d/1hzxoPwqkBJXshKVVe6_9.png) -->
217
+ <!-- ![image/png](granite-3_0-language-models_Group_1.png) -->
218
+
219
+ # Granite-3.0-1B-A400M-Base
220
+
221
+ **Model Summary:**
222
+ Granite-3.0-1B-A400M-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 8 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.
223
+
224
+ - **Developers:** Granite Team, IBM
225
+ - **GitHub Repository:** [ibm-granite/granite-3.0-language-models](https://github.com/ibm-granite/granite-3.0-language-models)
226
+ - **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
227
+ - **Paper:** [Granite 3.0 Language Models](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/paper.pdf)
228
+ - **Release Date**: October 21st, 2024
229
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
230
+
231
+ **Supported Languages:**
232
+ 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.
233
+
234
+ **Intended use:**
235
+ 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.
236
+
237
+ **Generation:**
238
+ This is a simple example of how to use Granite-3.0-1B-A400M-Base model.
239
+
240
+ Install the following libraries:
241
+
242
+ ```shell
243
+ pip install torch torchvision torchaudio
244
+ pip install accelerate
245
+ pip install transformers
246
+ ```
247
+ Then, copy the code snippet below to run the example.
248
+
249
+ ```python
250
+ from transformers import AutoModelForCausalLM, AutoTokenizer
251
+ device = "auto"
252
+ model_path = "ibm-granite/granite-3.0-1b-a400m-base"
253
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
254
+ # drop device_map if running on CPU
255
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
256
+ model.eval()
257
+ # change input text as desired
258
+ input_text = "Where is the Thomas J. Watson Research Center located?"
259
+ # tokenize the text
260
+ input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
261
+ # generate output tokens
262
+ output = model.generate(**input_tokens,
263
+ max_length=4000)
264
+ # decode output tokens into text
265
+ output = tokenizer.batch_decode(output)
266
+ # print output
267
+ print(output)
268
+ ```
269
+
270
+ **Model Architecture:**
271
+ Granite-3.0-1B-A400M-Base is based on a decoder-only sparse Mixture of Experts (MoE) transformer architecture. Core components of this architecture are: Fine-grained Experts, Dropless Token Routing, and Load Balancing Loss.
272
+
273
+ | Model | 2B Dense | 8B Dense | 1B MoE | 3B MoE |
274
+ | :-------- | :--------| :--------| :-------- | :--------|
275
+ | Embedding size | 2048 | 4096 | **1024** | 1536 |
276
+ | Number of layers | 40 | 40 | **24** | 32 |
277
+ | Attention head size | 64 | 128 | **64** | 64 |
278
+ | Number of attention heads | 32 | 32 | **16** | 24 |
279
+ | Number of KV heads | 8 | 8 | **8** | 8 |
280
+ | MLP hidden size | 8192 | 12800 | **512** | 512 |
281
+ | MLP activation | SwiGLU | SwiGLU | **SwiGLU** | SwiGLU |
282
+ | Number of Experts | — | — | **32** | 40 |
283
+ | MoE TopK | — | — | **8** | 8 |
284
+ | Initialization std | 0.1 | 0.1 | **0.1** | 0.1 |
285
+ | Sequence Length | 4096 | 4096 | **4096** | 4096 |
286
+ | Position Embedding | RoPE | RoPE | **RoPE** | RoPE |
287
+ | # Paremeters | 2.5B | 8.1B | **1.3B** | 3.3B |
288
+ | # Active Parameters | 2.5B | 8.1B | **400M** | 800M |
289
+ | # Training tokens | 12T | 12T | **10T** | 10T |
290
+
291
+ **Training Data:**
292
+ This model is trained on a mix of open source and proprietary data following a two-stage training strategy.
293
+ * Stage 1 data: The data for stage 1 is sourced from diverse domains, such as: web, code, academic sources, books, and math data.
294
+ * 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.
295
+
296
+ 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).
297
+
298
+ **Infrastructure:**
299
+ 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.
300
+
301
+ **Ethical Considerations and Limitations:**
302
+ 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-1B-A400M-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-1B-A400M-Base model with ethical intentions and in a responsible way.
303
+
304
+ <!-- ## Citation
305
+ ```
306
+ @misc{granite-models,
307
+ author = {author 1, author2, ...},
308
+ title = {},
309
+ journal = {},
310
+ volume = {},
311
+ year = {2024},
312
+ url = {https://arxiv.org/abs/0000.00000},
313
+ }
314
+ ``` -->