cgus commited on
Commit
b4d0f34
·
verified ·
1 Parent(s): e6cf8a0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +318 -0
README.md ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: text-generation
3
+ inference: false
4
+ license: apache-2.0
5
+ tags:
6
+ - language
7
+ - granite-3.2
8
+ base_model:
9
+ - ibm-granite/granite-3.2-8b-instruct-preview
10
+ ---
11
+ # Granite-3.2-8B-Instruct-Preview-iMat-GGUF
12
+ Original model: [Granite-3.2-8B-Instruct-Preview](https://huggingface.co/ibm-granite/granite-3.2-8b-instruct-preview)
13
+ Made by: [Granite Team, IBM](https://huggingface.co/ibm-granite)
14
+
15
+ ## Quantization notes
16
+ Made with llama.cpp-b4608 with imatrix file based on exllamav2 default dataset.
17
+ These quants should work with lots of apps with llama.cpp engine: Jan, KoboldCpp, LM Studio, Text-Generation-WebUI, etc.
18
+
19
+ # Original model card
20
+ # Granite-3.2-8B-Instruct-Preview
21
+
22
+ **Model Summary:**
23
+ Granite-3.2-8B-Instruct-Preview is an early release of an 8B long-context model fine-tuned for enhanced reasoning (thinking) capabilities. Built on top of [Granite-3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct), it has been trained using a mix of permissively licensed open-source datasets and internally generated synthetic data designed for reasoning tasks. The model allows controllability of its thinking capability, ensuring it is applied only when required.
24
+
25
+ <!-- is preview release of a finetuned mdpeis a 8B parameter long-context instruct model finetuned from Granite-3.1-8B-Instruct using a combination of open source instruction datasets with permissive license and internally collected synthetic datasets tailored for solving long context problems. This model is finetuned to reason
26
+
27
+ developed using a diverse set of techniques with a structured chat format, including supervised finetuning, model alignment using reinforcement learning, and model merging. -->
28
+
29
+ - **Developers:** Granite Team, IBM
30
+ - **Website**: [Granite Docs](https://www.ibm.com/granite/docs/)
31
+ - **Release Date**: February 7th, 2025
32
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
33
+
34
+ **Supported Languages:**
35
+ English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. However, users may finetune this Granite model for languages beyond these 12 languages.
36
+
37
+ **Intended Use:**
38
+ The model is designed to respond to general instructions and can be used to build AI assistants for multiple domains, including business applications.
39
+
40
+ **Capabilities**
41
+ * **Thinking**
42
+ * Summarization
43
+ * Text classification
44
+ * Text extraction
45
+ * Question-answering
46
+ * Retrieval Augmented Generation (RAG)
47
+ * Code related tasks
48
+ * Function-calling tasks
49
+ * Multilingual dialog use cases
50
+ * Long-context tasks including long document/meeting summarization, long document QA, etc.
51
+
52
+ **Generation:**
53
+ This is a simple example of how to use Granite-3.2-8B-Instruct-Preview model.
54
+
55
+ Install the following libraries:
56
+
57
+ ```shell
58
+ pip install torch torchvision torchaudio
59
+ pip install accelerate
60
+ pip install transformers
61
+ ```
62
+ Then, copy the snippet from the section that is relevant for your use case.
63
+
64
+ ```python
65
+ from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed
66
+ import torch
67
+
68
+ model_path="ibm-granite/granite-3.2-8b-instruct-preview"
69
+ device="cuda"
70
+ model = AutoModelForCausalLM.from_pretrained(
71
+ model_path,
72
+ device_map=device,
73
+ torch_dtype=torch.bfloat16,
74
+ )
75
+ tokenizer = AutoTokenizer.from_pretrained(
76
+ model_path
77
+ )
78
+
79
+ conv = [{"role": "user", "content":"How do I develop a skill?"}]
80
+
81
+ input_ids = tokenizer.apply_chat_template(conv, return_tensors="pt", thinking=True, return_dict=True, add_generation_prompt=True).to(device)
82
+
83
+ set_seed(42)
84
+ output = model.generate(
85
+ **input_ids,
86
+ max_new_tokens=8192,
87
+ )
88
+
89
+ prediction = tokenizer.decode(output[0, input_ids["input_ids"].shape[1]:], skip_special_tokens=True)
90
+ print(prediction)
91
+ ```
92
+
93
+ **Example Outputs**
94
+ - thinking=True
95
+ ```md
96
+ Here is my thought process:
97
+
98
+ 1. Understand the user's intent: The user is seeking guidance on how to develop a new skill.
99
+ 2. Break down the process: Skills development involves several stages - identification, planning, practice, feedback, and refinement.
100
+ 3. Consider different aspects: Discuss various methods, mindset, and resources needed for effective skill acquisition.
101
+ 4. Provide actionable steps: Offer a structured approach that the user can follow.
102
+
103
+ Here is my response:
104
+
105
+ Developing a new skill is a systematic process that involves several key steps and a dedicated mindset. Here's a comprehensive guide to help you effectively cultivate a new skill:
106
+
107
+ ### 1. **Identify the Skill**
108
+ - **Clarity of Purpose**: Clearly define what skill you want to acquire. Be specific about why you want this skill and how it aligns with your goals or interests.
109
+ - **Research**: Understand the basics of the skill. Read about it, watch tutorials, or talk to people who are already proficient. This initial research will give you a realistic understanding of what the skill entails.
110
+
111
+ ### 2. **Set Clear Goals**
112
+ - **SMART Goals**: Make sure your goals are Specific, Measurable, Achievable, Relevant, and Time-bound. For example, instead of saying "I want to learn programming," set a goal like "I will complete a beginner's Python course within three months."
113
+ - **Break Down**: If the skill is complex, break it down into smaller, manageable milestones.
114
+
115
+ ### 3. **Create a Learning Plan**
116
+ - **Resources**: Identify the best resources for learning. These could be online courses, books, mentors, workshops, or practical projects.
117
+ - **Schedule**: Dedicate time in your routine for skill practice. Consistency is crucial in skill development. Treat your learning time as non-negotiable.
118
+
119
+ ### 4. **Start with the Basics**
120
+ - **Foundational Knowledge**: Begin by grasping the fundamentals. Understanding the basics thoroughly sets a strong foundation for more advanced learning.
121
+ - **Practice Regularly**: Regular, focused practice is essential. Even 15-30 minutes a day can yield significant results over time.
122
+
123
+ ### 5. **Seek Feedback and Guidance**
124
+ - **Mentorship**: If possible, find a mentor or join a community of learners. Feedback from experienced individuals can accelerate your learning curve.
125
+ - **Peer Learning**: Engage with others learning the same skill. Peer groups provide support, motivation, and different perspectives.
126
+
127
+ ### 6. **Apply the Skill in Real-World Scenarios**
128
+ - **Practical Application**: Look for opportunities to apply what you've learned. This could be through projects, internships, or volunteering. Practical application solidifies your understanding and builds confidence.
129
+ - **Iterate Based on Feedback**: After applying your skill, seek and incorporate feedback to refine and improve.
130
+
131
+ ### 7. **Maintain a Growth Mindset**
132
+ - **Embrace Challenges**: Understand that setbacks and failures are part of the learning process. Maintain a positive attitude and view them as opportunities to learn.
133
+ - **Patience and Persistence**: Skill development takes time. Stay patient and persistent, even when progress seems slow.
134
+
135
+ ### 8. **Track and Reflect**
136
+ - **Progress Tracking**: Regularly review your progress. This could be through keeping a learning journal or using apps designed for skill tracking.
137
+ - **Reflect and Adjust**: Periodically reflect on your learning process. What's working? What's not? Adjust your plan accordingly.
138
+
139
+ ### 9. **Stay Motivated**
140
+ - **Reward System**: Set small rewards for achieving milestones to keep yourself motivated.
141
+ - **Stay Curious**: Keep your interest piqued by exploring related topics or advanced aspects of the skill.
142
+
143
+ By following these steps and maintaining a disciplined, growth-oriented approach, you can effectively develop any new skill. Remember, the key is consistent effort and a willingness to learn from both successes and failures.
144
+
145
+ Building skills is an ongoing journey, not a destination.
146
+ ```
147
+ - thinking=False
148
+ ```md
149
+ Developing a skill involves a combination of learning, practice, and often, feedback. Here's a step-by-step guide to help you develop a new skill:
150
+
151
+ 1. **Identify the Skill**: Start by clearly defining what skill you want to develop. Be specific. Instead of saying "I want to learn to code," specify a programming language like Python or JavaScript.
152
+
153
+ 2. **Research**: Learn about the basics of the skill. Read books, articles, watch tutorials, or take online courses. Websites like Coursera, Udemy, Khan Academy, and YouTube can be great resources.
154
+
155
+ 3. **Set Clear Goals**: Break down your skill into smaller, manageable goals. For example, if you're learning a new language, your goals might be to learn basic grammar, build a simple sentence, have a basic conversation, etc.
156
+
157
+ 4. **Create a Study Plan**: Allocate specific time each day or week for learning and practicing. Consistency is key in skill development.
158
+
159
+ 5. **Practice**: Apply what you've learned. Practice makes permanent. If you're learning to code, write small programs. If it's a musical instrument, play regularly.
160
+
161
+ 6. **Get Feedback**: Seek feedback from others who are more experienced. This could be a mentor, a tutor, or even online communities. Constructive criticism can help you identify areas for improvement.
162
+
163
+ 7. **Review and Refine**: Regularly review what you've learned. Refine your skills based on feedback and your own observations.
164
+
165
+ 8. **Apply in Real Life**: Try to use your new skill in real-life situations. This could be a project at work, a personal hobby, or volunteering.
166
+
167
+ 9. **Be Patient and Persistent**: Skill development takes time. Don't get discouraged by slow progress or setbacks. Keep practicing and learning.
168
+
169
+ 10. **Stay Motivated**: Keep your end goal in mind and celebrate small victories along the way to stay motivated.
170
+
171
+ Remember, everyone learns at their own pace, so don't compare your progress with others. The most important thing is that you're consistently moving forward.
172
+ ```
173
+
174
+ **Evaluation Results:**
175
+ <table>
176
+
177
+ <thead>
178
+ <tr>
179
+ <th style="text-align:left; background-color: #001d6c; color: white;">Models</th>
180
+ <th style="text-align:center; background-color: #001d6c; color: white;">ArenaHard</th>
181
+ <th style="text-align:center; background-color: #001d6c; color: white;">Alpaca-Eval-2</th>
182
+ <th style="text-align:center; background-color: #001d6c; color: white;">MMLU</th>
183
+ <th style="text-align:center; background-color: #001d6c; color: white;">PopQA</th>
184
+ <th style="text-align:center; background-color: #001d6c; color: white;">TruthfulQA</th>
185
+ <th style="text-align:center; background-color: #001d6c; color: white;">BigBenchHard</th>
186
+ <th style="text-align:center; background-color: #001d6c; color: white;">DROP</th>
187
+ <th style="text-align:center; background-color: #001d6c; color: white;">GSM8K</th>
188
+ <th style="text-align:center; background-color: #001d6c; color: white;">HumanEval</th>
189
+ <th style="text-align:center; background-color: #001d6c; color: white;">HumanEval+</th>
190
+ <th style="text-align:center; background-color: #001d6c; color: white;">IFEval</th>
191
+ <th style="text-align:center; background-color: #001d6c; color: white;">AttaQ</th>
192
+ </tr></thead>
193
+ <tbody>
194
+ <tr>
195
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">Llama-3.1-8B-Instruct</td>
196
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">36.43</td>
197
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">27.22</td>
198
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">69.15</td>
199
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">28.79</td>
200
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">52.79</td>
201
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">72.66</td>
202
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">61.48</td>
203
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">83.24</td>
204
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">85.32</td>
205
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">80.15</td>
206
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">79.10</td>
207
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">83.43</td>
208
+ </tr>
209
+
210
+ <tr>
211
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">DeepSeek-R1-Distill-Llama-8B</td>
212
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">17.17</td>
213
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">21.85</td>
214
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">45.80</td>
215
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">13.25</td>
216
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">47.43</td>
217
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">65.71</td>
218
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">44.46</td>
219
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">72.18</td>
220
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">67.54</td>
221
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">62.91</td>
222
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">66.50</td>
223
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">42.87</td>
224
+ </tr>
225
+
226
+ <tr>
227
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">Qwen-2.5-7B-Instruct</td>
228
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">25.44</td>
229
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">30.34</td>
230
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">74.30</td>
231
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">18.12</td>
232
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">63.06</td>
233
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">70.40</td>
234
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">54.71</td>
235
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">84.46</td>
236
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">93.35</td>
237
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">89.91</td>
238
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">74.90</td>
239
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">81.90</td>
240
+ </tr>
241
+
242
+ <tr>
243
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">DeepSeek-R1-Distill-Qwen-7B</td>
244
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">10.36</td>
245
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">15.35</td>
246
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">50.72</td>
247
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">9.94</td>
248
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">47.14</td>
249
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">65.04</td>
250
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">42.76</td>
251
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">78.47</td>
252
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">79.89</td>
253
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">78.43</td>
254
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">59.10</td>
255
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">42.45</td>
256
+ </tr>
257
+
258
+ <tr>
259
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">Granite-3.1-8B-Instruct</td>
260
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">37.58</td>
261
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">27.87</td>
262
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">66.84</td>
263
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">28.84</td>
264
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">65.92</td>
265
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">68.10</td>
266
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">50.78</td>
267
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">79.08</td>
268
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">88.82</td>
269
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">84.62</td>
270
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">71.20</td>
271
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">85.73</td>
272
+ </tr>
273
+
274
+ <tr>
275
+ <td style="text-align:left; background-color: #DAE8FF; color: black;">Granite-3.2-8B-Instruct-Preview</td>
276
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">55.23</td>
277
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">61.16</td>
278
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">66.93</td>
279
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">28.08</td>
280
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">66.37</td>
281
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">65.60</td>
282
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">50.73</td>
283
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">83.09</td>
284
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">89.47</td>
285
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">86.88</td>
286
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">73.57</td>
287
+ <td style="text-align:center; background-color: #DAE8FF; color: black;">85.99</td>
288
+ </tr>
289
+
290
+ </tbody></table>
291
+
292
+ **Training Data:**
293
+ Overall, our training data is largely comprised of two key sources: (1) publicly available datasets with permissive license, (2) internal synthetically generated data targeted to enhance reasoning capabilites.
294
+ <!-- A detailed attribution of datasets can be found in [Granite 3.2 Technical Report (coming soon)](#), and [Accompanying Author List](https://github.com/ibm-granite/granite-3.0-language-models/blob/main/author-ack.pdf). -->
295
+
296
+ **Infrastructure:**
297
+ We train Granite-3.2-8B-Instruct-Preview 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.
298
+
299
+ **Ethical Considerations and Limitations:**
300
+ Granite-3.2-8B-Instruct-Preview builds upon Granite-3.1-8B-Instruct, leveraging both permissively licensed open-source and select proprietary data for enhanced performance. Since it inherits its foundation from the previous model, all ethical considerations and limitations applicable to [Granite-3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct) remain relevant.
301
+
302
+
303
+ **Resources**
304
+ - ⭐️ Learn about the latest updates with Granite: https://www.ibm.com/granite
305
+ - 📄 Get started with tutorials, best practices, and prompt engineering advice: https://www.ibm.com/granite/docs/
306
+ - 💡 Learn about the latest Granite learning resources: https://ibm.biz/granite-learning-resources
307
+
308
+ <!-- ## Citation
309
+ ```
310
+ @misc{granite-models,
311
+ author = {author 1, author2, ...},
312
+ title = {},
313
+ journal = {},
314
+ volume = {},
315
+ year = {2024},
316
+ url = {https://arxiv.org/abs/0000.00000},
317
+ }
318
+ ``` -->