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

# roberta-base-finetuned-sst2

This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the glue [sst2](https://huggingface.co/datasets/sst2) dataset for sentiment classification.
It achieves the following results on the evaluation set:
- Train Loss: 0.0760
- Train Accuracy: 0.9736
- Validation Loss: 0.2081
- Validation Accuracy: 0.9346

## Model description

More information needed

## Intended uses & limitations

More information needed

## How to use

You can use this model directly with a pipeline for text classification:

```python
>>> from transformers import pipeline
>>> roberta_sentiment = pipeline("text-classification", model="rasyosef/roberta-base-finetuned-sst2")
>>> roberta_sentiment(["This movie was awesome.", "The movie was boring."])

[{'label': 'positive', 'score': 0.9995689988136292},
 {'label': 'negative', 'score': 0.9987605810165405}]
```

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'weight_decay': None, 'clipnorm': None, 'global_clipnorm': None, 'clipvalue': None, 'use_ema': False, 'ema_momentum': 0.99, 'ema_overwrite_frequency': None, 'jit_compile': True, 'is_legacy_optimizer': False, 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 3159, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: float32

### Training results



### Framework versions

- Transformers 4.35.2
- TensorFlow 2.15.0
- Datasets 2.16.0
- Tokenizers 0.15.0
{"language": ["en"], "license": "mit", "library_name": "transformers", "tags": ["generated_from_keras_callback"], "datasets": ["sst2", "glue"], "metrics": ["accuracy"], "base_model": "roberta-base", "pipeline_tag": "text-classification", "widget": [{"text": "I love video games so much", "example_title": "Positive Example"}, {"text": "I don't really like this type of food", "example_title": "Negative Example"}], "model-index": [{"name": "roberta-base-finetuned-sst2", "results": []}]}
transformers tf roberta text-classification generated_from_keras_callback en dataset:sst2 dataset:glue base_model:roberta-base license:mit autotrain_compatible endpoints_compatible has_space region:us