加载中…
加载中…
Classifies Indonesian tweets about the Free Nutritious Meals program (Makan Bergizi Gratis (MBG)) into negatif, netral or positif.
| Model | F1-macro (95% bootstrap CI) | Accuracy |
|---|---|---|
| This model | 0.792 (0.727–0.853) | 0.806 |
| TF-IDF + Logistic Regression baseline | 0.759 (0.688–0.827) | 0.770 |
| Qwen3.5-0.8B zero-shot (label scoring) | 0.548 (0.489–0.607) | 0.661 |
| Qwen3.5-0.8B few-shot | 0.543 (0.484–0.600) | 0.667 |
McNemar test: this model vs Qwen3.5-0.8B zero-shot p = 0.0007; vs the TF-IDF baseline p = 0.327 (not significant on this small test set).
| File | Use |
|---|---|
model.safetensors |
PyTorch weights for transformers |
onnx/model.onnx |
fp32 ONNX (47 MB), identical predictions to the PyTorch model on the test set |
onnx/model_quantized.onnx |
int8 ONNX (40 MB), 97.6% agreement, F1-macro 0.788 |
Use BertTokenizer (this repo ships a WordPiece tokenizer.json). The original IndoBERT-lite card also loads the tokenizer with BertTokenizer; ALBERT's default SentencePiece tokenizer does not match this vocabulary.
Python:
from transformers import BertTokenizer, AutoModelForSequenceClassification, pipeline
repo = "Nzlul/indobert-mbg-sentiment"
clf = pipeline("text-classification", model=AutoModelForSequenceClassification.from_pretrained(repo),
tokenizer=BertTokenizer.from_pretrained(repo), top_k=None)
clf("lagi lagi siswa keracunan menu mbg evaluasi dong")
JavaScript (Transformers.js, runs in the browser):
import { pipeline } from '@huggingface/transformers';
const clf = await pipeline('text-classification', 'Nzlul/indobert-mbg-sentiment', { dtype: 'fp32' });
await clf('lagi lagi siswa keracunan menu mbg evaluasi dong', { top_k: null });
Training text was lowercased with links, mentions and symbols removed; apply the same normalization for best results.
Small dataset (1,100 tweets after cleaning) from a single platform and period (X, January–March 2025); labels are subjective, and the neutral class is the hardest (recall 0.68). Independent portfolio project, not affiliated with the Government of Indonesia or the National Nutrition Agency (Badan Gizi Nasional).