/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Лицензия
CC BY 4.0
Архитектура
roberta · dense
Базовая модель
twitter-roberta-base-sentiment-latest
Библиотека
kjarni
Опубликована
8 янв 2026

twitter-roberta-base-sentiment-latest

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

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

664скачиваний за 30 дней0лайковвеса обновлены28 ноя 2026

Бенчмарки

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

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

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

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

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

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

Это англоязычная модель RoBERTa-base для определения тональности коротких публикаций и сообщений в социальных сетях. Модель подготовлена Kjarni для локального запуска через библиотеку Kjarni; исходные веса без изменений созданы Cardiff NLP и дообучены для анализа тональности на наборе TweetEval после обучения на текстах Twitter за 2018–2021 годы.

Модель классифицирует текст как отрицательный, нейтральный или положительный. Она рассчитана на короткие сообщения и учитывает характерные для соцсетей эмодзи и сленг. Размер составляет около 151,8 млн параметров, максимальный контекст — 514 токенов. Репозиторий содержит веса в формате safetensors и токенизатор для запуска через Kjarni или Transformers.

Пакетирование Kjarni меняет формат хранения и состав вспомогательных файлов, но README указывает, что веса совпадают с оригинальными побитово. Модель ориентирована на английский язык и короткие сообщения; её пригодность для длинных текстов и других языков не заявлена. Лицензия — CC BY 4.0.

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

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

Ограничения

Модель рассчитана на короткие англоязычные сообщения; качество для длинных текстов и других языков не заявлено. Для распространения и использования требуется соблюдать условия лицензии CC BY 4.0.

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

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

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

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

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

Открыть на Hugging Face

twitter-roberta-base-sentiment-latest for Kjarni

Sentiment of short English posts as negative, neutral or positive, packaged to run locally with Kjarni: one native library, with no Python runtime, server or cloud service. It was trained on social media text, so it handles emoji, slang and short messages well. The model is about 500 MB and downloads on first use.

Usage

Tested with Kjarni 0.8.2. In Kjarni the model is called roberta-sentiment.

Command line

curl -fsSL https://kjarni.ai/install.sh | sh    # Windows: irm https://kjarni.ai/install.ps1 | iex
kjarni classify -m roberta-sentiment "Worst customer service I have ever had."
Model: roberta-sentiment  Device: Cpu

  Input "Worst customer service I have ever had."

  ✓       negative  ███████████████████░   95.1%
           neutral  █░░░░░░░░░░░░░░░░░░░    4.0%
          positive  ░░░░░░░░░░░░░░░░░░░░    0.8%

Python

# pip install kjarni
from kjarni import Classifier

classifier = Classifier(model="roberta-sentiment", quiet=True)
for text in [
    "Just got the new phone and I love it 😍",
    "Worst customer service I have ever had.",
    "Meeting moved to 3pm.",
]:
    result = classifier.classify(text)
    print(f"{result.label:<8} {result.score:.2f}  {text}")
positive 0.99  Just got the new phone and I love it 😍
negative 0.95  Worst customer service I have ever had.
neutral  0.95  Meeting moved to 3pm.

Rust

// cargo add kjarni anyhow tokio --features tokio/full
use kjarni::Classifier;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let classifier = Classifier::new("roberta-sentiment").await?;
    for text in [
        "Just got the new phone and I love it 😍",
        "Worst customer service I have ever had.",
        "Meeting moved to 3pm.",
    ] {
        let result = classifier.classify(text).await?;
        println!("{:<8} {:.2}  {text}", result.label, result.score);
    }
    Ok(())
}

C#

// dotnet add package Kjarni
using Kjarni;

using var classifier = new Classifier("roberta-sentiment", quiet: true);
foreach (var text in new[] { "Just got the new phone and I love it 😍", "Worst customer service I have ever had.", "Meeting moved to 3pm." })
{
    var result = classifier.Classify(text);
    Console.WriteLine($"{result.Label,-8} {result.Score:F2}  {text}");
}

