transformers pytorch onnx safetensors electra text-classification generated_from_trainer en dataset:glue license:apache-2.0 model-index autotrain_compatible endpoints_compatible region:us
---
datasets:
- glue
language:
- en
license: apache-2.0
metrics:
- matthews_correlation
tags:
- generated_from_trainer
widget:
- text: The cat sat on the mat.
  example_title: Correct grammatical sentence
- text: Me and my friend going to the store.
  example_title: Incorrect subject-verb agreement
- text: I ain't got no money.
  example_title: Incorrect verb conjugation and double negative
- text: She don't like pizza no more.
  example_title: Incorrect verb conjugation and double negative
- text: They is arriving tomorrow.
  example_title: Incorrect verb conjugation
model-index:
- name: electra-base-discriminator-CoLA
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: GLUE COLA
      type: glue
      config: cola
      split: validation
      args: cola
    metrics:
    - type: matthews_correlation
      value: 0.6579677841732349
      name: Matthews Correlation
---

# electra-base-discriminator-CoLA

This model is a fine-tuned version of [google/electra-base-discriminator](https://huggingface.co/google/electra-base-discriminator) on the GLUE COLA dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3542
- Matthews Correlation: 0.6580

## Model description

Trying to find a decent optimum between accuracy/quality and inference speed.


```json
{
    "epoch": 8.0,
    "eval_loss": 0.3541961908340454,
    "eval_matthews_correlation": 0.6579677841732349,
    "eval_runtime": 1.9552,
    "eval_samples": 1043,
    "eval_samples_per_second": 533.451,
    "eval_steps_per_second": 33.756
}
```
## 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: 8e-05
- train_batch_size: 128
- eval_batch_size: 16
- seed: 22165
- distributed_type: multi-GPU
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.03
- num_epochs: 8.0
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Matthews Correlation |
|:-------------:|:-----:|:----:|:---------------:|:--------------------:|
| 0.4004        | 1.0   | 67   | 0.3569          | 0.6340               |
| 0.2843        | 2.0   | 134  | 0.3542          | 0.6580               |
| 0.1228        | 3.0   | 201  | 0.4201          | 0.6412               |
| 0.0989        | 4.0   | 268  | 0.4780          | 0.6757               |
| 0.0681        | 5.0   | 335  | 0.4900          | 0.6925               |
| 0.0506        | 6.0   | 402  | 0.5837          | 0.6785               |
| 0.0093        | 7.0   | 469  | 0.6298          | 0.6652               |
| 0.0244        | 8.0   | 536  | 0.6292          | 0.6750               |


### Framework versions

- Transformers 4.27.0.dev0
- Pytorch 1.13.1+cu117
- Datasets 2.8.0
- Tokenizers 0.13.1
