File size: 1,820 Bytes
423a041 5208b9c 423a041 090fd15 5208b9c 090fd15 423a041 090fd15 423a041 090fd15 85153ad 090fd15 423a041 5208b9c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
---
language:
- en
- it
license: apache-2.0
tags:
- unsloth
- llama3
- NER
- RE
- OIE
- LLIMONIIE
base_model: swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
---
# LLIMONIIE: Large Language Instructed Model for Open Named Italian Information Extraction
LLIMONIE generalizes IE across diverse domains without requiring input ontologies.
-
Perform three tasks:
- **Open Named Entity Recognition**
- **Open Relation Extraction**
- **Joint Entity and Relation Extraction**
## 💻 Quick Start
### Setup conda environment
Install the unsloth package following the repo [guide](https://github.com/unslothai/unsloth?tab=readme-ov-file#conda-installation)
### Clone the repository
```bash
git clone https://github.com/leonardoPiano/LLIMONIE.git
```
### Run the generation
```python
from PromptTemplates.instruct_prompt_templates import NER,RE,JOINT
from LLM.Unsloth import UnslothLLM
model_path="leopiano98/LLIMONIIE_anita-8b"
llimonie=UnslothLLM(model_path,inference=True)
task=NER
text="Alessandro Manzoni è considerato uno dei maggiori romanzieri italiani di tutti i tempi per il suo celebre romanzo I promessi sposi"
messages = [{"role": "system", "content": task},
{"role": "user", "content": text}]
output= llimonie.generate(messages, max_new_tokens=512)
#output: Alessandro Manzoni[Writer|Person]; I promessi sposi[Novel|Book]; italiani[Nationality|Ethnicity]
```
- **Developed by:** leopiano98
- **License:** apache-2.0
- **Finetuned from model :** swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth) |