AdamCodd's picture
Update README.md
30d5e95
|
raw
history blame
No virus
2.1 kB
metadata
license: apache-2.0
datasets:
  - amazon_polarity
base_model: distilbert-base-uncased
model-index:
  - name: distilbert-base-uncased-finetuned-emotion-balanced
    results:
      - task:
          type: text-classification
          name: Text Classification
        dataset:
          name: amazon_polarity
          type: sentiment
          args: default
        metrics:
          - type: accuracy
            value: 0.958
            name: Accuracy
          - type: loss
            value: 0.119
            name: Loss
          - type: f1
            value: 0.957
            name: F1
metrics:
  - accuracy
  - f1

distilbert-sentiment

This model is a fine-tuned version of distilbert-base-uncased on a subset of the amazon-polarity dataset. It achieves the following results on the evaluation set:

  • Loss: 0.119
  • Accuracy: 0.958
  • F1_score: 0.957

Model description

This sentiment classifier has been trained on 180_000 samples for the training set, 20_000 samples for the validation set and 20_000 samples for the test set.

Intended uses & limitations

from transformers import pipeline

# Create the pipeline
sentiment_classifier = pipeline('text-classification', model='AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon')

# Now you can use the pipeline to classify emotions
result = sentiment_classifier("This product doesn't fit me at all.")
print(result)
#[{'label': 'negative', 'score': 0.9994848966598511}]

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 3e-05
  • train_batch_size: 32
  • eval_batch_size: 32
  • seed: 1270
  • optimizer: AdamW with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 150
  • num_epochs: 2
  • weight_decay: 0.01

Training results

key value
eval_loss 0.119
eval_accuracy 0.958
eval_f1_score 0.957

Framework versions

  • Transformers 4.34.0
  • Pytorch lightning 2.0.9
  • Tokenizers 0.13.3