Downloads · 30 days
388
0% of all-time downloads
digitalepidemiologylab/covid-twitter-bert-v2
covid-twitter-bert-v2 is a machine learning model from digitalepidemiologylab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
BERT-large-uncased model, pretrained on a corpus of messages from Twitter about COVID-19. This model is identical to covid-twitter-bert - but trained on more data, resulting in higher downstream performance.
Downloads · 30 days
388
0% of all-time downloads
All-time downloads
267K
Public
Repo size
5.5 GB
Likes
4
Public
Click a slice to open those files.
.h51.5 GB · 35%
From the Hugging Face model README
BERT-large-uncased model, pretrained on a corpus of messages from Twitter about COVID-19. This model is identical to covid-twitter-bert - but trained on more data, resulting in higher downstream performance.
Find more info on our GitHub page.
The model can e.g. be used in the fill-mask task (see below). You can also use the model without the MLM/NSP heads and train a classifier with it.
from transformers import pipeline
import json
pipe = pipeline(task='fill-mask', model='digitalepidemiologylab/covid-twitter-bert-v2')
out = pipe(f"In places with a lot of people, it's a good idea to wear a {pipe.tokenizer.mask_token}")
print(json.dumps(out, indent=4))
[
{
"sequence": "[CLS] in places with a lot of people, it's a good idea to wear a mask [SEP]",
"score": 0.9998226761817932,
"token": 7308,
"token_str": "mask"
},
...
]
This model was trained on 97M unique tweets (1.2B training examples) collected between January 12 and July 5, 2020 containing at least one of the keywords "wuhan", "ncov", "coronavirus", "covid", or "sars-cov-2". These tweets were filtered and preprocessed to reach a final sample of 22.5M tweets (containing 40.7M sentences and 633M tokens) which were used for training.
The model was evaluated based on downstream Twitter text classification tasks from previous SemEval challenges.
@article{muller2020covid,
title={COVID-Twitter-BERT: A Natural Language Processing Model to Analyse COVID-19 Content on Twitter},
author={M{\"u}ller, Martin and Salath{\'e}, Marcel and Kummervold, Per E},
journal={arXiv preprint arXiv:2005.07503},
year={2020}
}
or
COVID-Twitter-BERT: A Natural Language Processing Model to Analyse COVID-19 Content on Twitter.
arXiv preprint arXiv:2005.07503 (2020).