transformers pytorch tensorboard distilbert text-classification generated_from_trainer dataset:glue license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
datasets:
- glue
license: apache-2.0
metrics:
- accuracy
tags:
- generated_from_trainer
model-index:
- name: distilbert_sst2_finetuned
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: glue
      type: glue
      config: sst2
      split: validation
      args: sst2
    metrics:
    - type: accuracy
      value: 0.875
      name: Accuracy
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# distilbert_sst2_finetuned

This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the glue dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2831
- Accuracy: 0.875

## 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-06
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1000
- num_epochs: 4
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.6883        | 0.24  | 500  | 0.6768          | 0.5115   |
| 0.5422        | 0.48  | 1000 | 0.4060          | 0.8200   |
| 0.3479        | 0.71  | 1500 | 0.3533          | 0.8452   |
| 0.3217        | 0.95  | 2000 | 0.3343          | 0.8567   |
| 0.2967        | 1.19  | 2500 | 0.3200          | 0.8635   |
| 0.2857        | 1.43  | 3000 | 0.3110          | 0.8624   |
| 0.2723        | 1.66  | 3500 | 0.3010          | 0.8670   |
| 0.2744        | 1.9   | 4000 | 0.2896          | 0.8727   |
| 0.2594        | 2.14  | 4500 | 0.2897          | 0.8716   |
| 0.2574        | 2.38  | 5000 | 0.2845          | 0.8761   |
| 0.2484        | 2.61  | 5500 | 0.2869          | 0.8739   |
| 0.2464        | 2.85  | 6000 | 0.2842          | 0.8761   |
| 0.2451        | 3.09  | 6500 | 0.2820          | 0.8773   |
| 0.2504        | 3.33  | 7000 | 0.2805          | 0.8784   |
| 0.236         | 3.56  | 7500 | 0.2833          | 0.875    |
| 0.2366        | 3.8   | 8000 | 0.2831          | 0.875    |


### Framework versions

- Transformers 4.27.4
- Pytorch 1.13.1+cu116
- Datasets 2.11.0
- Tokenizers 0.13.2
