rasyosef's picture
Update README.md
ee0c41f
metadata
license: mit
base_model: roberta-base
tags:
  - generated_from_keras_callback
model-index:
  - name: roberta-base-finetuned-sst2
    results: []
datasets:
  - sst2
  - glue
metrics:
  - accuracy
pipeline_tag: text-classification
language:
  - en
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
library_name: transformers

roberta-base-finetuned-sst2

This model is a fine-tuned version of roberta-base on the glue 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:

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