Instructions to use LEIA/LEIA-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LEIA/LEIA-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LEIA/LEIA-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("LEIA/LEIA-base") model = AutoModelForSequenceClassification.from_pretrained("LEIA/LEIA-base") - Notebooks
- Google Colab
- Kaggle
This is an emotion classification model based on further pre-training of BERTweet-base with preferential masking of emotion words and fine-tuning on a subset of a self-labeled emotion dataset (Lykousas et al., 2019) that corresponds to Anger, Fear, Sadness, Joy, and Affection. The paper, LEIA: Linguistic Embeddings for the Identification of Affect provides further details on the model and its evauation.
See LEIA-large for a similar model based on BERTweet-large.
Citation
Please cite the following paper if you find the model useful for your work:
@article{aroyehun2023leia,
title={LEIA: Linguistic Embeddings for the Identification of Affect},
author={Aroyehun, Segun Taofeek and Malik, Lukas and Metzler, Hannah and Haimerl, Nikolas and Di Natale, Anna and Garcia, David},
journal={EPJ Data Science},
volume={12},
year={2023},
publisher={Springer}
}
- Downloads last month
- 22