Text Classification
Transformers
Safetensors
English
Russian
xlm-roberta
emotion-classification
multi-label-classification
goemotions
english
russian
affective-computing
text-embeddings-inference
Instructions to use proxy3d/multi-motions-28 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use proxy3d/multi-motions-28 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="proxy3d/multi-motions-28")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("proxy3d/multi-motions-28") model = AutoModelForSequenceClassification.from_pretrained("proxy3d/multi-motions-28", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +178 -38
- README_RU.md +2 -1
- UPLOAD_TO_HUGGINGFACE.md +31 -0
- requirements.txt +2 -5
README.md
CHANGED
|
@@ -1,59 +1,199 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
colorTo: indigo
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.49.1
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# Multi-Motions 28 —
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
**
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
The
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
- active multi-label predictions;
|
| 30 |
-
- ready-to-run EN/RU examples.
|
| 31 |
|
| 32 |
-
## Author
|
| 33 |
|
| 34 |
-
|
| 35 |
-
Telegram channel: https://t.me/greenruff
|
| 36 |
|
| 37 |
-
**
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
##
|
| 41 |
|
| 42 |
-
|
| 43 |
-
communication style selection and other dialogue-control mechanisms.
|
| 44 |
|
| 45 |
-
|
| 46 |
-
https://iproxy3d.github.io/communication-styles-llm/
|
| 47 |
|
| 48 |
-
|
| 49 |
-
https://github.com/iproxy3d/communication-styles-llm
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
```bash
|
| 54 |
-
pip install -
|
| 55 |
-
python app.py
|
| 56 |
```
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- ru
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
license: mit
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-classification
|
| 8 |
+
base_model: FacebookAI/xlm-roberta-base
|
| 9 |
+
tags:
|
| 10 |
+
- emotion-classification
|
| 11 |
+
- multi-label-classification
|
| 12 |
+
- goemotions
|
| 13 |
+
- xlm-roberta
|
| 14 |
+
- english
|
| 15 |
+
- russian
|
| 16 |
+
- affective-computing
|
| 17 |
+
widget:
|
| 18 |
+
- text: "Я наконец закончил — какое облегчение!"
|
| 19 |
+
- text: "Thank you, this really helped me."
|
| 20 |
---
|
| 21 |
|
| 22 |
+
# Multi-Motions 28 — EN/RU
|
| 23 |
|
| 24 |
+
**One bilingual XLM-RoBERTa checkpoint · English + Russian · 28 GoEmotions-compatible outputs · multi-label classification.**
|
| 25 |
|
| 26 |
+
**Author:** Ilya Zelenskiy (proxy3d)
|
| 27 |
+
**Telegram channel:** https://t.me/greenruff
|
| 28 |
+
**Model repository:** https://huggingface.co/proxy3d/multi-motions-28
|
| 29 |
|
| 30 |
+
**Related work:**
|
| 31 |
+
- Communication Styles LLM — article / live documentation: https://iproxy3d.github.io/communication-styles-llm/
|
| 32 |
+
- Communication Styles LLM — GitHub: https://github.com/iproxy3d/communication-styles-llm
|
| 33 |
+
- **Multi-Motions 28 — detailed article and benchmarks:** https://huggingface.co/spaces/proxy3d/multi-motions-28-article
|
| 34 |
|
| 35 |
+
The model returns a complete **28-dimensional sigmoid score vector**: 27 fine-grained emotions plus `neutral`. It was built as a single EN/RU model rather than separate English and Russian classifiers, and it was additionally validated on independent **native-Russian** corpora that were not used for training or checkpoint selection.
|
| 36 |
|
| 37 |
+
> **Detailed article:** [https://huggingface.co/spaces/proxy3d/multi-motions-28-article](https://huggingface.co/spaces/proxy3d/multi-motions-28-article)
|
| 38 |
+
> **Russian quick overview:** [`README_RU.md`](./README_RU.md)
|
| 39 |
+
> **Machine-readable benchmarks:** [`benchmarks.json`](./benchmarks.json)
|
|
|
|
|
|
|
| 40 |
|
|
|
|
| 41 |
|
| 42 |
+
## Why use this model?
|
|
|
|
| 43 |
|
| 44 |
+
- One checkpoint for **English and Russian**.
|
| 45 |
+
- Fine-grained **28-label** GoEmotions-compatible representation rather than only a small set of basic emotions.
|
| 46 |
+
- Full continuous score vector is available for agents, analytics, routing, state models, and downstream calibration.
|
| 47 |
+
- The selected training configuration was checked across **3 independent random seeds**.
|
| 48 |
+
- Russian transfer was tested on **CEDR** and **SemEval-2025 RU** without training on either benchmark.
|
| 49 |
|
| 50 |
+
## Application context — Communication Styles LLM
|
| 51 |
|
| 52 |
+
A practical application context for this classifier is the **Communication Styles LLM** project, which explores emotion-aware conversational agents, persistent emotional state, communication styles, motivation, and microdialogue-based behavior control.
|
|
|
|
| 53 |
|
| 54 |
+
The 28-dimensional output of this model can be used as the semantic emotion signal for such a system: instead of reducing a message to a single emotion label, downstream logic can consume the full emotion vector and combine it with state, style, and dialogue context.
|
|
|
|
| 55 |
|
| 56 |
+
- **Article / live documentation:** https://iproxy3d.github.io/communication-styles-llm/
|
| 57 |
+
- **GitHub repository:** https://github.com/iproxy3d/communication-styles-llm
|
| 58 |
|
| 59 |
+
The companion repository is also the natural place for end-to-end integration examples that connect this classifier to the agent pipeline.
|
| 60 |
+
|
| 61 |
+
## Labels
|
| 62 |
+
|
| 63 |
+
`admiration, amusement, anger, annoyance, approval, caring, confusion, curiosity, desire, disappointment, disapproval, disgust, embarrassment, excitement, fear, gratitude, grief, joy, love, nervousness, optimism, pride, realization, relief, remorse, sadness, surprise, neutral`
|
| 64 |
+
|
| 65 |
+
## Quick start — Transformers
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
import torch
|
| 69 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 70 |
+
|
| 71 |
+
MODEL_ID = "proxy3d/multi-motions-28"
|
| 72 |
+
|
| 73 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, use_fast=True)
|
| 74 |
+
model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID).eval()
|
| 75 |
+
|
| 76 |
+
text = "Я наконец закончил — какое облегчение!"
|
| 77 |
+
inputs = tokenizer(
|
| 78 |
+
text,
|
| 79 |
+
return_tensors="pt",
|
| 80 |
+
truncation=True,
|
| 81 |
+
max_length=64,
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
with torch.inference_mode():
|
| 85 |
+
scores = torch.sigmoid(model(**inputs).logits[0])
|
| 86 |
+
|
| 87 |
+
result = sorted(
|
| 88 |
+
[(model.config.id2label[i], float(scores[i])) for i in range(len(scores))],
|
| 89 |
+
key=lambda x: x[1],
|
| 90 |
+
reverse=True,
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
print(result[:5])
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
The model was trained/evaluated with `max_length=64`; using the same value is recommended for reproducible inference behavior.
|
| 97 |
+
|
| 98 |
+
## Hugging Face pipeline
|
| 99 |
+
|
| 100 |
+
Because `config.json` declares `problem_type = "multi_label_classification"`, the Transformers text-classification pipeline uses sigmoid outputs for this model.
|
| 101 |
+
|
| 102 |
+
```python
|
| 103 |
+
from transformers import pipeline
|
| 104 |
+
|
| 105 |
+
classifier = pipeline(
|
| 106 |
+
"text-classification",
|
| 107 |
+
model="proxy3d/multi-motions-28",
|
| 108 |
+
tokenizer="proxy3d/multi-motions-28",
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
scores = classifier(
|
| 112 |
+
"I am nervous, but also excited about tomorrow.",
|
| 113 |
+
top_k=None,
|
| 114 |
+
truncation=True,
|
| 115 |
+
max_length=64,
|
| 116 |
+
)
|
| 117 |
+
print(scores)
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
## Convenience wrapper
|
| 121 |
+
|
| 122 |
+
If you clone the repository, it also contains a small inference wrapper that returns all 28 scores plus optional thresholded labels:
|
| 123 |
|
| 124 |
```bash
|
| 125 |
+
pip install -e .
|
|
|
|
| 126 |
```
|
| 127 |
|
| 128 |
+
```python
|
| 129 |
+
from goemotions_en_ru import EmotionClassifier
|
| 130 |
+
|
| 131 |
+
clf = EmotionClassifier("proxy3d/multi-motions-28")
|
| 132 |
+
result = clf.predict("Спасибо, это действительно помогло.", top_k=5)
|
| 133 |
+
|
| 134 |
+
print(result["top"])
|
| 135 |
+
print(result["scores"]) # all 28 dimensions
|
| 136 |
+
print(result["labels"]) # convenience thresholds
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
## Benchmarks
|
| 140 |
+
|
| 141 |
+
Values are mean ± population standard deviation over 3 independently trained seeds.
|
| 142 |
+
|
| 143 |
+
| Evaluation | Micro-F1 | Macro-F1 | Micro-AP | Macro-AP |
|
| 144 |
+
|---|---:|---:|---:|---:|
|
| 145 |
+
| GoEmotions EN test | **0.5953 ± 0.0017** | **0.5196 ± 0.0035** | **0.6366 ± 0.0041** | **0.5065 ± 0.0028** |
|
| 146 |
+
| GoEmotions RU translated test | **0.5654 ± 0.0014** | **0.4826 ± 0.0050** | **0.5950 ± 0.0023** | **0.4609 ± 0.0057** |
|
| 147 |
+
| CEDR native RU, 5 shared labels | **0.5180 ± 0.0135** | **0.5295 ± 0.0181** | **0.6388 ± 0.0003** | **0.6762 ± 0.0079** |
|
| 148 |
+
| SemEval-2025 native RU, 6 shared labels | **0.6355 ± 0.0142** | **0.6332 ± 0.0180** | **0.8407 ± 0.0013** | **0.8448 ± 0.0047** |
|
| 149 |
+
|
| 150 |
+
### How to interpret the native-Russian results
|
| 151 |
+
|
| 152 |
+
CEDR and SemEval-2025 RU are **external transfer tests**, not datasets on which this checkpoint was trained or tuned. The model saw **zero CEDR and zero SemEval/BRIGHTER train/dev examples** during training and checkpoint selection. Only emotions actually annotated by each benchmark were scored; the other GoEmotions dimensions were ignored rather than treated as negatives.
|
| 153 |
+
|
| 154 |
+
This is deliberately different from a benchmark leaderboard where systems are trained directly on the target benchmark. The native-RU tests answer a different engineering question: **does the bilingual 28-emotion representation transfer to original Russian text from unseen corpora?**
|
| 155 |
+
|
| 156 |
+
See `benchmarks.json` for machine-readable aggregate metrics. The full article is published as a free [Hugging Face Static Space](https://huggingface.co/spaces/proxy3d/multi-motions-28-article); its source is also kept in `docs/index.html`.
|
| 157 |
+
|
| 158 |
+
## Scores and thresholds
|
| 159 |
+
|
| 160 |
+
The raw model output should be passed through sigmoid. The resulting 28 values are best interpreted as **model confidence scores**, not universally calibrated probabilities.
|
| 161 |
+
|
| 162 |
+
`thresholds.json` contains per-label thresholds selected on the bilingual GoEmotions validation distribution. They are useful defaults, but fixed thresholds are domain-sensitive. On a new production domain, continuous scores are usually the safest interface; recalibrate thresholds on a separate development set if hard labels are required.
|
| 163 |
+
|
| 164 |
+
## Intended use
|
| 165 |
+
|
| 166 |
+
Suitable for:
|
| 167 |
+
|
| 168 |
+
- emotion-aware conversational agents;
|
| 169 |
+
- affect/state representations;
|
| 170 |
+
- analytics and monitoring;
|
| 171 |
+
- routing and downstream decision systems;
|
| 172 |
+
- EN/RU research requiring a shared fine-grained emotion space.
|
| 173 |
+
|
| 174 |
+
Do not use expressed-text emotion as a clinical diagnosis or as the sole basis for high-stakes decisions about a person.
|
| 175 |
+
|
| 176 |
+
## Architecture
|
| 177 |
+
|
| 178 |
+
- Backbone: `FacebookAI/xlm-roberta-base`
|
| 179 |
+
- Task: multi-label sequence classification
|
| 180 |
+
- Outputs: 28 independent logits → sigmoid scores
|
| 181 |
+
- Languages validated in this release: English and Russian
|
| 182 |
+
- Recommended inference max length: 64 tokens
|
| 183 |
+
|
| 184 |
+
The public model repository intentionally contains **no training datasets, dataset-construction scripts, translation pipeline, synthetic-data generator, annotation pipeline, trainer states, or training code**.
|
| 185 |
+
|
| 186 |
+
## Author and project links
|
| 187 |
+
|
| 188 |
+
- **Author:** Ilya Zelenskiy (proxy3d)
|
| 189 |
+
- **Telegram channel:** https://t.me/greenruff
|
| 190 |
+
**Model repository:** https://huggingface.co/proxy3d/multi-motions-28
|
| 191 |
+
- **Communication Styles LLM article:** https://iproxy3d.github.io/communication-styles-llm/
|
| 192 |
+
- **Communication Styles LLM GitHub:** https://github.com/iproxy3d/communication-styles-llm
|
| 193 |
+
- **Multi-Motions 28 detailed article:** https://huggingface.co/spaces/proxy3d/multi-motions-28-article
|
| 194 |
+
- **Citation metadata:** `CITATION.cff`
|
| 195 |
+
|
| 196 |
+
## License
|
| 197 |
+
|
| 198 |
+
Released under the MIT License. See `THIRD_PARTY_NOTICES.md` for third-party notices and the training-data licensing reminder.
|
| 199 |
+
|
README_RU.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
**Модель на Hugging Face:** https://huggingface.co/proxy3d/multi-motions-28
|
| 6 |
|
| 7 |
**Связанные материалы:**
|
|
|
|
| 8 |
- Communication Styles LLM — статья: https://iproxy3d.github.io/communication-styles-llm/
|
| 9 |
- Communication Styles LLM — GitHub: https://github.com/iproxy3d/communication-styles-llm
|
| 10 |
|
|
@@ -14,7 +15,7 @@
|
|
| 14 |
|
| 15 |
Результат проверен на трёх независимых seed и дополнительно на оригинальных русских текстах CEDR и SemEval-2025 RU, которые не использовались при обучении или выборе checkpoint.
|
| 16 |
|
| 17 |
-
Подробности и код использования находятся в `README.md`
|
| 18 |
## Практическое применение — Communication Styles LLM
|
| 19 |
|
| 20 |
Контекст практического применения классификатора описан в проекте **Communication Styles LLM**: эмоциональное состояние агента, коммуникационные стили, мотивация и управление поведением через микродиалоги. Полный 28-D вектор классификатора можно использовать как семантический эмоциональный сигнал для этой системы, не сводя состояние реплики к одной выбранной эмоции.
|
|
|
|
| 5 |
**Модель на Hugging Face:** https://huggingface.co/proxy3d/multi-motions-28
|
| 6 |
|
| 7 |
**Связанные материалы:**
|
| 8 |
+
- **Подробная статья Multi-Motions 28 и бенчмарки:** https://huggingface.co/spaces/proxy3d/multi-motions-28-article
|
| 9 |
- Communication Styles LLM — статья: https://iproxy3d.github.io/communication-styles-llm/
|
| 10 |
- Communication Styles LLM — GitHub: https://github.com/iproxy3d/communication-styles-llm
|
| 11 |
|
|
|
|
| 15 |
|
| 16 |
Результат проверен на трёх независимых seed и дополнительно на оригинальных русских текстах CEDR и SemEval-2025 RU, которые не использовались при обучении или выборе checkpoint.
|
| 17 |
|
| 18 |
+
Подробности и код использования находятся в `README.md`. Развёрнутая статья опубликована в бесплатном Hugging Face Static Space: https://huggingface.co/spaces/proxy3d/multi-motions-28-article. Исходный HTML также сохранён в `docs/index.html`.
|
| 19 |
## Практическое применение — Communication Styles LLM
|
| 20 |
|
| 21 |
Контекст практического применения классификатора описан в проекте **Communication Styles LLM**: эмоциональное состояние агента, коммуникационные стили, мотивация и управление поведением через микродиалоги. Полный 28-D вектор классификатора можно использовать как семантический эмоциональный сигнал для этой системы, не сводя состояние реплики к одной выбранной эмоции.
|
UPLOAD_TO_HUGGINGFACE.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Upload to Hugging Face
|
| 2 |
|
| 3 |
## 1. Add the only missing large file
|
|
|
|
| 1 |
+
## Repair the current public repository
|
| 2 |
+
|
| 3 |
+
If the previous Gradio-Space files were already uploaded to the **model**
|
| 4 |
+
repository, remove them once:
|
| 5 |
+
|
| 6 |
+
```bash
|
| 7 |
+
hf repos delete-files proxy3d/multi-motions-28 app.py UPLOAD_TO_SPACE.md "__pycache__/" "examples/__pycache__/" "goemotions_en_ru/__pycache__/" --repo-type model
|
| 8 |
+
```
|
| 9 |
+
|
| 10 |
+
Then upload this corrected repository from its root:
|
| 11 |
+
|
| 12 |
+
```bash
|
| 13 |
+
hf upload proxy3d/multi-motions-28 . .
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
`hf upload` does not delete the existing remote `model.safetensors` merely
|
| 17 |
+
because the 1.1 GB file is absent from this repair archive.
|
| 18 |
+
|
| 19 |
+
The model page should then render this repository's full `README.md` as the
|
| 20 |
+
Model Card again.
|
| 21 |
+
|
| 22 |
+
## Detailed article as a free Static Space
|
| 23 |
+
|
| 24 |
+
The detailed HTML article is packaged separately for:
|
| 25 |
+
|
| 26 |
+
`proxy3d/multi-motions-28-article`
|
| 27 |
+
|
| 28 |
+
Article URL after deployment:
|
| 29 |
+
|
| 30 |
+
https://huggingface.co/spaces/proxy3d/multi-motions-28-article
|
| 31 |
+
|
| 32 |
# Upload to Hugging Face
|
| 33 |
|
| 34 |
## 1. Add the only missing large file
|
requirements.txt
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
gradio>=5.0,<6.0
|
| 2 |
-
transformers>=4.44,<5.0
|
| 3 |
torch>=2.2
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
safetensors>=0.4
|
|
|
|
|
|
|
|
|
|
| 1 |
torch>=2.2
|
| 2 |
+
transformers>=4.44
|
| 3 |
+
huggingface-hub>=0.24
|
|
|