/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
bert-base-uncased
Библиотека
transformers
Опубликована
21 июн 2026

emotispace-128

Заполнение пропусковТекст → текст6 профессий

Англоязычная BERT-модель классифицирует эмоции в тексте и строит 128-мерные эмбеддинги для поиска эмоционально близких высказываний.

80скачиваний за 30 дней0лайковвеса обновлены26 июн 2026

Бенчмарки

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

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

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

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

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

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

EmotiSpace-128 — англоязычная модель на базе BERT, разработанная автором репозитория lunahr. Она преобразует текст в нормализованный эмоциональный эмбеддинг размерности 128 и одновременно выдаёт логиты и вероятности меток эмоций в стиле GoEmotions. Модель дообучена на google-bert/bert-base-uncased с размороженными последними четырьмя слоями BERT и поддерживает контекст до 512 токенов.

Модель предназначена для классификации эмоций, поиска текстов с близким эмоциональным смыслом по косинусному сходству, работы с пользовательскими эмоциональными якорями, отслеживания настроения диалога и передачи эмоциональных сигналов в системы управления тоном или просодией речи. Классификатор ограничен набором меток GoEmotions, тогда как эмбеддинги позволяют задавать собственные эмоциональные якоря, которые следует проверять для конкретного применения. Модель оценивает эмоциональный смысл текста, а не испытывает эмоции; её выводы не подходят для психологической диагностики или оценки психического здоровья. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

EmotiSpace-128

EmotiSpace-128 is a BERT-based hybrid emotion model that maps text into a 128-dimensional emotional embedding space and also predicts GoEmotions-style emotion labels.

It is not only a classifier. The main goal is to produce a reusable emotional latent space where similar emotional meanings are close together, while still exposing readable emotion probabilities.

What it does

Input:

I feel devastated.

Output:

  • a normalized 128D emotion embedding
  • raw logits
  • sigmoid probabilities for emotion labels

Example labels:

sadness
remorse
disappointment
grief
gratitude

Architecture

bert-base-uncased
-> pooled BERT output
-> projection head: 768 -> 256 -> 128
-> normalized 128D EmotiSpace embedding
-> classifier head
-> emotion probabilities

The model uses a custom Transformers architecture:

model_type: bert_emotispace

Load it with trust_remote_code=True.

Training

The model was trained in two passes.

Pass 1 focused on emotion classification using GoEmotions labels.

Pass 2 continued training with a combined objective:

loss = classification_loss + 0.05 * embedding_geometry_loss

The second pass was used to make the 128D embedding space more useful for cosine similarity and custom emotion anchors.

Training used the last 4 BERT layers unfrozen, with early stopping.

Intended use

EmotiSpace-128 is useful for:

  • emotion classification
  • emotion embeddings
  • emotional similarity search
  • custom emotion anchors beyond fixed labels
  • character mood systems
  • dialogue tone control
  • TTS/prosody control pipelines
  • conversation mood tracking

It can be used in two modes:

Easy mode

Use the emotion probabilities as a normal classifier.

Advanced mode

Use the 128D embedding directly and compare it against custom emotion anchors.

For example, you can define anchors such as:

nostalgia
warmth
calm
playfulness
emotional flatness
bittersweetness

without retraining the model.

Usage

import torch
from transformers import AutoModel, AutoTokenizer

model_id = "lunahr/emotispace-128"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(
    model_id,
    trust_remote_code=True,
)
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
model.eval()

@torch.no_grad()
def analyze(texts, top_k=5):
    if isinstance(texts, str):
        texts = [texts]
    tokens = tokenizer(
        texts,
        return_tensors="pt",
        padding=True,
        truncation=True,
        max_length=128,
    ).to(device)
    out = model(**tokens)
    embeddings = out["embeddings"].cpu()
    probs = out["probs"].cpu()
    results = []
    for i, text in enumerate(texts):
        top = torch.topk(probs[i], k=top_k)
        results.append({
            "text": text,
            "embedding": embeddings[i],
            "labels": [
                {
                    "label": model.config.label_names[idx.item()],
                    "score": score.item(),
                }
                for score, idx in zip(top.values, top.indices)
            ],
        })
    return results

for item in analyze([
    "I feel devastated.",
    "This is amazing, I am so happy!",
]):
    print(item["text"])
    print(item["embedding"].shape)
    print(item["labels"])
    print()

Example behavior

Example output:

I feel devastated.
embedding shape: torch.Size([128])
sadness, remorse, disappointment, grief
This is amazing, I am so happy!
embedding shape: torch.Size([128])
joy, excitement, admiration, love

The embedding space can also separate emotional and non-emotional text. For example, emotionally charged text can be far away from factual neutral sentences like:

The table is made of wood.

Notes on embeddings

The 128D embedding is normalized and can be compared with cosine similarity.

Example use:

similarity = embedding_a @ embedding_b.T

The embedding space is designed to support emotional similarity, not just exact label matching.

For example:

"I feel devastated."

should be close to:

"I am so sad I could cry."

and far from:

"This is amazing, I am so happy!"

Limitations

This model is trained from English text and should be treated as English-first.

It is based on GoEmotions-style labels, so the classifier output is limited to that label space. The embedding space is more flexible, but custom emotion anchors should still be tested carefully.

The model does not actually “feel” emotions. It estimates emotional meaning from text.

Embeddings are useful for similarity and downstream control, but they are not a psychological diagnosis or a reliable mental health assessment tool.

Suggested downstream design

A recommended pattern is:

recent messages
-> EmotiSpace embeddings
-> weighted rolling mood embedding
-> compare against persona-agnostic emotion anchors
-> map to character response style or TTS controls

Keep emotion anchors persona-agnostic. Define what the emotion means generally, not how a specific character expresses it.

Good anchor style:

A calm emotional state with low tension, steady energy, and no urgency.

Avoid persona-specific anchors like:

Luna feels calm and wants to comfort you.

This prevents one character’s style from leaking into unrelated characters.

Citation

This model is based on BERT and trained using GoEmotions-style emotion supervision.

If you use this model, please credit:

lunahr/emotispace-128

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

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

GPU в ailist

Универсальный рантайм · transformers · fill-mask

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForMaskedLM
Ревизия весов
34c72d6

0 моделей