--- model-index: - name: poltextlab/xlm-roberta-large-pooled-emotions9-v2 results: - task: type: text-classification metrics: - name: Accuracy type: accuracy value: 72% - name: F1-Score type: f1 value: 72% tags: - text-classification - pytorch metrics: - precision - recall - f1-score language: - en - hu - fr - cs - sk - pl - de base_model: - xlm-roberta-large pipeline_tag: text-classification library_name: transformers license: cc-by-4.0 extra_gated_prompt: Our models are intended for academic projects and academic research only. If you are not affiliated with an academic institution, please reach out to us at huggingface [at] poltextlab [dot] com for further inquiry. If we cannot clearly determine your academic affiliation and use case based on your form data, your request may be rejected. Please allow us a few business days to manually review subscriptions. extra_gated_fields: Country: country Institution: text Institution Email: text Full Name: text Please specify your academic project/use case you want to use the models for: text --- # xlm-roberta-large-pooled-emotions9-v2 An `xlm-roberta-large` model finetuned on sentence-level multilingual training data hand-annotated. ## Codebook The model assigns the following labels: - **0**: "Anger" - **1**: "Fear" - **2**: "Disgust" - **3**: "Sadness" - **4**: "Joy" - **5**: "None of Them" - **6**: "Enthusiasm" - **7**: "Hope" - **8**: "Pride" The training data we used was augmented translated texts. It covers 7 languages (English, German, French, Polish, Slovak, Czech and Hungarian) with nearly identical shares. ## How to use the model ```python from transformers import AutoTokenizer, pipeline tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large") pipe = pipeline( model="poltextlab/xlm-roberta-large-pooled-emotions9-v2", task="text-classification", tokenizer=tokenizer, use_fast=False, token="" ) text = "We will place an immediate 6-month halt on the finance driven closure of beds and wards, and set up an independent audit of needs and facilities." pipe(text) ``` ### Gated access Due to the gated access, you must pass the `token` parameter when loading the model. In earlier versions of the Transformers package, you may need to use the `use_auth_token` parameter instead. # Classification Report ## Overall Performance: * **Accuracy:** 72% * **Macro Avg:** Precision: 0.72, Recall: 0.73, F1-score: 0.72 * **Weighted Avg:** Precision: 0.72, Recall: 0.72, F1-score: 0.72 ## Per-Class Metrics: | Label | Precision | Recall | F1-score | Support | |:-------------|------------:|---------:|-----------:|----------:| | Anger | 0.55 | 0.54 | 0.55 | 5439 | | Fear | 0.76 | 0.8 | 0.78 | 5432 | | Disgust | 0.95 | 0.92 | 0.94 | 5432 | | Sadness | 0.84 | 0.84 | 0.84 | 5425 | | Joy | 0.8 | 0.81 | 0.8 | 5152 | | None of Them | 0.69 | 0.65 | 0.67 | 11158 | | Enthusiasm | 0.64 | 0.6 | 0.62 | 5432 | | Hope | 0.5 | 0.59 | 0.54 | 5439 | | Pride | 0.78 | 0.77 | 0.78 | 5432 | ## Inference platform This model is used by the [Babel Machine](https://babel.poltextlab.com), an open-source and free natural language processing tool, designed to simplify and speed up projects for comparative research. ## Cooperation Model performance can be significantly improved by extending our training sets. We appreciate every submission of coded corpora (of any domain and language) at poltextlab{at}poltextlab{dot}com or by using the [Babel Machine](https://babel.poltextlab.com). ## Debugging and issues This architecture uses the `sentencepiece` tokenizer. In order to use the model before `transformers==4.27` you need to install it manually. If you encounter a `RuntimeError` when loading the model using the `from_pretrained()` method, adding `ignore_mismatched_sizes=True` should solve the issue.