transformers pytorch tensorboard electra text-classification generated_from_trainer sste dataset:sst2-es-mt model-index autotrain_compatible endpoints_compatible region:us
---
datasets:
- sst2-es-mt
metrics:
- accuracy
- f1
tags:
- generated_from_trainer
- sste
languages: -es
widget:
- text: La verdad es que no tengo una opinión sólida al respecto.
- text: Me parece muy interesante poder colaborar en este proyecto.
- text: El gobierno actual no lo está haciendo mal, pero debe mejorar.
- text: Esperaba mucho más por el precio que he pagado, la verdad...
- text: El proyecto BERTIN tiene cosas interesantes, pero tienen que trabajar más
    duro si quieren llegar lejos.
model-index:
- name: electricidad-base-finetuned-sst2-es
  results:
  - task:
      type: text-classification
      name: Text Classification
    dataset:
      name: sst2-es-mt
      type: sst2-es-mt
      config: sst2
      split: train
      args: sst2
    metrics:
    - type: accuracy
      value: 0.9013761467889908
      name: Accuracy
    - type: f1
      value: 0.9033707865168539
      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. -->

# Electricidad (base) fine-tuned on sst2-es-mt for Spanish Sentiment Analysis 👍👎

This model is a fine-tuned version of [mrm8488/electricidad-base-discriminator](https://huggingface.co/mrm8488/electricidad-base-discriminator) on the **sst2-es-mt** [dataset](https://huggingface.co/datasets/sst2-es-mt). A dataset created using Neural Machine Translation on original [SST2](https://huggingface.co/datasets/sst2) (English) dataset.

It achieves the following results on the evaluation set:
- Loss: 0.4377
- Accuracy: 0.9014
- F1: 0.9034

## Usage

```py
from transformers import pipeline

model_ckpt = "mrm8488/electricidad-base-finetuned-sst2-es"

classifier = pipeline("sentiment-analysis", model=model_ckpt)

classifier("Here your text in Spanish!")
``` 


### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 32
- eval_batch_size: 64
- 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     |
|:-------------:|:-----:|:-----:|:---------------:|:--------:|:------:|
| 0.2521        | 1.0   | 2105  | 0.2837          | 0.9002   | 0.9019 |
| 0.1694        | 2.0   | 4210  | 0.3175          | 0.8933   | 0.8920 |
| 0.1245        | 3.0   | 6315  | 0.3606          | 0.8945   | 0.8987 |
| 0.0934        | 4.0   | 8420  | 0.4419          | 0.9002   | 0.9037 |
| 0.069         | 5.0   | 10525 | 0.4377          | 0.9014   | 0.9034 |


### Framework versions

- Transformers 4.21.2
- Pytorch 1.12.1+cu113
- Datasets 2.4.0
- Tokenizers 0.12.1
