该模型是在 IndoNLU's SmSA 数据集上对 indobenchmark/indobert-base-p1 模型进行微调得到的。在评估数据集上取得了以下结果:
在测试数据集上的结果如下:
该模型可以用于确定文本的情感,有三种可能的输出结果[积极、消极或中性]
from transformers import AutoTokenizer, AutoModelForSequenceClassification Pre-trained = "hanifnoerr/Fine-tuned-Indonesian-Sentiment-Classifier" tokenizer = AutoTokenizer.from_pretrained(Pre-trained) model = AutoModelForSequenceClassification.from_pretrained(Pre-trained)
pretrained_name = "hanifnoerr/Fine-tuned-Indonesian-Sentiment-Classifier" sentimen = pipeline(tokenizer=pretrained_name, model=pretrained_name) kalimat = "buku ini jelek sekali" sentimen(kalimat)
输出:[{'label': 'negative', 'score': 0.9996247291564941}]
Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
---|---|---|---|---|---|
0.08 | 1.0 | 688 | 0.3532 | 0.9310 | 0.9053 |
0.0523 | 2.0 | 1376 | 0.3233 | 0.9317 | 0.9034 |
0.045 | 3.0 | 2064 | 0.3949 | 0.9286 | 0.8995 |
0.0252 | 4.0 | 2752 | 0.4662 | 0.9310 | 0.9049 |
0.0149 | 5.0 | 3440 | 0.6251 | 0.9246 | 0.8899 |
0.0091 | 6.0 | 4128 | 0.6148 | 0.9254 | 0.8928 |
0.0111 | 7.0 | 4816 | 0.6259 | 0.9222 | 0.8902 |
0.0106 | 8.0 | 5504 | 0.6123 | 0.9238 | 0.8882 |
0.0092 | 9.0 | 6192 | 0.6353 | 0.9230 | 0.8928 |
0.0085 | 10.0 | 6880 | 0.6733 | 0.9254 | 0.8989 |
0.0062 | 11.0 | 7568 | 0.6666 | 0.9302 | 0.9027 |
0.0036 | 12.0 | 8256 | 0.7578 | 0.9230 | 0.8962 |
0.0055 | 13.0 | 8944 | 0.7378 | 0.9270 | 0.8947 |
0.0023 | 14.0 | 9632 | 0.7758 | 0.9230 | 0.8978 |
0.0009 | 15.0 | 10320 | 0.7051 | 0.9278 | 0.9006 |
0.0033 | 16.0 | 11008 | 0.7442 | 0.9214 | 0.8902 |
0.0 | 17.0 | 11696 | 0.7513 | 0.9254 | 0.8974 |
0.0 | 18.0 | 12384 | 0.7554 | 0.9270 | 0.8999 |
尽管经过18个epochs的训练,该模型使用的是最佳权重(Epoch 2)