/ Модель

Характеристики

Контекст
512 токенов
Параметры
56,8 млн
Лицензия
Apache 2.0
Базовая модель
xlm-roberta-large
Опубликована
8 сен 2026

lettuce-thymos-26m-v1

Классификация текстаТекст → label7 профессий

Компактная мультиязычная модель для многометочной классификации эмоций в коротких разговорных текстах на 22 языках.

70скачиваний за 30 дней1лайквеса обновлены8 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

lettuce-thymos-26m-v1 — компактная модель классификации эмоций, разработанная авторами репозитория Zeolit. Она определяет несколько эмоций одновременно по короткому разговорному тексту на 22 языках, используя 28 меток GoEmotions. Модель основана на дистиллированном энкодере XLM-RoBERTa large: 8 слоёв, размер скрытого состояния 384, 6 голов внимания и позиционное кодирование RoPE. В репозитории указаны 26,5 млн параметров и вариант ONNX размером 28 МБ в INT8; доступны также веса safetensors.

Модель предназначена для автоматической разметки эмоций в сообщениях, например для анализа тональности разговоров или группировки текстов по эмоциональным меткам. Она поддерживает английский, русский и ещё 20 языков. Для решений следует применять отдельные пороги из labels.json: единый порог 0,5 заметно снижает macro-F1. Лицензия — Apache-2.0.

Основные ограничения связаны с данными Reddit: модель хуже подходит для длинных, литературных и формальных текстов. Результаты для арабского и суахили ниже, чем для большинства языков; слабее также распознаются grief, relief, pride, nervousness и embarrassment. Вероятности не откалиброваны как абсолютная уверенность, а клинические, диагностические и критически важные решения для безопасности не являются целевым применением.

Сценарии применения

  • разметка эмоций в сообщениях пользователей
  • анализ эмоциональной окраски коротких комментариев
  • группировка отзывов по эмоциональным меткам
  • эмоциональная аналитика многоязычных чатов
  • фильтрация и поиск сообщений по эмоциям

Ограничения

Модель лучше подходит для короткого неформального текста в стиле Reddit; на длинных и формальных текстах, а также на арабском и суахили качество ниже. Для редких эмоций распознавание слабее, вероятности не являются откалиброванной уверенностью; модель не предназначена для клинического, диагностического или критически важного применения.

Для каких профессий подходит7

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

lettuce-thymos-26m-v1

Multi-label emotion classification over the 28 GoEmotions labels in 22 languages. 26.5M parameters, 28 MB as int8 ONNX.

Thymos (θυμός) is the Homeric Greek word for the seat of emotion.

Model description

A transformer encoder distilled from FacebookAI/xlm-roberta-large. Label set and label order match SamLowe/roberta-base-go_emotions.

Architecture8 layers, 384 hidden, 6 heads, FFN 1152, pre-LN
Position encodingRoPE, base 10000
EmbeddingFactorized: 114,087 x 128, projected to 384
PoolingMasked mean
Parameters26.5M (14.6M embedding, 11.9M encoder)
Context128 tokens
TokenizerXLM-RoBERTa SentencePiece, vocabulary trimmed to 114,087
Output28 independent sigmoid probabilities
File size28 MB int8 ONNX, 62 MB fp32 ONNX

Intended uses and limitations

Emotion tagging of short conversational text in 22 languages, on device or on CPU. Multi-label: one input can carry several emotions.

Not for clinical, diagnostic or safety-critical use, and not a measure of a person's emotional state.

Known weaknesses are listed under Limitations.

How to use

import json, numpy as np, onnxruntime as ort
from transformers import AutoTokenizer

tok = AutoTokenizer.from_pretrained("Zeolit/lettuce-thymos-26m-v1")
sess = ort.InferenceSession("onnx/model_quantized.onnx",
                            providers=["CPUExecutionProvider"])
meta = json.load(open("labels.json"))

enc = tok(["I'm so grateful you were there for me."], return_tensors="np")
probs = sess.run(None, {"input_ids": enc["input_ids"].astype(np.int64),
                        "attention_mask": enc["attention_mask"].astype(np.int64)})[0][0]

active = [(label, float(p))
          for label, p, t in zip(meta["labels"], probs, meta["thresholds"]) if p >= t]

Use the per-class thresholds in labels.json. A fixed 0.5 cutoff costs a large amount of macro-F1 because the rare classes rarely reach it.

Inputs longer than 128 tokens: split into overlapping windows with stride 96, then aggregate element-wise max for label presence, or length-weighted mean for overall tone. inference.py in this repository implements this; thresholds were fitted on single windows, so document-level aggregation is not calibrated.

Repository layout:

config.json               architecture config
model.safetensors         PyTorch weights
modeling_thymos.py        model definition, load with load_student(".")
inference.py              chunked inference helper
labels.json               28 labels, per-class thresholds, calibration record
tokenizer.json            XLM-RoBERTa SentencePiece, trimmed vocabulary
onnx/model.onnx           fp32 export
onnx/model_quantized.onnx int8 export
evaluation/               per-model evaluation artifacts for every table below

Training data

SourceGoEmotions, 58k Reddit comments, 27 emotions plus neutral
Splits43,410 train / 5,426 validation / 5,427 test
Translationfacebook/m2m100_1.2B into 21 additional languages
Training rows955,020

en, es, fr, de, pt, it, nl, ru, pl, uk, ar, fa, hi, bn, zh, ja, ko, vi, th, id, sw, tr.

Training procedure

Teacher. FacebookAI/xlm-roberta-large fine-tuned on all 22 languages. 3 epochs, batch 128, lr 1e-5 cosine with 6% warmup, layer-wise lr decay 0.9, EMA 0.999, max length 96, bf16.

