fancyzhx/amazon_polarity
Viewer • Updated • 4M • 17k • 48
Fine-tuned bert-base-uncased for binary sentiment classification on the Amazon Polarity dataset (3.6M training reviews).
| Metric | Score |
|---|---|
| F1 (macro) | 97.06% |
| Accuracy | 97.06% |
| Test samples | 400,000 |
from transformers import pipeline
classifier = pipeline('sentiment-analysis', model='atharvadhumal/bert-amazon-polarity')
classifier('This product is absolutely amazing!')
# [{'label': 'LABEL_1', 'score': 0.998}]
| Hyperparameter | Value |
|---|---|
| Base model | bert-base-uncased |
| Epochs | 3 |
| Batch size | 64 |
| Learning rate | 2e-5 |
| Precision | fp16 |
| Hardware | NVIDIA V100 / H200 (Northeastern HPC) |
See the GitHub repo for full training code.