Triangle104 commited on
Commit
a336d52
·
verified ·
1 Parent(s): dabc16d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +144 -0
README.md CHANGED
@@ -15,6 +15,150 @@ base_model: ibm-granite/granite-3.2-8b-instruct-preview
15
  This model was converted to GGUF format from [`ibm-granite/granite-3.2-8b-instruct-preview`](https://huggingface.co/ibm-granite/granite-3.2-8b-instruct-preview) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
16
  Refer to the [original model card](https://huggingface.co/ibm-granite/granite-3.2-8b-instruct-preview) for more details on the model.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ## Use with llama.cpp
19
  Install llama.cpp through brew (works on Mac and Linux)
20
 
 
15
  This model was converted to GGUF format from [`ibm-granite/granite-3.2-8b-instruct-preview`](https://huggingface.co/ibm-granite/granite-3.2-8b-instruct-preview) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
16
  Refer to the [original model card](https://huggingface.co/ibm-granite/granite-3.2-8b-instruct-preview) for more details on the model.
17
 
18
+ ---
19
+ Model Summary: 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, 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.
20
+
21
+ Developers: Granite Team, IBM
22
+ Website: Granite Docs
23
+ Release Date: February 7th, 2025
24
+ License: Apache 2.0
25
+
26
+ Supported Languages: 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.
27
+
28
+ Intended Use: The model is designed to respond to general instructions and can be used to build AI assistants for multiple domains, including business applications.
29
+
30
+ Capabilities
31
+
32
+ Thinking
33
+ Summarization
34
+ Text classification
35
+ Text extraction
36
+ Question-answering
37
+ Retrieval Augmented Generation (RAG)
38
+ Code related tasks
39
+ Function-calling tasks
40
+ Multilingual dialog use cases
41
+ Long-context tasks including long document/meeting summarization, long document QA, etc.
42
+
43
+ Generation: This is a simple example of how to use Granite-3.2-8B-Instruct-Preview model.
44
+
45
+ Install the following libraries:
46
+
47
+ pip install torch torchvision torchaudio
48
+ pip install accelerate
49
+ pip install transformers
50
+
51
+ Then, copy the snippet from the section that is relevant for your use case.
52
+
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer, set_seed
54
+ import torch
55
+
56
+ model_path="ibm-granite/granite-3.2-8b-instruct-preview"
57
+ device="cuda"
58
+ model = AutoModelForCausalLM.from_pretrained(
59
+ model_path,
60
+ device_map=device,
61
+ torch_dtype=torch.bfloat16,
62
+ )
63
+ tokenizer = AutoTokenizer.from_pretrained(
64
+ model_path
65
+ )
66
+
67
+ conv = [{"role": "user", "content":"How do I develop a skill?"}]
68
+
69
+ input_ids = tokenizer.apply_chat_template(conv, return_tensors="pt", thinking=True, return_dict=True, add_generation_prompt=True).to(device)
70
+
71
+ set_seed(42)
72
+ output = model.generate(
73
+ **input_ids,
74
+ max_new_tokens=8192,
75
+ )
76
+
77
+ prediction = tokenizer.decode(output[0, input_ids["input_ids"].shape[1]:], skip_special_tokens=True)
78
+ print(prediction)
79
+
80
+ Example Outputs
81
+
82
+ thinking=True
83
+
84
+ Here is my thought process:
85
+
86
+ 1. Understand the user's intent: The user is seeking guidance on how to develop a new skill.
87
+ 2. Break down the process: Skills development involves several stages - identification, planning, practice, feedback, and refinement.
88
+ 3. Consider different aspects: Discuss various methods, mindset, and resources needed for effective skill acquisition.
89
+ 4. Provide actionable steps: Offer a structured approach that the user can follow.
90
+
91
+ Here is my response:
92
+
93
+ 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:
94
+
95
+ ### 1. **Identify the Skill**
96
+ - **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.
97
+ - **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.
98
+
99
+ ### 2. **Set Clear Goals**
100
+ - **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."
101
+ - **Break Down**: If the skill is complex, break it down into smaller, manageable milestones.
102
+
103
+ ### 3. **Create a Learning Plan**
104
+ - **Resources**: Identify the best resources for learning. These could be online courses, books, mentors, workshops, or practical projects.
105
+ - **Schedule**: Dedicate time in your routine for skill practice. Consistency is crucial in skill development. Treat your learning time as non-negotiable.
106
+
107
+ ### 4. **Start with the Basics**
108
+ - **Foundational Knowledge**: Begin by grasping the fundamentals. Understanding the basics thoroughly sets a strong foundation for more advanced learning.
109
+ - **Practice Regularly**: Regular, focused practice is essential. Even 15-30 minutes a day can yield significant results over time.
110
+
111
+ ### 5. **Seek Feedback and Guidance**
112
+ - **Mentorship**: If possible, find a mentor or join a community of learners. Feedback from experienced individuals can accelerate your learning curve.
113
+ - **Peer Learning**: Engage with others learning the same skill. Peer groups provide support, motivation, and different perspectives.
114
+
115
+ ### 6. **Apply the Skill in Real-World Scenarios**
116
+ - **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.
117
+ - **Iterate Based on Feedback**: After applying your skill, seek and incorporate feedback to refine and improve.
118
+
119
+ ### 7. **Maintain a Growth Mindset**
120
+ - **Embrace Challenges**: Understand that setbacks and failures are part of the learning process. Maintain a positive attitude and view them as opportunities to learn.
121
+ - **Patience and Persistence**: Skill development takes time. Stay patient and persistent, even when progress seems slow.
122
+
123
+ ### 8. **Track and Reflect**
124
+ - **Progress Tracking**: Regularly review your progress. This could be through keeping a learning journal or using apps designed for skill tracking.
125
+ - **Reflect and Adjust**: Periodically reflect on your learning process. What's working? What's not? Adjust your plan accordingly.
126
+
127
+ ### 9. **Stay Motivated**
128
+ - **Reward System**: Set small rewards for achieving milestones to keep yourself motivated.
129
+ - **Stay Curious**: Keep your interest piqued by exploring related topics or advanced aspects of the skill.
130
+
131
+ 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.
132
+
133
+ Building skills is an ongoing journey, not a destination.
134
+
135
+ thinking=False
136
+
137
+ 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:
138
+
139
+ 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.
140
+
141
+ 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.
142
+
143
+ 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.
144
+
145
+ 4. **Create a Study Plan**: Allocate specific time each day or week for learning and practicing. Consistency is key in skill development.
146
+
147
+ 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.
148
+
149
+ 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.
150
+
151
+ 7. **Review and Refine**: Regularly review what you've learned. Refine your skills based on feedback and your own observations.
152
+
153
+ 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.
154
+
155
+ 9. **Be Patient and Persistent**: Skill development takes time. Don't get discouraged by slow progress or setbacks. Keep practicing and learning.
156
+
157
+ 10. **Stay Motivated**: Keep your end goal in mind and celebrate small victories along the way to stay motivated.
158
+
159
+ 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.
160
+
161
+ ---
162
  ## Use with llama.cpp
163
  Install llama.cpp through brew (works on Mac and Linux)
164