Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: [it]
|
| 3 |
+
library_name: llama.cpp
|
| 4 |
+
tags: [gguf, q5_0, legal, rag, italian]
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
---
|
| 8 |
+
# gpt-oss-20b-q5_0
|
| 9 |
+
|
| 10 |
+
**Base:** `gpt-oss-20b-base`
|
| 11 |
+
**Adapter (fuso):** `my-legal-adapter-v1`
|
| 12 |
+
|
| 13 |
+
Questo repository pubblica un file **GGUF** generato a partire dal modello fuso:
|
| 14 |
+
- gpt-oss_20b_finetuned_q5_0.gguf — **Q5_0** (qualità più alta rispetto a Q4, con un costo RAM/latency maggiore)
|
| 15 |
+
|
| 16 |
+
## Uso rapido
|
| 17 |
+
### llama.cpp
|
| 18 |
+
```bash
|
| 19 |
+
./llama.cpp/main -m gpt-oss_20b_finetuned_q5_0.gguf -p "Ciao" # Q5_0
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
### LM Studio
|
| 23 |
+
Importa il `.gguf` nella sezione **Local models** e avvia una chat.
|
| 24 |
+
|
| 25 |
+
## RAG legale – esempio (sub-sample JSON)
|
| 26 |
+
```json
|
| 27 |
+
{
|
| 28 |
+
"messages": [
|
| 29 |
+
{
|
| 30 |
+
"role": "user",
|
| 31 |
+
"content": "Quali pratiche ha ClienteInesistente?"
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"role": "assistant",
|
| 35 |
+
"content": "Mi dispiace, ma non ho trovato informazioni per la pratica richiesta. Verifica che l'ID o il nome siano corretti e che la pratica sia presente nel sistema."
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
}
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Note tecniche
|
| 42 |
+
- Conversione Hugging Face → **GGUF** con `convert_hf_to_gguf.py` (llama.cpp).
|
| 43 |
+
- Quantizzazione a **Q5_0** con l'eseguibile `quantize` di llama.cpp.
|
| 44 |
+
- La serializzazione in **MXFP4** dopo il merge non è supportata; tipicamente si passa da **F16** a **Q5_0**.
|
| 45 |
+
|
| 46 |
+
_Aggiornato: 2025-08-23_
|