Student. Distilled from teacher logits. 20 epochs, batch 512, lr 3e-4, AdamW weight decay 0.01. Loss: 0.7 per-label binary KD at temperature 2, plus 0.3 supervised. Embedding initialized from a low-rank SVD of the teacher's embedding matrix. Checkpoint selected on threshold-free validation macro-AP.

Thresholds. Per class, grid searched on held-out validation folds.

Quantization. The embedding table is quantized to int8 with per-row scales separately from the matmuls, since ONNX Runtime dynamic quantization does not cover Gather.

Evaluation

Five GoEmotions models sharing the same 28 labels, measured under one protocol. Rows ordered by parameter count.

GoEmotions

Test split of GoEmotions, machine-translated into 21 further languages, 119,394 rows. English thresholds tuned on English validation; multilingual thresholds tuned on the pooled validation set.

modelparamslanguagesEnglish macro-F122-language macro-F122-language micro-F1
lettuce-thymos-26m-v126.5M220.5270.4460.523
joeddav/distilbert-base-uncased-go-emotions-student67M10.3360.1210.211
SamLowe/roberta-base-go_emotions125M10.5050.1470.296
cirimus/modernbert-base-go-emotions149M10.5350.1820.333
cirimus/modernbert-large-go-emotions395M10.5420.1850.338

Teacher macro-F1 on the 22-language evaluation is 0.462.

Per language, this model against SamLowe/roberta-base-go_emotions, pooled thresholds:

languagebaselinethis model
en0.3790.522
pt0.1340.474
de0.1440.470
fr0.1410.470
it0.1390.470
vi0.1300.469
pl0.1100.466
id0.1100.461
es0.1620.457
zh0.0690.457
hi0.0750.456
nl0.1570.455
ru0.0730.452
uk0.0670.445
ja0.1030.444
fa0.0510.434
ko0.1030.431
th0.1020.427
bn0.0560.419
tr0.0940.407
sw0.0980.361
ar0.0410.354

BRIGHTER

BRIGHTER (SemEval-2025 Task 11): 28 languages, text written natively in each language, human annotated, CC-BY 4.0. No model in the table was trained on it.

The 28 GoEmotions labels are projected onto BRIGHTER's six emotions through Ekman groups, taking the maximum within each group. Thresholds tuned on each language's own dev split. Zero-shot across dataset, domain and label set.

Languages are grouped by whether they appear in this model's training set. Four of the unseen languages (Makhuwa, Kinyarwanda, Tatar, Nigerian Pidgin) are also absent from XLM-RoBERTa's pretraining corpus.

modelparamstrained langs (13)unseen langs (15)English
lettuce-thymos-26m-v126.5M0.4270.2920.502
SamLowe/roberta-base-go_emotions125M0.1920.1520.505
cirimus/modernbert-base-go-emotions149M0.2500.2040.520
cirimus/modernbert-large-go-emotions395M0.2010.1440.493

This model per language, training languages:

rueshienidukar (dz)zhdept (br)ar (ma)pt (mz)sw
0.6080.6050.5680.5020.4540.4460.4280.4090.3980.3440.2910.2610.242

Unseen languages, highest to lowest: Romanian 0.516, Javanese 0.432, Marathi 0.414, Sundanese 0.397, Nigerian Pidgin 0.395, Tatar 0.310, Swedish 0.287, Hausa 0.283, Afrikaans 0.257, Igbo 0.243, Xhosa 0.240, Kinyarwanda 0.195, Yoruba 0.151, Zulu 0.134, Makhuwa 0.121.

Systems fine-tuned on BRIGHTER's training data score 0.55 to 0.89 on this task. Those numbers are not comparable to the zero-shot results above.

English macro-F1 on both evaluations:

modelGoEmotionsBRIGHTER
SamLowe/roberta-base-go_emotions0.5050.505
cirimus/modernbert-base-go-emotions0.5350.520
lettuce-thymos-26m-v10.5270.502
cirimus/modernbert-large-go-emotions0.5420.493

Latency

ONNX Runtime, CPU, Intel i7-10700K, batch 1, median of 40 runs.

threadsseq 32seq 64seq 128
16.4 ms12.2 ms24.6 ms
23.8 ms7.2 ms13.9 ms
42.7 ms4.7 ms8.9 ms

Chunked input scales close to linearly, 12 to 14 ms per 128-token window at 2 threads.

Limitations

grief, relief, pride, nervousness and embarrassment score well below the average. GoEmotions contains 77 grief training examples, and macro-F1 weights that class equally with classes that have thousands.

Arabic and Swahili trail the other languages on both evaluations. BRIGHTER tests Arabic in Algerian and Moroccan dialects while training used Modern Standard Arabic; the two dialects differ by 0.14.

Training domain is Reddit comments: short, informal, conversational. Literary text, long-form writing and formal registers are out of distribution.

Output probabilities are not calibrated as absolute confidences. Decisions come from the per-class thresholds.

Non-English training data is machine-translated. In the GoEmotions evaluation the test data comes from the same translator, so those per-language scores measure performance on translated text. Its 119,394 rows are 5,427 source comments rendered in 22 languages, not 119,394 independent examples. The BRIGHTER evaluation covers 11 of the 22 languages on natively written text.

Languages outside the listed 22 rely on backbone transfer and score lower.

License

Apache-2.0.

Upstream: GoEmotions (Apache-2.0), M2M-100 (MIT), XLM-RoBERTa (MIT). Evaluation data: GoEmotions (Apache-2.0), BRIGHTER (CC-BY 4.0).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Архитектура ? неизвестна transformers в образе рантайма.

Ревизия весов
5721992

0 моделей