transformers pytorch bert text-classification generated_from_trainer dataset:imdb license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
datasets:
- imdb
license: apache-2.0
metrics:
- accuracy
- f1
tags:
- generated_from_trainer
model-index:
- name: finetuned-mlm_medium
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: imdb
      type: imdb
      config: plain_text
      split: train
      args: plain_text
    metrics:
    - type: accuracy
      value: 0.95416
      name: Accuracy
    - type: f1
      value: 0.976542350677529
      name: F1
---

<!-- 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. -->

# finetuned-mlm_medium

This model is a fine-tuned version of [muhtasham/bert-medium-mlm-finetuned-emotion](https://huggingface.co/muhtasham/bert-medium-mlm-finetuned-emotion) on the imdb dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2805
- Accuracy: 0.9542
- F1: 0.9765

## 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: 3e-05
- train_batch_size: 128
- eval_batch_size: 128
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: constant
- num_epochs: 200

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.2318        | 2.55  | 500  | 0.1428          | 0.9512   | 0.9750 |
| 0.0777        | 5.1   | 1000 | 0.1976          | 0.9513   | 0.9750 |
| 0.0362        | 7.65  | 1500 | 0.2704          | 0.9388   | 0.9684 |
| 0.0234        | 10.2  | 2000 | 0.2245          | 0.9578   | 0.9784 |
| 0.0181        | 12.76 | 2500 | 0.3703          | 0.9310   | 0.9643 |
| 0.0158        | 15.31 | 3000 | 0.6137          | 0.9001   | 0.9474 |
| 0.013         | 17.86 | 3500 | 0.2805          | 0.9542   | 0.9765 |


### Framework versions

- Transformers 4.25.1
- Pytorch 1.12.1+cu113
- Datasets 2.7.1
- Tokenizers 0.13.2
