Update README.md
Browse files
README.md
CHANGED
@@ -1,23 +1,117 @@
|
|
1 |
---
|
2 |
base_model: ibm-granite/granite-3.1-8b-instruct
|
3 |
tags:
|
4 |
-
- text-generation
|
5 |
- transformers
|
6 |
-
-
|
|
|
7 |
- granite
|
|
|
|
|
8 |
- trl
|
9 |
- grpo
|
|
|
|
|
10 |
license: apache-2.0
|
11 |
language:
|
12 |
- en
|
13 |
---
|
14 |
|
15 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
|
18 |
-
- **License:** apache-2.0
|
19 |
-
- **Finetuned from model :** ibm-granite/granite-3.1-8b-instruct
|
20 |
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
-
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
1 |
---
|
2 |
base_model: ibm-granite/granite-3.1-8b-instruct
|
3 |
tags:
|
4 |
+
- text-generation
|
5 |
- transformers
|
6 |
+
- safetensors
|
7 |
+
- english
|
8 |
- granite
|
9 |
+
- text-generation-inference
|
10 |
+
- ruslanmv
|
11 |
- trl
|
12 |
- grpo
|
13 |
+
- conversational
|
14 |
+
- inference-endpoints
|
15 |
license: apache-2.0
|
16 |
language:
|
17 |
- en
|
18 |
---
|
19 |
|
20 |
+
# Granite-3.1-8B-Reasoning (Fine-Tuned for Advanced Reasoning)
|
21 |
+
|
22 |
+
## Model Overview
|
23 |
+
|
24 |
+
This model is a **fine-tuned version** of **ibm-granite/granite-3.1-8b-instruct**, optimized for **logical reasoning and analytical tasks**. Fine-tuning has been performed to **enhance structured problem-solving, long-context comprehension, and instruction-following capabilities**.
|
25 |
+
|
26 |
+
- **Developed by:** [ruslanmv](https://huggingface.co/ruslanmv)
|
27 |
+
- **License:** Apache 2.0
|
28 |
+
- **Base Model:** [ibm-granite/granite-3.1-8b-instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct)
|
29 |
+
- **Fine-tuned for:** Logical reasoning, structured problem-solving, and long-context tasks
|
30 |
+
- **Training Framework:** **Unsloth & Hugging Face TRL** (2x faster training)
|
31 |
+
- **Supported Languages:** English
|
32 |
+
- **Model Size:** **8.17B params**
|
33 |
+
- **Tensor Type:** **BF16**
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
## Why Use This Model?
|
38 |
+
|
39 |
+
This **fine-tuned model** improves upon the base **Granite-3.1-8B** model by enhancing its **reasoning capabilities** while retaining its general text-generation abilities.
|
40 |
+
|
41 |
+
✅ **Optimized for complex reasoning tasks**
|
42 |
+
✅ **Enhanced long-context understanding**
|
43 |
+
✅ **Improved instruction-following abilities**
|
44 |
+
✅ **Fine-tuned for structured analytical thinking**
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
## Installation & Usage
|
49 |
+
|
50 |
+
Install the required dependencies:
|
51 |
+
|
52 |
+
```bash
|
53 |
+
pip install torch torchvision torchaudio
|
54 |
+
pip install accelerate
|
55 |
+
pip install transformers
|
56 |
+
```
|
57 |
+
|
58 |
+
### Running the Model
|
59 |
+
|
60 |
+
Use the following Python snippet to load and generate text with **Granite-3.1-8B-Reasoning**:
|
61 |
+
|
62 |
+
```python
|
63 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
64 |
+
|
65 |
+
device = "auto"
|
66 |
+
model_path = "ruslanmv/granite-3.1-8b-Reasoning"
|
67 |
+
|
68 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
69 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
|
70 |
+
model.eval()
|
71 |
+
|
72 |
+
input_text = "Can you explain the difference between inductive and deductive reasoning?"
|
73 |
+
input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
|
74 |
+
|
75 |
+
output = model.generate(**input_tokens, max_length=4000)
|
76 |
+
output_text = tokenizer.batch_decode(output)
|
77 |
+
|
78 |
+
print(output_text)
|
79 |
+
```
|
80 |
+
|
81 |
+
---
|
82 |
+
|
83 |
+
## Intended Use
|
84 |
+
|
85 |
+
Granite-3.1-8B-Reasoning is designed for **tasks requiring structured and logical reasoning**, including:
|
86 |
+
|
87 |
+
- **Logical and analytical problem-solving**
|
88 |
+
- **Text-based reasoning tasks**
|
89 |
+
- **Mathematical and symbolic reasoning**
|
90 |
+
- **Advanced instruction-following**
|
91 |
+
- **Conversational AI with a focus on structured responses**
|
92 |
+
|
93 |
+
This model is particularly useful for **enterprise AI applications, research, and large-scale NLP tasks**.
|
94 |
+
|
95 |
+
---
|
96 |
+
|
97 |
+
## License & Acknowledgments
|
98 |
+
|
99 |
+
This model is released under the **Apache 2.0** license. It is fine-tuned from IBM’s **Granite 3.1-8B-Instruct** model. Special thanks to the **IBM Granite Team** for developing the base model.
|
100 |
+
|
101 |
+
For more details, visit the [IBM Granite Documentation](https://huggingface.co/ibm-granite).
|
102 |
+
|
103 |
+
---
|
104 |
+
|
105 |
+
### Citation
|
106 |
|
107 |
+
If you use this model in your research or applications, please cite:
|
|
|
|
|
108 |
|
109 |
+
```
|
110 |
+
@misc{ruslanmv2025granite,
|
111 |
+
title={Fine-Tuning Granite-3.1-8B for Advanced Reasoning},
|
112 |
+
author={Ruslan M.V.},
|
113 |
+
year={2025},
|
114 |
+
url={https://huggingface.co/ruslanmv/granite-3.1-8b-Reasoning}
|
115 |
+
}
|
116 |
+
```
|
117 |
|
|