C++ (C++23)

#include <kjarni.hpp>
#include <cstdio>

int main() {
    kjarni::ClassifierOptions options;
    options.model = "roberta-sentiment";

    auto classifier = kjarni::Classifier::create(options);
    if (!classifier) return 1;

    for (const char* text : {"Just got the new phone and I love it 😍",
                             "Worst customer service I have ever had.",
                             "Meeting moved to 3pm."}) {
        auto labels = classifier->classify(text);
        if (!labels) return 1;
        const auto& top = labels->front();
        std::printf("%-8s %.2f  %s\n", top.name.c_str(), top.score, text);
    }
}

Go

// go get github.com/kjarni-ai/kjarni-go
package main

import (
	"fmt"
	"log"

	kjarni "github.com/kjarni-ai/kjarni-go"
)

func main() {
	classifier, err := kjarni.NewClassifier("roberta-sentiment", kjarni.WithQuiet(true))
	if err != nil {
		log.Fatal(err)
	}
	defer classifier.Close()

	for _, text := range []string{
		"Just got the new phone and I love it 😍",
		"Worst customer service I have ever had.",
		"Meeting moved to 3pm.",
	} {
		result, err := classifier.Classify(text)
		if err != nil {
			log.Fatal(err)
		}
		fmt.Printf("%-8s %.2f  %s\n", result.Label, result.Score, text)
	}
}

See the Kjarni documentation for other languages and installation details.

What changed from the original

This is not a new model. The weights are unchanged: every tensor is bit-for-bit the same as in the original's pytorch_model.bin. Only the packaging differs:

  • The weights are stored as safetensors.
  • The pooler layer and the position_ids buffer are left out. Classification doesn't use either.
  • A tokenizer.json is added, made from the original's vocab.json and merges.txt.
  • The configuration and tokenizer files are re-saved by a newer version of transformers.

The files also load in transformers. On the three examples above, Kjarni's scores match transformers running the original model to four decimal places.

Attribution

The model is cardiffnlp/twitter-roberta-base-sentiment-latest, by Cardiff NLP at Cardiff University. It is a RoBERTa-base model trained on about 124 million tweets from 2018 to 2021 and fine-tuned for sentiment analysis with the TweetEval benchmark. All credit for the model, its training and its evaluation belongs to them. See the original model card, TimeLMs and TweetNLP for more.

Kjarni and this packaging are not affiliated with or endorsed by Cardiff NLP or Cardiff University.

This repository is released under CC BY 4.0, the same license as the original model.

Citation

@inproceedings{camacho-collados-etal-2022-tweetnlp,
    title = "{T}weet{NLP}: Cutting-Edge Natural Language Processing for Social Media",
    author = "Camacho-collados, Jose and Rezaee, Kiamehr and Riahi, Talayeh and Ushio, Asahi and Loureiro, Daniel and Antypas, Dimosthenis and Boisson, Joanne and Espinosa Anke, Luis and Liu, Fangyu and Mart{\'\i}nez C{\'a}mara, Eugenio and others",
    booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
    month = dec,
    year = "2022",
    address = "Abu Dhabi, UAE",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.emnlp-demos.5",
    pages = "38--49"
}

@inproceedings{loureiro-etal-2022-timelms,
    title = "{T}ime{LM}s: Diachronic Language Models from {T}witter",
    author = "Loureiro, Daniel and Barbieri, Francesco and Neves, Leonardo and Espinosa Anke, Luis and Camacho-collados, Jose",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: System Demonstrations",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-demo.25",
    doi = "10.18653/v1/2022.acl-demo.25",
    pages = "251--260"
}

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

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

GPU в ailist

Универсальный рантайм · kjarni · text-classification

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

Подбираем GPU…

Класс архитектуры
RobertaForSequenceClassification
Ревизия весов
09e1232

0 моделей