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

This model is a fine-tuned version of [mrm8488/electricidad-small-discriminator](https://huggingface.co/mrm8488/electricidad-small-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:
- Accuracy: 0.879
- F1: 0.88

## Usage

```py
from transformers import pipeline

model_ckpt = "mrm8488/electricidad-small-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: 3.676560994488171e-05
- train_batch_size: 64
- eval_batch_size: 32
- seed: 30
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1     |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.3272        | 1.0   | 2105 | 0.3418          | 0.8567   | 0.8489 |
| 0.2394        | 2.0   | 4210 | 0.3391          | 0.8796   | 0.88   |
| 0.192         | 3.0   | 6315 | 0.3644          | 0.8761   | 0.8770 |


### Framework versions

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

{"tags": ["generated_from_trainer"], "datasets": ["sst2-es-mt"], "metrics": ["accuracy", "f1"], "widget": [{"text": "La verdad es que no tengo una opini\u00f3n s\u00f3lida al respecto."}, {"text": "Me parece muy interesante poder colaborar en este proyecto."}, {"text": "El gobierno actual no lo est\u00e1 haciendo mal, pero debe mejorar."}, {"text": "Esperaba mucho m\u00e1s por el precio que he pagado, la verdad..."}, {"text": "El proyecto BERTIN tiene cosas interesantes, pero tienen que trabajar m\u00e1s duro si quieren llegar lejos."}], "model-index": [{"name": "electricidad-small-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.8795871559633027, "name": "Accuracy"}, {"type": "f1", "value": 0.88, "name": "F1"}]}]}]}
transformers pytorch tensorboard electra text-classification generated_from_trainer dataset:sst2-es-mt model-index autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #electra #text-classification #generated_from_trainer #dataset-sst2-es-mt #model-index #autotrain_compatible #endpoints_compatible #region-us 

Electricidad (small) fine-tuned on sst2-es-mt for Spanish Sentiment Analysis
============================================================================


This model is a fine-tuned version of mrm8488/electricidad-small-discriminator on the sst2-es-mt dataset. A dataset created using Neural Machine Translation on original SST2 (English) dataset.


It achieves the following results on the evaluation set:


* Accuracy: 0.879
* F1: 0.88


Usage
-----


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 3.676560994488171e-05
* train\_batch\_size: 64
* eval\_batch\_size: 32
* seed: 30
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3


### Training results



### Framework versions


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



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 3.676560994488171e-05
* train\_batch\_size: 64
* eval\_batch\_size: 32
* seed: 30
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3 ### Training results ### Framework versions


* Transformers 4.21.2
* Pytorch 1.12.1+cu113
* Datasets 2.4.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #electra #text-classification #generated_from_trainer #dataset-sst2-es-mt #model-index #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 3.676560994488171e-05
* train\_batch\_size: 64
* eval\_batch\_size: 32
* seed: 30
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3 ### Training results ### Framework versions


* Transformers 4.21.2
* Pytorch 1.12.1+cu113
* Datasets 2.4.0
* Tokenizers 0.12.1
passage: TAGS
#transformers #pytorch #tensorboard #electra #text-classification #generated_from_trainer #dataset-sst2-es-mt #model-index #autotrain_compatible #endpoints_compatible #region-us 
### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 3.676560994488171e-05
* train\_batch\_size: 64
* eval\_batch\_size: 32
* seed: 30
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* num\_epochs: 3### Training results### Framework versions


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