leopiano98
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -4,18 +4,49 @@ language:
|
|
4 |
- it
|
5 |
license: apache-2.0
|
6 |
tags:
|
7 |
-
- text-generation-inference
|
8 |
-
- transformers
|
9 |
- unsloth
|
10 |
-
-
|
11 |
-
- trl
|
12 |
- NER
|
13 |
- RE
|
14 |
-
-
|
|
|
15 |
base_model: swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
|
16 |
---
|
17 |
-
#
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
- **Developed by:** leopiano98
|
20 |
- **License:** apache-2.0
|
21 |
- **Finetuned from model :** swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
|
|
|
4 |
- it
|
5 |
license: apache-2.0
|
6 |
tags:
|
|
|
|
|
7 |
- unsloth
|
8 |
+
- llama3
|
|
|
9 |
- NER
|
10 |
- RE
|
11 |
+
- OIE
|
12 |
+
- LLIMONIIE
|
13 |
base_model: swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
|
14 |
---
|
15 |
+
# LLIMONIIE: Large Language Instructed Model for Open Named Italian Information Extraction
|
16 |
|
17 |
+
|
18 |
+
LLIMONIE generalizes IE across diverse domains without requiring input ontologies.
|
19 |
+
|
20 |
+
-
|
21 |
+
Perform three tasks:
|
22 |
+
- **Open Named Entity Recognition**
|
23 |
+
|
24 |
+
- **Open Relation Extraction**
|
25 |
+
|
26 |
+
- **Joint Entity and Relation Extraction**
|
27 |
+
|
28 |
+
|
29 |
+
## 💻 Quick Start
|
30 |
+
### Setup conda environment
|
31 |
+
Install the unsloth package following the repo [guide](https://github.com/unslothai/unsloth?tab=readme-ov-file#conda-installation)
|
32 |
+
### Clone the repository
|
33 |
+
```bash
|
34 |
+
git clone https://github.com/leonardoPiano/LLIMONIE.git
|
35 |
+
```
|
36 |
+
### Run the generation
|
37 |
+
```python
|
38 |
+
from PromptTemplates.instruct_prompt_templates import NER,RE,JOINT
|
39 |
+
from LLM.Unsloth import UnslothLLM
|
40 |
+
model_path="leopiano98/LLIMONIE_anita8b"
|
41 |
+
|
42 |
+
llimonie=UnslothLLM(model_path,inference=True)
|
43 |
+
task=NER
|
44 |
+
text="Alessandro Manzoni è considerato uno dei maggiori romanzieri italiani di tutti i tempi per il suo celebre romanzo I promessi sposi"
|
45 |
+
messages = [{"role": "system", "content": task},
|
46 |
+
{"role": "user", "content": text}]
|
47 |
+
output= llimonie.generate(messages, max_new_tokens=512)
|
48 |
+
#output: Alessandro Manzoni[Writer|Person]; I promessi sposi[Novel|Book]; italiani[Nationality|Ethnicity]
|
49 |
+
```
|
50 |
- **Developed by:** leopiano98
|
51 |
- **License:** apache-2.0
|
52 |
- **Finetuned from model :** swap-uniba/LLaMAntino-3-ANITA-8B-Inst-DPO-ITA
|