mav23 commited on
Commit
2f2c050
1 Parent(s): 4bd697e

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +301 -0
  3. granite-3.0-8b-base.Q4_0.gguf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ granite-3.0-8b-base.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: text-generation
3
+ inference: false
4
+ license: apache-2.0
5
+ library_name: transformers
6
+ tags:
7
+ - language
8
+ - granite-3.0
9
+ model-index:
10
+ - name: granite-3.0-8b-base
11
+ results:
12
+ - task:
13
+ type: text-generation
14
+ dataset:
15
+ type: human-exams
16
+ name: MMLU
17
+ metrics:
18
+ - name: pass@1
19
+ type: pass@1
20
+ value: 65.54
21
+ veriefied: false
22
+ - task:
23
+ type: text-generation
24
+ dataset:
25
+ type: human-exams
26
+ name: MMLU-Pro
27
+ metrics:
28
+ - name: pass@1
29
+ type: pass@1
30
+ value: 33.27
31
+ veriefied: false
32
+ - task:
33
+ type: text-generation
34
+ dataset:
35
+ type: human-exams
36
+ name: AGI-Eval
37
+ metrics:
38
+ - name: pass@1
39
+ type: pass@1
40
+ value: 34.45
41
+ veriefied: false
42
+ - task:
43
+ type: text-generation
44
+ dataset:
45
+ type: commonsense
46
+ name: WinoGrande
47
+ metrics:
48
+ - name: pass@1
49
+ type: pass@1
50
+ value: 80.90
51
+ veriefied: false
52
+ - task:
53
+ type: text-generation
54
+ dataset:
55
+ type: commonsense
56
+ name: OBQA
57
+ metrics:
58
+ - name: pass@1
59
+ type: pass@1
60
+ value: 46.80
61
+ veriefied: false
62
+ - task:
63
+ type: text-generation
64
+ dataset:
65
+ type: commonsense
66
+ name: SIQA
67
+ metrics:
68
+ - name: pass@1
69
+ type: pass@1
70
+ value: 67.80
71
+ veriefied: false
72
+ - task:
73
+ type: text-generation
74
+ dataset:
75
+ type: commonsense
76
+ name: PIQA
77
+ metrics:
78
+ - name: pass@1
79
+ type: pass@1
80
+ value: 82.32
81
+ veriefied: false
82
+ - task:
83
+ type: text-generation
84
+ dataset:
85
+ type: commonsense
86
+ name: Hellaswag
87
+ metrics:
88
+ - name: pass@1
89
+ type: pass@1
90
+ value: 83.61
91
+ veriefied: false
92
+ - task:
93
+ type: text-generation
94
+ dataset:
95
+ type: commonsense
96
+ name: TruthfulQA
97
+ metrics:
98
+ - name: pass@1
99
+ type: pass@1
100
+ value: 52.89
101
+ veriefied: false
102
+ - task:
103
+ type: text-generation
104
+ dataset:
105
+ type: reading-comprehension
106
+ name: BoolQ
107
+ metrics:
108
+ - name: pass@1
109
+ type: pass@1
110
+ value: 86.97
111
+ veriefied: false
112
+ - task:
113
+ type: text-generation
114
+ dataset:
115
+ type: reading-comprehension
116
+ name: SQuAD 2.0
117
+ metrics:
118
+ - name: pass@1
119
+ type: pass@1
120
+ value: 32.92
121
+ veriefied: false
122
+ - task:
123
+ type: text-generation
124
+ dataset:
125
+ type: reasoning
126
+ name: ARC-C
127
+ metrics:
128
+ - name: pass@1
129
+ type: pass@1
130
+ value: 63.40
131
+ veriefied: false
132
+ - task:
133
+ type: text-generation
134
+ dataset:
135
+ type: reasoning
136
+ name: GPQA
137
+ metrics:
138
+ - name: pass@1
139
+ type: pass@1
140
+ value: 32.13
141
+ veriefied: false
142
+ - task:
143
+ type: text-generation
144
+ dataset:
145
+ type: reasoning
146
+ name: BBH
147
+ metrics:
148
+ - name: pass@1
149
+ type: pass@1
150
+ value: 49.31
151
+ veriefied: false
152
+ - task:
153
+ type: text-generation
154
+ dataset:
155
+ type: reasoning
156
+ name: MUSR
157
+ metrics:
158
+ - name: pass@1
159
+ type: pass@1
160
+ value: 41.08
161
+ veriefied: false
162
+ - task:
163
+ type: text-generation
164
+ dataset:
165
+ type: code
166
+ name: HumanEval
167
+ metrics:
168
+ - name: pass@1
169
+ type: pass@1
170
+ value: 52.44
171
+ veriefied: false
172
+ - task:
173
+ type: text-generation
174
+ dataset:
175
+ type: code
176
+ name: MBPP
177
+ metrics:
178
+ - name: pass@1
179
+ type: pass@1
180
+ value: 41.40
181
+ veriefied: false
182
+ - task:
183
+ type: text-generation
184
+ dataset:
185
+ type: math
186
+ name: GSM8K
187
+ metrics:
188
+ - name: pass@1
189
+ type: pass@1
190
+ value: 64.06
191
+ veriefied: false
192
+ - task:
193
+ type: text-generation
194
+ dataset:
195
+ type: math
196
+ name: MATH
197
+ metrics:
198
+ - name: pass@1
199
+ type: pass@1
200
+ value: 29.28
201
+ veriefied: false
202
+ ---
203
+ <!-- ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62cd5057674cdb524450093d/1hzxoPwqkBJXshKVVe6_9.png) -->
204
+ <!-- ![image/png](granite-3_0-language-models_Group_1.png) -->
205
+
206
+ # Granite-3.0-8B-Base
207
+
208
+ **Model Summary:**
209
+ 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.
210
+
211
+ - **Developers:** Granite Team, IBM
212
+ - **GitHub Repository:** [ibm-granite/granite-3.0-language-models](https://github.com/ibm-granite/granite-3.0-language-models)
213
+ - **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
214
+ - **Paper:** [Granite 3.0 Language Models](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/paper.pdf)
215
+ - **Release Date**: October 21st, 2024
216
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
217
+
218
+ **Supported Languages:**
219
+ 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.
220
+
221
+ **Intended use:**
222
+ 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.
223
+
224
+ **Generation:**
225
+ This is a simple example of how to use Granite-3.0-8B-Base model.
226
+
227
+ Install the following libraries:
228
+
229
+ ```shell
230
+ pip install torch torchvision torchaudio
231
+ pip install accelerate
232
+ pip install transformers
233
+ ```
234
+ Then, copy the code snippet below to run the example.
235
+
236
+ ```python
237
+ from transformers import AutoModelForCausalLM, AutoTokenizer
238
+ device = "auto"
239
+ model_path = "ibm-granite/granite-3.0-8b-base"
240
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
241
+ # drop device_map if running on CPU
242
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
243
+ model.eval()
244
+ # change input text as desired
245
+ input_text = "Where is the Thomas J. Watson Research Center located?"
246
+ # tokenize the text
247
+ input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
248
+ # generate output tokens
249
+ output = model.generate(**input_tokens,
250
+ max_length=4000)
251
+ # decode output tokens into text
252
+ output = tokenizer.batch_decode(output)
253
+ # print output
254
+ print(output)
255
+ ```
256
+
257
+ **Model Architecture:**
258
+ 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.
259
+
260
+ | Model | 2B Dense | 8B Dense | 1B MoE | 3B MoE |
261
+ | :-------- | :--------| :-------- | :------| :------|
262
+ | Embedding size | 2048 | **4096** | 1024 | 1536 |
263
+ | Number of layers | 40 | **40** | 24 | 32 |
264
+ | Attention head size | 64 | **128** | 64 | 64 |
265
+ | Number of attention heads | 32 | **32** | 16 | 24 |
266
+ | Number of KV heads | 8 | **8** | 8 | 8 |
267
+ | MLP hidden size | 8192 | **12800** | 512 | 512 |
268
+ | MLP activation | SwiGLU | **SwiGLU** | SwiGLU | SwiGLU |
269
+ | Number of Experts | — | **—** | 32 | 40 |
270
+ | MoE TopK | — | **—** | 8 | 8 |
271
+ | Initialization std | 0.1 | **0.1** | 0.1 | 0.1 |
272
+ | Sequence Length | 4096 | **4096** | 4096 | 4096 |
273
+ | Position Embedding | RoPE | **RoPE** | RoPE | RoPE |
274
+ | # Parameters | 2.5B | **8.1B** | 1.3B | 3.3B |
275
+ | # Active Parameters | 2.5B | **8.1B** | 400M | 800M |
276
+ | # Training tokens | 12T | **12T** | 10T | 10T |
277
+
278
+ **Training Data:**
279
+ This model is trained on a mix of open source and proprietary data following a two-stage training strategy.
280
+ * Stage 1 data: The data for stage 1 is sourced from diverse domains, such as: web, code, academic sources, books, and math data.
281
+ * 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.
282
+
283
+ 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).
284
+
285
+ **Infrastructure:**
286
+ 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.
287
+
288
+ **Ethical Considerations and Limitations:**
289
+ 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.
290
+
291
+ <!-- ## Citation
292
+ ```
293
+ @misc{granite-models,
294
+ author = {author 1, author2, ...},
295
+ title = {},
296
+ journal = {},
297
+ volume = {},
298
+ year = {2024},
299
+ url = {https://arxiv.org/abs/0000.00000},
300
+ }
301
+ ``` -->
granite-3.0-8b-base.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbf53ff90837a059aa59c1dc0bd3b5cb03dbfc715aec24c92b6037495f6a75e4
3
+ size 4650881856