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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- Mattimax/TinyChat-ITA
|
| 5 |
+
language:
|
| 6 |
+
- it
|
| 7 |
+
library_name: transformers.js
|
| 8 |
+
tags:
|
| 9 |
+
- DAC
|
| 10 |
+
- M.INC.
|
| 11 |
+
- conversational
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
---
|
| 15 |
+
language:
|
| 16 |
+
- it
|
| 17 |
+
license: apache-2.0
|
| 18 |
+
tags:
|
| 19 |
+
- italian
|
| 20 |
+
- chat
|
| 21 |
+
- conversational
|
| 22 |
+
- causal-lm
|
| 23 |
+
- small-model
|
| 24 |
+
- fine-tuned
|
| 25 |
+
library_name: transformers
|
| 26 |
+
pipeline_tag: text-generation
|
| 27 |
+
model_name: MINC01/ITA-Mini-60M
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# 🇮🇹 MINC01/ITA-Mini-60M
|
| 31 |
+
|
| 32 |
+
**MINC01/ITA-Mini-60M** è un modello linguistico causale da circa **60 milioni di parametri**, ottimizzato per la **conversazione in lingua italiana**.
|
| 33 |
+
Il modello è stato addestrato su un dataset proprietario di dialoghi istruzione-risposta, con l’obiettivo di offrire buone capacità conversazionali in un formato leggero e facilmente distribuibile.
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## 📌 Panoramica
|
| 38 |
+
|
| 39 |
+
- Modello: Decoder-only (stile LLaMA)
|
| 40 |
+
- Parametri: ~60M
|
| 41 |
+
- Lingua principale: Italiano
|
| 42 |
+
- Task principale: Chat / Istruzioni / Generazione testo
|
| 43 |
+
- Contesto massimo: 512 token
|
| 44 |
+
- Addestramento: Supervised Fine-Tuning (SFT)
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## 🎯 Use Cases Previsti
|
| 49 |
+
|
| 50 |
+
- Chatbot in lingua italiana
|
| 51 |
+
- Assistenti locali / embedded
|
| 52 |
+
- Prototipi di agenti conversazionali
|
| 53 |
+
- Dataset labeling / data augmentation
|
| 54 |
+
- Esperimenti di ricerca su modelli piccoli
|
| 55 |
+
|
| 56 |
+
Non è progettato per:
|
| 57 |
+
|
| 58 |
+
- Ragionamento complesso multi-step
|
| 59 |
+
- Applicazioni mission-critical
|
| 60 |
+
- Produzione di contenuti ad alta affidabilità
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
+
## 🧠 Architettura
|
| 65 |
+
|
| 66 |
+
- Transformer decoder-only
|
| 67 |
+
- Causal Language Model
|
| 68 |
+
- Embedding e blocchi compatibili con ecosistema LLaMA
|
| 69 |
+
- Addestramento con masking delle parti prompt (solo risposta contribuisce alla loss)
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
## 📚 Dataset
|
| 74 |
+
|
| 75 |
+
- Proprietario
|
| 76 |
+
- ~30.000 esempi
|
| 77 |
+
- Struttura: coppie **input → response**
|
| 78 |
+
- Dominio: conversazionale generale
|
| 79 |
+
- Lingua: italiano
|
| 80 |
+
|
| 81 |
+
### Pulizia applicata
|
| 82 |
+
|
| 83 |
+
- Rimozione esempi vuoti
|
| 84 |
+
- Parsing JSON validato
|
| 85 |
+
- Scarto sequenze sopra la lunghezza massima
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
## 🏗️ Template Conversazionale
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
<|user|>
|
| 94 |
+
{testo_utente}
|
| 95 |
+
<|assistant|>
|
| 96 |
+
{risposta_modello}</s>
|
| 97 |
+
|
| 98 |
+
````
|
| 99 |
+
|
| 100 |
+
Il modello è sensibile a questo formato.
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## ⚙️ Procedura di Training (Sintesi)
|
| 105 |
+
|
| 106 |
+
- Fine-tuning supervisionato
|
| 107 |
+
- Mixed Precision (AMP)
|
| 108 |
+
- Gradient Accumulation
|
| 109 |
+
- Gradient Checkpointing
|
| 110 |
+
- AdamW optimizer
|
| 111 |
+
- Cosine learning rate schedule con warmup
|
| 112 |
+
|
| 113 |
+
### Parametri principali
|
| 114 |
+
|
| 115 |
+
| Parametro | Valore |
|
| 116 |
+
|----------|-------|
|
| 117 |
+
| Batch size | 8 |
|
| 118 |
+
| Gradient accumulation | 4 |
|
| 119 |
+
| Learning rate | 2e-5 |
|
| 120 |
+
| Epochs | 2 |
|
| 121 |
+
| Weight decay | 0.05 |
|
| 122 |
+
| Warmup ratio | 0.1 |
|
| 123 |
+
| Max grad norm | 1.0 |
|
| 124 |
+
| Validation split | 5% |
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## 📈 Valutazione
|
| 129 |
+
|
| 130 |
+
- Metica: Cross-Entropy Loss su validation set
|
| 131 |
+
- Non sono stati eseguiti benchmark standard (es. MMLU, HELM, etc.)
|
| 132 |
+
|
| 133 |
+
Il modello è stato validato esclusivamente tramite loss e test qualitativi manuali.
|
| 134 |
+
|
| 135 |
+
---
|
| 136 |
+
|
| 137 |
+
## 🧪 Limitazioni Note
|
| 138 |
+
|
| 139 |
+
- Possibili allucinazioni
|
| 140 |
+
- Conoscenza limitata
|
| 141 |
+
- Sensibile al prompt
|
| 142 |
+
- Ragionamento debole
|
| 143 |
+
- Possibili bias presenti nel dataset proprietario
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
## ⚠️ Considerazioni Etiche
|
| 148 |
+
|
| 149 |
+
Il modello:
|
| 150 |
+
|
| 151 |
+
- Può generare informazioni errate
|
| 152 |
+
- Non deve essere usato come fonte autorevole
|
| 153 |
+
- Non ha filtri di sicurezza avanzati
|
| 154 |
+
|
| 155 |
+
Responsabilità d’uso interamente a carico dell’utente.
|
| 156 |
+
|
| 157 |
+
---
|
| 158 |
+
|
| 159 |
+
## 🚀 Come Usare
|
| 160 |
+
|
| 161 |
+
```python
|
| 162 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 163 |
+
|
| 164 |
+
tok = AutoTokenizer.from_pretrained("MINC01/ITA-Mini-60M")
|
| 165 |
+
model = AutoModelForCausalLM.from_pretrained("MINC01/ITA-Mini-60M")
|
| 166 |
+
|
| 167 |
+
prompt = "<|user|>\nScrivi una poesia sul mare.\n<|assistant|>\n"
|
| 168 |
+
inputs = tok(prompt, return_tensors="pt")
|
| 169 |
+
|
| 170 |
+
out = model.generate(**inputs, max_new_tokens=200)
|
| 171 |
+
print(tok.decode(out[0], skip_special_tokens=True))
|
| 172 |
+
````
|
| 173 |
+
|
| 174 |
+
---
|
| 175 |
+
|
| 176 |
+
## 🔁 Prompting Tips
|
| 177 |
+
|
| 178 |
+
* Usare sempre il template
|
| 179 |
+
* Istruzioni brevi e chiare
|
| 180 |
+
* Una richiesta per volta
|
| 181 |
+
* Evitare contesti troppo lunghi
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
## 👤 Autore
|
| 186 |
+
|
| 187 |
+
MINC01
|
| 188 |
+
|
| 189 |
+
---
|
| 190 |
+
|
| 191 |
+
## 📌 Citazione
|
| 192 |
+
|
| 193 |
+
```
|
| 194 |
+
@misc{minc01_ita_mini_60m,
|
| 195 |
+
title = {MINC01/ITA-Mini-60M},
|
| 196 |
+
author = {MINC01},
|
| 197 |
+
year = {2026},
|
| 198 |
+
publisher = {HuggingFace}
|
| 199 |
+
}
|
| 200 |
+
```
|