加载中…
加载中…
This model is a fine-tuned version of roberta-base on the glassdoor dataset based on 100000 employees' reviews. It achieves the following results on the evaluation set:
Training data was classified as follow:
| class | Description |
|---|---|
| 0 | Not Stressed |
| 1 | Stressed |
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.704 | 1.0 | 8000 | 0.6933 | 0.5 | 0.3333 | 0.25 | 0.5 |
| 0.6926 | 2.0 | 16000 | 0.6980 | 0.5 | 0.3333 | 0.25 | 0.5 |
| 0.0099 | 3.0 | 24000 | 0.1800 | 0.9647 | 0.9647 | 0.9647 | 0.9647 |
| 0.2727 | 4.0 | 32000 | 0.2243 | 0.9526 | 0.9526 | 0.9527 | 0.9526 |
| 0.0618 | 5.0 | 40000 | 0.2128 | 0.9536 | 0.9536 | 0.9546 | 0.9536 |
| - | precision | recall | f1 | support |
|---|---|---|---|---|
| Not Stressed | 0.96 | 0.97 | 0.97 | 10000 |
| Stressed | 0.97 | 0.96 | 0.97 | 10000 |
| accuracy | 0.97 | 20000 | ||
| macro avg | 0.97 | 0.97 | 0.97 | 20000 |
| weighted avg | 0.97 | 0.97 | 0.97 | 20000 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("dstefa/roberta-base_topic_classification_nyt_news")
model = AutoModelForSequenceClassification.from_pretrained("dstefa/roberta-base_topic_classification_nyt_news")
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
text = "They also caused so much stress because some leaders valued optics over output."
pipe(text)
[{'label': 'Stressed', 'score': 0.9959163069725037}]
### Framework versions
- Transformers 4.32.1
- Pytorch 2.1.0+cu121
- Datasets 2.12.0
- Tokenizers 0.13.2
FacebookAI/roberta-base