/ Модель

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

Контекст
512 токенов
Параметры
434 млн
Лицензия
MIT
Архитектура
bert · dense
Базовая модель
indobert-large-p2
Опубликована
28 мар 2026

indobert-binary-sentiment-classifier

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

Бинарный классификатор на базе IndoBERT Large P2 определяет положительную или отрицательную тональность индонезийского текста с учётом контекста темы.

162скачиваний за 30 дней0лайковвеса обновлены28 мар 2026

Бенчмарки

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

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

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

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

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

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

Это бинарный классификатор тональности индонезийского текста, разработанный apriandito и дообученный на базе IndoBERT Large P2. Он определяет полярность в контексте заданной темы и возвращает один из двух классов: NEGATIF или POSITIF; нейтральный класс не предусмотрен. В README указан формат входа с контекстом темы и текстом, разделёнными специальными токенами. Модель построена на архитектуре BERT, содержит около 433,9 млн параметров по метаданным и поддерживает контекст длиной до 512 токенов.

Модель подходит для мониторинга отзывов о брендах и продуктах, анализа общественного мнения и обнаружения кризисных реакций, когда нужна только положительная или отрицательная оценка. Для проверки на отложенной выборке из 2 107 примеров автор сообщает accuracy 96,06% и macro-F1 0,949; эти показатели относятся к указанной выборке. Лицензия — MIT.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

IndoBERT Binary Sentiment Classifier

A context-conditioned binary sentiment classifier for Indonesian text, fine-tuned from IndoBERT Large P2 (335M parameters). This is the binary variant of apriandito/indobert-sentiment-classifier (3-class), designed for use cases that only need polarity detection (Negatif / Positif) without a Netral class.

Like its sibling models, this model evaluates sentiment in relation to a given topic context, making it more accurate for topic-specific analysis such as brand monitoring, public opinion polling, and crisis detection.

Model Details

PropertyValue
Base modelindobenchmark/indobert-large-p2 (335M params)
TaskContext-conditioned binary sentiment classification
LabelsNEGATIF (0), POSITIF (1)
Input format[CLS] context [SEP] text [SEP]
Max length256 tokens
Training data14,045 context-text pairs across 188 topics

Performance

Evaluated on a held-out validation set of 2,107 samples.

MetricValue
Accuracy96.06%
F1 Macro0.949
F1 Weighted0.961
Precision Macro0.947
Recall Macro0.952

Comparison with 3-class variant

ModelClassesAccuracyF1 Macro
This model (binary)2 (Negatif, Positif)96.06%0.949
indobert-sentiment-classifier3 (Negatif, Netral, Positif)88.1%0.856

The binary model achieves higher metrics because the task is simpler (no ambiguous Netral class). Choose binary when you only care about polarity; choose 3-class when you need to distinguish neutral text.

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("apriandito/indobert-binary-sentiment-classifier")
model = AutoModelForSequenceClassification.from_pretrained("apriandito/indobert-binary-sentiment-classifier")
model.eval()

LABELS = {0: "Negatif", 1: "Positif"}

context = "harga sembako"
text = "harga beras naik terus bikin rakyat susah"

encoding = tokenizer(context, text, truncation=True, max_length=256, return_tensors="pt")
with torch.no_grad():
    probs = torch.softmax(model(**encoding).logits, dim=-1)[0]
    pred = torch.argmax(probs).item()

print(f"{LABELS[pred]} ({probs[pred]:.4f})")
# Output: Negatif (0.9987)

Why Context Matters

Standard sentiment models classify text in isolation. This can lead to errors when sentiment depends on context:

ContextTextWith ContextWithout Context
harga sembakoharganya gila-gilaanNegatif???
produk luxuryharganya gila-gilaanPositif???
korupsiKPK tangkap bupati korupsi dana bansosPositifNegatif
polusi udaraJakarta peringkat 1 paling berpolusiNegatifPositif

Training Details

  • Data: Derived from the same 31,360 context-text pairs used in the 3-class model. Netral samples (17,315) were dropped, leaving 14,045 binary samples (10,357 Negatif / 3,688 Positif).
  • Epochs: 5 (best at epoch 4, early stopping patience 2)
  • Batch size: 16
  • Learning rate: 2e-5
  • Optimizer: AdamW (weight decay 0.01, warmup ratio 0.1)
  • Loss: CrossEntropyLoss with class weights (Negatif: 0.678, Positif: 1.904)
  • GPU: NVIDIA RTX 4090

When to Use Which Model

Use CaseRecommended Model
Filter irrelevant text firstindobert-relevancy-classifier
Full sentiment breakdown (pos/neu/neg)indobert-sentiment-classifier
Polarity only (pos/neg)This model

Suggested Pipeline

Raw Text → Relevancy Filter → Sentiment Analysis (3-class or binary)
  1. Use indobert-relevancy-classifier to filter relevant text
  2. Use this model (or the 3-class variant) to classify sentiment on relevant text only

Related Models

ModelTaskLabelsAccuracy
indobert-relevancy-classifierRelevancyRelevant / Not Relevant96.5%
indobert-sentiment-classifierSentiment (3-class)Negatif / Netral / Positif88.1%
indobert-binary-sentiment-classifierSentiment (binary)Negatif / Positif96.06%

All three models share the same architecture (IndoBERT Large P2, 335M params) and the same context-conditioned input format ([CLS] context [SEP] text [SEP]).

Citation

@misc{saputra2026indobert-binary-sentiment,
  title={IndoBERT Binary Sentiment Classifier: Context-Conditioned Binary Sentiment Classification for Indonesian Text},
  author={Saputra, Muhammad Apriandito Arya},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/apriandito/indobert-binary-sentiment-classifier}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
ede25a6

0 моделей