SLIMER / README.md
andrewzamai's picture
Update README.md
2d7e780 verified
|
raw
history blame
6.2 kB
metadata
license: llama2
datasets:
  - Universal-NER/Pile-NER-type
language:
  - en
pipeline_tag: text-generation

SLIMER: Show Less Instruct More Entity Recognition

SLIMER is an instruction-tuned LLM for zero-shot NER.

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 set.

We extend the standard zero-shot evaluations on 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.

Model Backbone #Params MIT CrossNER BUSTER AVG
Movie Restaurant AI Literature Music Politics Science
ChatGPT gpt-3.5-turbo - 5.3 32.8 52.4 39.8 66.6 68.5 67.0 - -
InstructUIE Flan-T5-xxl 11B 63.0 21.0 49.0 47.2 53.2 48.2 49.3 - -
UniNER-type LLaMA-1 7B 42.4 31.7 53.5 59.4 65.0 60.8 61.1 34.8 51.1
UniNER-def LLaMA-1 7B 27.1 27.9 44.5 49.2 55.8 57.5 52.9 33.6 43.6
UniNER-type+sup. LLaMA-1 7B 61.2 35.2 62.9 64.9 70.6 66.9 70.8 37.8 58.8
GoLLIE Code-LLaMA 7B 63.0 43.4 59.1 62.7 67.8 57.2 55.5 27.7 54.6
GLiNER-L DeBERTa-v3 0.3B 57.2 42.9 57.2 64.4 69.6 72.6 62.6 26.6 56.6
GNER-T5 Flan-T5-xxl 11B 62.5 51.0 68.2 68.7 81.2 75.1 76.7 27.9 63.9
GNER-LLaMA LLaMA-1 7B 68.6 47.5 63.1 68.2 75.7 69.4 69.9 23.6 60.8
SLIMER w/o D&G LLaMA-2-chat 7B 46.4 36.3 49.6 58.4 56.8 57.9 53.8 40.4 49.9
SLIMER LLaMA-2-chat 7B 50.9 38.2 50.1 58.7 60.0 63.9 56.3 45.3 52.9
from vllm import LLM, SamplingParams

vllm_model = LLM(model="expertai/SLIMER")

sampling_params = SamplingParams(temperature=0, max_tokens=128, stop=['</s>'])

prompts = [prompter.generate_prompt(instruction, input) for instruction, input in instruction_input_pairs]
responses = vllm_model.generate(prompts, sampling_params)