SheldonSides's picture
Update README.md
606aae2
|
raw
history blame
3.42 kB
metadata
license: apache-2.0
base_model: distilbert-base-uncased
tags:
  - generated_from_trainer
datasets:
  - emotion
metrics:
  - accuracy
  - f1
model-index:
  - name: distilbert-base-uncased-finetuned-emotion
    results:
      - task:
          name: Text Classification
          type: text-classification
        dataset:
          name: dair-ai/emotion
          type: emotion
          config: split
          split: validation
          args: split
        metrics:
          - name: Accuracy
            type: accuracy
            value: 0.934
          - name: F1
            type: f1
            value: 0.9340654575276651

distilbert-base-uncased-finetuned-emotion

This model is a fine-tuned version of distilbert-base-uncased on the dair-ai/emotion dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1526
  • Accuracy: 0.934
  • F1: 0.9341

Model description

Base Model Info.

DistilBERT is a transformers model, smaller and faster than BERT, which was pretrained on the same corpus in a self-supervised fashion, using the BERT base model as a teacher. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts using the BERT base model. More precisely, it was pretrained with three objectives:

  • Distillation loss: the model was trained to return the same probabilities as the BERT base model.
  • Masked language modeling (MLM): this is part of the original training loss of the BERT base model. When taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence.
  • Cosine embedding loss: the model was also trained to generate hidden states as close as possible as the BERT base model.

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: 2e-05
  • train_batch_size: 124
  • eval_batch_size: 124
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 5

Training results

Training Loss Epoch Step Validation Loss Accuracy F1
1.0271 1.0 130 0.4635 0.863 0.8509
0.3115 2.0 260 0.2129 0.926 0.9262
0.1756 3.0 390 0.1709 0.9325 0.9327
0.1345 4.0 520 0.1604 0.932 0.9319
0.1183 5.0 650 0.1526 0.934 0.9341

Framework versions

  • Transformers 4.34.1
  • Pytorch 2.0.1
  • Datasets 2.14.5
  • Tokenizers 0.14.1