cardiffnlp / roberta-base-tweet-topic-multi-2020

huggingface.co
Total runs: 14
24-hour runs: 0
7-day runs: 2
30-day runs: 10
Model's Last Updated: September 30 2022
text-classification

Introduction of roberta-base-tweet-topic-multi-2020

Model Details of roberta-base-tweet-topic-multi-2020

cardiffnlp/roberta-base-tweet-topic-multi-2020

This model is a fine-tuned version of roberta-base on the tweet_topic_multi . This model is fine-tuned on train_2020 split and validated on test_2021 split of tweet_topic. Fine-tuning script can be found here . It achieves the following results on the test_2021 set:

  • F1 (micro): 0.7252289758534556
  • F1 (macro): 0.5612608131902519
  • Accuracy: 0.4991066110780226
Usage
import math
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

def sigmoid(x):
  return 1 / (1 + math.exp(-x))
  
tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/roberta-base-tweet-topic-multi-2020")
model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/roberta-base-tweet-topic-multi-2020", problem_type="multi_label_classification")
model.eval()
class_mapping = model.config.id2label

with torch.no_grad():
  text = #NewVideo Cray Dollas- Water- Ft. Charlie Rose- (Official Music Video)- {{URL}} via {@YouTube@} #watchandlearn {{USERNAME}}
  tokens = tokenizer(text, return_tensors='pt')
  output = model(**tokens)
  flags = [sigmoid(s) > 0.5 for s in output[0][0].detach().tolist()]
  topic = [class_mapping[n] for n, i in enumerate(flags) if i]
print(topic)
Reference

@inproceedings{dimosthenis-etal-2022-twitter,
    title = "{T}witter {T}opic {C}lassification",
    author = "Antypas, Dimosthenis  and
    Ushio, Asahi  and
    Camacho-Collados, Jose  and
    Neves, Leonardo  and
    Silva, Vitor  and
    Barbieri, Francesco",
    booktitle = "Proceedings of the 29th International Conference on Computational Linguistics",
    month = oct,
    year = "2022",
    address = "Gyeongju, Republic of Korea",
    publisher = "International Committee on Computational Linguistics"
}

Runs of cardiffnlp roberta-base-tweet-topic-multi-2020 on huggingface.co

14
Total runs
0
24-hour runs
2
3-day runs
2
7-day runs
10
30-day runs

More Information About roberta-base-tweet-topic-multi-2020 huggingface.co Model

roberta-base-tweet-topic-multi-2020 huggingface.co

roberta-base-tweet-topic-multi-2020 huggingface.co is an AI model on huggingface.co that provides roberta-base-tweet-topic-multi-2020's model effect (), which can be used instantly with this cardiffnlp roberta-base-tweet-topic-multi-2020 model. huggingface.co supports a free trial of the roberta-base-tweet-topic-multi-2020 model, and also provides paid use of the roberta-base-tweet-topic-multi-2020. Support call roberta-base-tweet-topic-multi-2020 model through api, including Node.js, Python, http.

roberta-base-tweet-topic-multi-2020 huggingface.co Url

https://huggingface.co/cardiffnlp/roberta-base-tweet-topic-multi-2020

cardiffnlp roberta-base-tweet-topic-multi-2020 online free

roberta-base-tweet-topic-multi-2020 huggingface.co is an online trial and call api platform, which integrates roberta-base-tweet-topic-multi-2020's modeling effects, including api services, and provides a free online trial of roberta-base-tweet-topic-multi-2020, you can try roberta-base-tweet-topic-multi-2020 online for free by clicking the link below.

cardiffnlp roberta-base-tweet-topic-multi-2020 online free url in huggingface.co:

https://huggingface.co/cardiffnlp/roberta-base-tweet-topic-multi-2020

roberta-base-tweet-topic-multi-2020 install

roberta-base-tweet-topic-multi-2020 is an open source model from GitHub that offers a free installation service, and any user can find roberta-base-tweet-topic-multi-2020 on GitHub to install. At the same time, huggingface.co provides the effect of roberta-base-tweet-topic-multi-2020 install, users can directly use roberta-base-tweet-topic-multi-2020 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

roberta-base-tweet-topic-multi-2020 install url in huggingface.co:

https://huggingface.co/cardiffnlp/roberta-base-tweet-topic-multi-2020

Url of roberta-base-tweet-topic-multi-2020

roberta-base-tweet-topic-multi-2020 huggingface.co Url

Provider of roberta-base-tweet-topic-multi-2020 huggingface.co

cardiffnlp
ORGANIZATIONS

Other API from cardiffnlp