File size: 2,406 Bytes
08a7a66
 
 
 
 
 
0b6a67b
08a7a66
0a84741
 
57c35ae
0a84741
 
 
5856f12
 
885ec68
ee0c41f
3ef5740
885ec68
3ef5740
0d39e19
08a7a66
 
 
 
 
0b6a67b
08a7a66
65e8f63
08a7a66
5856f12
 
 
 
08a7a66
 
 
 
 
 
 
 
 
27bfd3d
 
 
 
 
 
 
 
 
 
 
 
 
08a7a66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a84741
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
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
---

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