LLIMONIE generalizes IE across diverse domains without requiring input ontologies.
-
Open Named Entity Recognition
-
Open Relation Extraction
-
Joint Entity and Relation Extraction
Install the unsloth package following the repo
guide
1from PromptTemplates.instruct_prompt_templates import NER,RE,JOINT
2from LLM.Unsloth import UnslothLLM
3model_path="leopiano98/LLIMONIIE_llama3-8b"
4
5llimonie=UnslothLLM(model_path,inference=True)
6task=NER
7text="Alessandro Manzoni è considerato uno dei maggiori romanzieri italiani di tutti i tempi per il suo celebre romanzo I promessi sposi"
8messages = [{"role": "system", "content": task},
9 {"role": "user", "content": text}]
10output= llimonie.generate(messages, max_new_tokens=512)
11#output: Alessandro Manzoni[Writer|Person]; I promessi sposi[Novel|Book]; italiani[Nationality|Ethnicity]
This llama model was trained 2x faster with
Unsloth and Huggingface's TRL library.