bert base indonesian 1.5 G sentiment analysis smsa
ayameRushiaIntroduction
The BERT-BASE-INDONESIAN-1.5G-FINETUNED-SENTIMENT-ANALYSIS-SMSA model is a fine-tuned version of the cahya/bert-base-indonesian-1.5G
model, adapted for sentiment analysis tasks on the Indonesian language using the Indonlu dataset. The model achieves an accuracy of 93.73% on the evaluation set.
Architecture
This model is based on the BERT architecture, specifically adapted for the Indonesian language. It utilizes the Transformers library and is implemented in PyTorch.
Training
The model was trained using the Indonlu dataset with the following hyperparameters:
- Learning Rate: 2e-05
- Train Batch Size: 16
- Eval Batch Size: 16
- Seed: 42
- Optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- LR Scheduler Type: Linear
- Number of Epochs: 10
Training Results
- Initial Loss: 0.2864
- Final Loss: 0.5992
- Accuracy: 0.9373
Framework Versions
- Transformers: 4.14.1
- PyTorch: 1.10.0+cu111
- Datasets: 1.16.1
- Tokenizers: 0.10.3
Guide: Running Locally
To run the model locally, follow these steps:
-
Clone the Repository:
git clone https://huggingface.co/ayameRushia/bert-base-indonesian-1.5G-sentiment-analysis-smsa
-
Install Required Libraries: Ensure you have the necessary Python packages installed, such as Transformers, PyTorch, and Datasets:
pip install transformers torch datasets
-
Load and Use the Model: Use the Transformers library to load the model and tokenizer:
from transformers import BertTokenizer, BertForSequenceClassification model_name = "ayameRushia/bert-base-indonesian-1.5G-sentiment-analysis-smsa" tokenizer = BertTokenizer.from_pretrained(model_name) model = BertForSequenceClassification.from_pretrained(model_name)
-
Inference: Prepare some sample text and run inference:
inputs = tokenizer("Saya mengapresiasi usaha anda", return_tensors="pt") outputs = model(**inputs)
Cloud GPUs
For improved performance, consider using cloud-based GPU services such as AWS, Google Cloud, or Paperspace.
License
This model is licensed under the MIT License, allowing for open, free usage and modification.