Instructions to use Kanyasiri/wangchanberta_sentiment_2class with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kanyasiri/wangchanberta_sentiment_2class with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kanyasiri/wangchanberta_sentiment_2class")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Kanyasiri/wangchanberta_sentiment_2class") model = AutoModelForSequenceClassification.from_pretrained("Kanyasiri/wangchanberta_sentiment_2class") - Notebooks
- Google Colab
- Kaggle
wangchanberta_sentiment_2class
This model is a fine-tuned version of airesearch/wangchanberta-base-att-spm-uncased on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.5878
- Accuracy: 0.8761
- F1 Macro: 0.8594
- F1 Pos: 0.8109
- F1 Neg: 0.9079
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 8
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 200
- num_epochs: 5
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | F1 Pos | F1 Neg |
|---|---|---|---|---|---|---|---|
| 0.3468 | 1.0 | 2388 | 0.3427 | 0.8549 | 0.8385 | 0.787 | 0.89 |
| 0.3789 | 2.0 | 4776 | 0.3774 | 0.87 | 0.855 | 0.8083 | 0.9016 |
| 0.3195 | 3.0 | 7164 | 0.4318 | 0.8761 | 0.8585 | 0.8084 | 0.9085 |
| 0.256 | 4.0 | 9552 | 0.5423 | 0.8752 | 0.8603 | 0.8148 | 0.9059 |
| 0.1726 | 5.0 | 11940 | 0.5878 | 0.8761 | 0.8594 | 0.8109 | 0.9079 |
Framework versions
- Transformers 4.46.3
- Pytorch 2.10.0+cu128
- Datasets 4.0.0
- Tokenizers 0.20.3
- Downloads last month
- 3