Downloads · 30 days
9
0% of all-time downloads
Ramavill/twBETO_v0
twBETO_v0 is a fill-mask model from Ramavill. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
This repository contains the resources in our paper [Social Context in Political Stance Detection: Impact and Extrapolation] Ramon Villa-Cox, Evan Williams, Kathleen M. Carley
Downloads · 30 days
9
0% of all-time downloads
All-time downloads
6K
Public
Repo size
653 MB
Likes
1
Public
Click a slice to open those files.
.bin327 MB · 99%
From the Hugging Face model README
This repository contains the resources in our paper
[Social Context in Political Stance Detection: Impact and Extrapolation]
Ramon Villa-Cox, Evan Williams, Kathleen M. Carley
We pre-trained a BERT language model, we call TwBETO_v0 following the robust approach introduced in RoBERTa. We opted for the smaller architecture dimensions introduced in DistilBERT, namely, 6 hidden layers with 12 attention heads. We also reduce the model's maximum sequence length to 128 tokens, following another BERT instantiation trained on English Twitter data (BERTweet). We utilize the RoBERTa implementation in the Hugging Face library and optimize the model using Adam with weight decay, a linear schedule with warmup and a maximum learning rate of 2e-4. We use a global batch size (via gradient accumulation) of 5k across 4 Titan XP GPUs (12 GB RAM each) and trained the model for 650 hours.
The model was trained with a corpus comprised of 155M Spanish tweets (4.5B words tokens), as determined by Twitter's API, and includes only original tweets (retweets are filtered out) with more than 6 tokens, while long tweets were truncated to 64 word tokens. The data was compiled from the following sources:
Tweets are pretokenized using the "TweetTokenizer" from the NLTK toolkit and use the emoji package to translate emotion icons into word tokens (in Spanish). We also preprocess the Tweets by replacing user mentions with "USER_AT" and, using the tweet JSON, we replace media urls with "HTTPMEDIA" and web urls with "HTTPURL". We found that this new model produced significantly better quality embeddings than other available Spanish BERT variants for Twitter (e.g.: TWilBert). We hypothesize that this is a result of the latter being trained mainly on European Spanish with fewer data and it not applying the RoBERTa pretraining framework.