SLIMER-3: Show Less Instruct More Entity Recognition LLaMA3
This LLaMA-3 based model scores +12.5 % wrt paper's original SLIMER LLaMA-2.
⚠️ A more powerful model, which scores +17% and allows parallel NEs extraction, can be found at: https://huggingface.co/expertai/SLIMER-PARALLEL-LLaMA3
GitHub repository: https://github.com/andrewzamai/SLIMER
SLIMER is an LLM specifically instructed for zero-shot NER on English language.
SLIMER for Italian language can be found at: https://huggingface.co/expertai/LLaMAntino-3-SLIMER-IT
Instructed on a reduced number of samples, it is designed to tackle never-seen-before Named Entity tags by leveraging a prompt enriched with a DEFINITION and GUIDELINES for the NE to be extracted.
Currently existing approaches fine-tune on an extensive number of entity classes (around 13K) and assess zero-shot NER capabilities on Out-Of-Distribution input domains. SLIMER performs comparably to these state-of-the-art models on OOD input domains, while being trained only a reduced number of samples and a set of NE tags that overlap in lesser degree with test sets.
We extend the standard zero-shot evaluations (CrossNER and MIT) with BUSTER, which is characterized by financial entities that are rather far from the more traditional tags observed by all models during training. An inverse trend can be observed, with SLIMER emerging as the most effective in dealing with these unseen labels, thanks to its lighter instruction tuning methodology and the use of definition and guidelines.
from vllm import LLM, SamplingParams
vllm_model = LLM(model="expertai/SLIMER-LLaMA3")
sampling_params = SamplingParams(temperature=0, max_tokens=128)
prompts = [prompter.generate_prompt(instruction, input) for instruction, input in instruction_input_pairs]
responses = vllm_model.generate(prompts, sampling_params)
Citation
If you find SLIMER useful in your research or work, please cite the following paper:
@misc{zamai2024lessinstructmoreenriching,
title={Show Less, Instruct More: Enriching Prompts with Definitions and Guidelines for Zero-Shot NER},
author={Andrew Zamai and Andrea Zugarini and Leonardo Rigutini and Marco Ernandes and Marco Maggini},
year={2024},
eprint={2407.01272},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2407.01272},
}