Token Classification
Transformers
PyTorch
roberta

Run this model with HF Jobs

Run TweebankNLP/bertweet-tb2-ner on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/TweebankNLP/bertweet-tb2-ner. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/TweebankNLP/bertweet-tb2-ner on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("token-classification", model="TweebankNLP/bertweet-tb2-ner")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("TweebankNLP/bertweet-tb2-ner")
model = AutoModelForTokenClassification.from_pretrained("TweebankNLP/bertweet-tb2-ner", device_map="auto")
Quick Links

Model Specification

  • This is one baseline Twitter NER model (with 73.71% Entity-Level F1) on Tweebank V2's NER benchmark (also called Tweebank-NER), trained on the Tweebank-NER training data.
  • If you are looking for the SOTA Twitter NER model, please go to this HuggingFace hub link.
  • For more details about the TweebankNLP project, please refer to this our paper and github page.
  • In the paper, it is referred as HuggingFace-BERTweet (TB2) in the NER table.

How to use the model

  • PRE-PROCESSING: when you apply the model on tweets, please make sure that tweets are preprocessed by the TweetTokenizer to get the best performance.
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("TweebankNLP/bertweet-tb2-ner")

model = AutoModelForTokenClassification.from_pretrained("TweebankNLP/bertweet-tb2-ner")

References

If you use this repository in your research, please kindly cite our paper:

@article{jiang2022tweetnlp,
    title={Annotating the Tweebank Corpus on Named Entity Recognition and Building NLP Models for Social Media Analysis},
    author={Jiang, Hang and Hua, Yining and Beeferman, Doug and Roy, Deb},
    journal={In Proceedings of the 13th Language Resources and Evaluation Conference (LREC)},
    year={2022}
}
Downloads last month
15
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for TweebankNLP/bertweet-tb2-ner