Update README.md
Browse files
README.md
CHANGED
|
@@ -7,87 +7,124 @@ base_model:
|
|
| 7 |
- AxionLab-official/MiniBot-0.9M-Base
|
| 8 |
---
|
| 9 |
|
| 10 |
-
#
|
| 11 |
|
| 12 |
-
Instruction-tuned GPT-2 style language model (~900K parameters) optimized for Portuguese conversational tasks.
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
Built on a GPT-2 architecture (~0.9M parameters), this model was fine-tuned on conversational and instruction-style data to improve usability in real-world interactions.
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
Usability Experimental Practical
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
|
| 46 |
-
Token + positional embeddings
|
| 47 |
-
Self-attention + MLP blocks
|
| 48 |
-
Autoregressive generation
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
| 58 |
-
Instruรงรตes simples
|
| 59 |
-
Chat estilo assistente
|
| 60 |
-
Roleplay bรกsico
|
| 61 |
-
Conversas naturais
|
| 62 |
-
Format
|
| 63 |
User: Me explique o que รฉ gravidade
|
| 64 |
Bot: A gravidade รฉ a forรงa que atrai objetos com massa...
|
| 65 |
-
|
| 66 |
-
Supervised fine-tuning (SFT)
|
| 67 |
-
Pattern learning for instruction-following
|
| 68 |
-
No RLHF or preference optimization
|
| 69 |
-
๐ก Capabilities
|
| 70 |
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
Pode errar fatos
|
| 83 |
-
Nรฃo mantรฉm contexto longo
|
| 84 |
-
Sensรญvel a prompts mal estruturados
|
| 85 |
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 92 |
|
| 93 |
model_name = "AxionLab-official/MiniBot-0.9M-Instruct"
|
|
@@ -103,47 +140,69 @@ outputs = model.generate(
|
|
| 103 |
max_new_tokens=80,
|
| 104 |
temperature=0.7,
|
| 105 |
top_p=0.9,
|
| 106 |
-
do_sample=True
|
| 107 |
)
|
| 108 |
|
| 109 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 110 |
```
|
| 111 |
|
| 112 |
-
โ๏ธ Recommended Settings
|
| 113 |
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
-
|
| 117 |
-
top_p: 0.85 โ 0.95
|
| 118 |
-
do_sample: True
|
| 119 |
-
max_new_tokens: 40 โ 100
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 130 |
|
| 131 |
-
|
| 132 |
-
Sem alinhamento robusto
|
| 133 |
-
Pode gerar respostas incorretas
|
| 134 |
-
Nรฃo adequado para produรงรฃo crรญtica
|
| 135 |
|
| 136 |
-
|
| 137 |
-
๐ง Reasoning-tuned version (MiniBot-Reason)
|
| 138 |
-
๐ Scaling para 1Mโ10M parรขmetros
|
| 139 |
-
๐ Dataset mais diverso
|
| 140 |
-
๐ค Melhor alinhamento de respostas
|
| 141 |
-
๐งฉ Tool-use experiments
|
| 142 |
|
| 143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
-
|
| 146 |
|
| 147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
-
|
|
|
|
|
|
|
|
|
| 7 |
- AxionLab-official/MiniBot-0.9M-Base
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# ๐ง MiniBot-0.9M-Instruct
|
| 11 |
|
| 12 |
+
> **Instruction-tuned GPT-2 style language model (~900K parameters) optimized for Portuguese conversational tasks.**
|
| 13 |
|
| 14 |
+
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Instruct)
|
| 15 |
+
[](https://opensource.org/licenses/MIT)
|
| 16 |
+
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Instruct)
|
| 17 |
+
[](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Instruct)
|
| 18 |
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## ๐ Overview
|
| 22 |
+
|
| 23 |
+
**MiniBot-0.9M-Instruct** is the instruction-tuned version of [MiniBot-0.9M-Base](https://huggingface.co/AxionLab-official/MiniBot-0.9M-Base), designed to follow prompts more accurately, respond to user inputs, and generate more coherent conversational outputs in **Portuguese**.
|
| 24 |
|
| 25 |
Built on a GPT-2 architecture (~0.9M parameters), this model was fine-tuned on conversational and instruction-style data to improve usability in real-world interactions.
|
| 26 |
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## ๐ฏ Key Characteristics
|
| 30 |
+
|
| 31 |
+
| Attribute | Detail |
|
| 32 |
+
|---|---|
|
| 33 |
+
| ๐ง๐ท **Language** | Portuguese (primary) |
|
| 34 |
+
| ๐ง **Architecture** | GPT-2 style (Transformer decoder-only) |
|
| 35 |
+
| ๐ค **Embeddings** | GPT-2 compatible |
|
| 36 |
+
| ๐ **Parameters** | ~900K |
|
| 37 |
+
| โ๏ธ **Base Model** | MiniBot-0.9M-Base |
|
| 38 |
+
| ๐ฏ **Fine-tuning** | Instruction tuning (supervised) |
|
| 39 |
+
| โ
**Alignment** | Basic prompt-following behavior |
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## ๐ง What Changed from Base?
|
| 44 |
+
|
| 45 |
+
Instruction tuning introduced significant behavioral improvements with no architectural changes:
|
| 46 |
+
|
| 47 |
+
| Feature | Base | Instruct |
|
| 48 |
+
|---|---|---|
|
| 49 |
+
| Prompt understanding | โ | โ
|
|
| 50 |
+
| Conversational flow | โ ๏ธ Partial | โ
|
|
| 51 |
+
| Instruction following | โ | โ
|
|
| 52 |
+
| Overall coherence | Low | Improved |
|
| 53 |
+
| Practical usability | Experimental | Functional |
|
| 54 |
|
| 55 |
+
> ๐ก The model is now significantly more usable in chat scenarios.
|
| 56 |
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## ๐๏ธ Architecture
|
| 60 |
+
|
| 61 |
+
The core architecture remains identical to the base model:
|
|
|
|
| 62 |
|
| 63 |
+
- **Decoder-only Transformer** (GPT-2 style)
|
| 64 |
+
- Token embeddings + positional embeddings
|
| 65 |
+
- Self-attention + MLP blocks
|
| 66 |
+
- Autoregressive generation
|
| 67 |
|
| 68 |
+
No structural changes were made โ only behavioral improvement through fine-tuning.
|
| 69 |
|
| 70 |
+
---
|
| 71 |
|
| 72 |
+
## ๐ Fine-Tuning Dataset
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
The model was fine-tuned on a Portuguese instruction-style conversational dataset composed of:
|
| 75 |
|
| 76 |
+
- ๐ฌ Questions and answers
|
| 77 |
+
- ๐ Simple instructions
|
| 78 |
+
- ๐ค Assistant-style chat
|
| 79 |
+
- ๐ญ Basic roleplay
|
| 80 |
+
- ๐ฃ๏ธ Natural conversations
|
| 81 |
|
| 82 |
+
**Expected format:**
|
| 83 |
|
| 84 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
User: Me explique o que รฉ gravidade
|
| 86 |
Bot: A gravidade รฉ a forรงa que atrai objetos com massa...
|
| 87 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
**Training strategy:**
|
| 90 |
+
- Supervised Fine-Tuning (SFT)
|
| 91 |
+
- Pattern learning for instruction-following
|
| 92 |
+
- No RLHF or preference optimization
|
| 93 |
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## ๐ก Capabilities
|
| 97 |
+
|
| 98 |
+
### โ
Strengths
|
| 99 |
|
| 100 |
+
- Following simple instructions
|
| 101 |
+
- Answering basic questions
|
| 102 |
+
- Conversing more naturally
|
| 103 |
+
- Higher coherence in short responses
|
| 104 |
+
- More consistent dialogue structure
|
| 105 |
|
| 106 |
+
### โ Limitations
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
+
- Reasoning is still limited
|
| 109 |
+
- May generate incorrect facts
|
| 110 |
+
- Does not retain long context
|
| 111 |
+
- Sensitive to poorly structured prompts
|
| 112 |
|
| 113 |
+
> โ ๏ธ Even with instruction tuning, this remains an extremely small model. Adjust expectations accordingly.
|
| 114 |
+
|
| 115 |
+
---
|
| 116 |
+
|
| 117 |
+
## ๐ Getting Started
|
| 118 |
+
|
| 119 |
+
### Installation
|
| 120 |
+
|
| 121 |
+
```bash
|
| 122 |
+
pip install transformers torch
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
### Usage with Hugging Face Transformers
|
| 126 |
+
|
| 127 |
+
```python
|
| 128 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 129 |
|
| 130 |
model_name = "AxionLab-official/MiniBot-0.9M-Instruct"
|
|
|
|
| 140 |
max_new_tokens=80,
|
| 141 |
temperature=0.7,
|
| 142 |
top_p=0.9,
|
| 143 |
+
do_sample=True,
|
| 144 |
)
|
| 145 |
|
| 146 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 147 |
```
|
| 148 |
|
| 149 |
+
### โ๏ธ Recommended Settings
|
| 150 |
|
| 151 |
+
| Parameter | Recommended Value | Description |
|
| 152 |
+
|---|---|---|
|
| 153 |
+
| `temperature` | `0.6 โ 0.8` | Controls randomness |
|
| 154 |
+
| `top_p` | `0.85 โ 0.95` | Nucleus sampling |
|
| 155 |
+
| `do_sample` | `True` | Enable sampling |
|
| 156 |
+
| `max_new_tokens` | `40 โ 100` | Response length |
|
| 157 |
|
| 158 |
+
> ๐ก Instruct models tend to perform better at lower temperatures. Try values around `0.65` for more accurate and focused responses.
|
|
|
|
|
|
|
|
|
|
| 159 |
|
| 160 |
+
---
|
| 161 |
+
|
| 162 |
+
## ๐งช Intended Use Cases
|
| 163 |
|
| 164 |
+
| Use Case | Suitability |
|
| 165 |
+
|---|---|
|
| 166 |
+
| ๐ฌ Lightweight Portuguese chatbots | โ
Ideal |
|
| 167 |
+
| ๐ฎ NPCs and games | โ
Ideal |
|
| 168 |
+
| ๐ง Fine-tuning experiments | โ
Ideal |
|
| 169 |
+
| ๐ NLP education | โ
Ideal |
|
| 170 |
+
| โก Local / CPU-only applications | โ
Ideal |
|
| 171 |
+
| ๐ญ Critical production environments | โ Not recommended |
|
| 172 |
|
| 173 |
+
---
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
+
## โ ๏ธ Disclaimer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
|
| 177 |
+
- Extremely small model (~900K parameters)
|
| 178 |
+
- No robust alignment (no RLHF)
|
| 179 |
+
- May generate incorrect or nonsensical responses
|
| 180 |
+
- **Not suitable for critical production environments**
|
| 181 |
+
|
| 182 |
+
---
|
| 183 |
|
| 184 |
+
## ๐ฎ Future Work
|
| 185 |
|
| 186 |
+
- [ ] ๐ง Reasoning-tuned version (`MiniBot-Reason`)
|
| 187 |
+
- [ ] ๐ Scaling to 1Mโ10M parameters
|
| 188 |
+
- [ ] ๐ Larger and more diverse dataset
|
| 189 |
+
- [ ] ๐ค Improved response alignment
|
| 190 |
+
- [ ] ๐งฉ Tool-use experiments
|
| 191 |
+
|
| 192 |
+
---
|
| 193 |
+
|
| 194 |
+
## ๐ License
|
| 195 |
+
|
| 196 |
+
Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for more details.
|
| 197 |
+
|
| 198 |
+
---
|
| 199 |
+
|
| 200 |
+
## ๐ค Author
|
| 201 |
+
|
| 202 |
+
Developed by **[AxionLab](https://huggingface.co/AxionLab-official)** ๐ฌ
|
| 203 |
+
|
| 204 |
+
---
|
| 205 |
|
| 206 |
+
<div align="center">
|
| 207 |
+
<sub>MiniBot-0.9M-Instruct ยท AxionLab ยท MIT License</sub>
|
| 208 |
+
</div>
|