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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| license: mit | |
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| widget: | |
| - text: "You wont believe what happened to me today" | |
| - text: "You wont believe what happened to me today!" | |
| - text: "You wont believe what happened to me today..." | |
| - text: "You wont believe what happened to me today <3" | |
| - text: "You wont believe what happened to me today :)" | |
| - text: "You wont believe what happened to me today :(" | |
| 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](https://doi.org/10.1140/epjds/s13688-023-00427-0) provides further details on the model and its evauation. | |
| See [LEIA-large](https://huggingface.co/LEIA/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: | |
| ```bibtex | |
| @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} | |
| } | |
| ``` |