CoolFace
Modelpublic

numind/NuNER-v0.1

sourceHugging Facemitupdated 2y agoView on Hugging Face
64likes8.1kdownloads
Model Card

Entity Recognition English Foundation Model by NuMind 🔥

This model provides great token embedding for the Entity Recognition task in English.

We suggest using newer version of this model: [NuNER v2.0](https://huggingface.co/numind/NuNER-v2.0)

Checkout other models by NuMind:

  • SOTA Multilingual Entity Recognition Foundation Model: link
  • SOTA Sentiment Analysis Foundation Model: English, Multilingual

About

Roberta-base fine-tuned on NuNER data.

Metrics:

Read more about evaluation protocol & datasets in our paper and blog post.

We suggest using newer version of this model: [NuNER v2.0](https://huggingface.co/numind/NuNER-v2.0)

Modelk=1k=4k=16k=64
RoBERTa-base24.544.758.165.4
RoBERTa-base + NER-BERT pre-training32.350.961.967.6
NuNER v0.134.354.664.068.7
NuNER v1.039.459.667.871.5
NuNER v2.043.661.068.272.0

Usage

Embeddings can be used out of the box or fine-tuned on specific datasets.

Get embeddings:

python
import torch
import transformers


model = transformers.AutoModel.from_pretrained(
    'numind/NuNER-v0.1',
    output_hidden_states=True
)
tokenizer = transformers.AutoTokenizer.from_pretrained(
    'numind/NuNER-v0.1'
)

text = [
    "NuMind is an AI company based in Paris and USA.",
    "See other models from us on https://huggingface.co/numind"
]
encoded_input = tokenizer(
    text,
    return_tensors='pt',
    padding=True,
    truncation=True
)
output = model(**encoded_input)

# for better quality
emb = torch.cat(
    (output.hidden_states[-1], output.hidden_states[-7]),
    dim=2
)

# for better speed
# emb = output.hidden_states[-1]

Citation

@misc{bogdanov2024nuner,
      title={NuNER: Entity Recognition Encoder Pre-training via LLM-Annotated Data}, 
      author={Sergei Bogdanov and Alexandre Constantin and Timothée Bernard and Benoit Crabbé and Etienne Bernard},
      year={2024},
      eprint={2402.15343},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}