Text Classification
Transformers
Safetensors
English
distilbert
steam
video games
text-embeddings-inference
Instructions to use tjkeay/Distilbert_Steam_Sentiment_Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tjkeay/Distilbert_Steam_Sentiment_Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tjkeay/Distilbert_Steam_Sentiment_Small")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tjkeay/Distilbert_Steam_Sentiment_Small") model = AutoModelForSequenceClassification.from_pretrained("tjkeay/Distilbert_Steam_Sentiment_Small") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,20 +1,31 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
This is a fine-tuned version of the distilbert/distilbert-base-uncased model trained on the SebastianHops/steam-reviews-english dataset.
|
| 9 |
It was made for the purpose of simple sentiment analysis, particularly of video game reviews.
|
| 10 |
|
| 11 |
-
## Model Details
|
| 12 |
-
|
| 13 |
### Model Description
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
- **Developed by:** Trevor Keay
|
| 20 |
- **Model type:** Custom-tuned Transformer
|
|
@@ -22,40 +33,31 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
| 22 |
- **License:** Apache License 2.0
|
| 23 |
- **Finetuned from model [optional]:** distilbert/distilbert-base-uncased
|
| 24 |
|
| 25 |
-
### Model Sources
|
| 26 |
-
|
| 27 |
-
<!-- Provide the basic links for the model. -->
|
| 28 |
|
| 29 |
- **Base Model** https://huggingface.co/distilbert/distilbert-base-uncased
|
| 30 |
- **Training Data** https://huggingface.co/datasets/SebastianHops/steam-reviews-english
|
| 31 |
|
| 32 |
## Uses
|
| 33 |
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
### Direct Use
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
[More Information Needed]
|
| 41 |
-
|
| 42 |
-
### Downstream Use [optional]
|
| 43 |
-
|
| 44 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 45 |
-
|
| 46 |
-
[More Information Needed]
|
| 47 |
|
| 48 |
### Out-of-Scope Use
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
## Bias, Risks, and Limitations
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
|
| 60 |
### Recommendations
|
| 61 |
|
|
@@ -65,131 +67,43 @@ Users (both direct and downstream) should be made aware of the risks, biases and
|
|
| 65 |
|
| 66 |
## How to Get Started with the Model
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
## Training Details
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 77 |
-
|
| 78 |
-
[More Information Needed]
|
| 79 |
-
|
| 80 |
-
### Training Procedure
|
| 81 |
-
|
| 82 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 83 |
|
| 84 |
-
###
|
| 85 |
-
|
| 86 |
-
[More Information Needed]
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
#### Training Hyperparameters
|
| 90 |
-
|
| 91 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 92 |
-
|
| 93 |
-
#### Speeds, Sizes, Times [optional]
|
| 94 |
-
|
| 95 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 96 |
|
| 97 |
-
|
|
|
|
|
|
|
| 98 |
|
| 99 |
## Evaluation
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
### Testing Data, Factors & Metrics
|
| 104 |
|
| 105 |
#### Testing Data
|
| 106 |
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
[More Information Needed]
|
| 110 |
-
|
| 111 |
-
#### Factors
|
| 112 |
-
|
| 113 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 114 |
-
|
| 115 |
-
[More Information Needed]
|
| 116 |
-
|
| 117 |
-
#### Metrics
|
| 118 |
-
|
| 119 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 120 |
-
|
| 121 |
-
[More Information Needed]
|
| 122 |
-
|
| 123 |
-
### Results
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
#### Summary
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
## Model Examination [optional]
|
| 132 |
-
|
| 133 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 134 |
-
|
| 135 |
-
[More Information Needed]
|
| 136 |
-
|
| 137 |
-
## Environmental Impact
|
| 138 |
-
|
| 139 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 140 |
-
|
| 141 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 142 |
-
|
| 143 |
-
- **Hardware Type:** [More Information Needed]
|
| 144 |
-
- **Hours used:** [More Information Needed]
|
| 145 |
-
- **Cloud Provider:** [More Information Needed]
|
| 146 |
-
- **Compute Region:** [More Information Needed]
|
| 147 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 148 |
-
|
| 149 |
-
## Technical Specifications [optional]
|
| 150 |
-
|
| 151 |
-
### Model Architecture and Objective
|
| 152 |
-
|
| 153 |
-
[More Information Needed]
|
| 154 |
-
|
| 155 |
-
### Compute Infrastructure
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
#### Hardware
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Software
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
## Citation [optional]
|
| 168 |
-
|
| 169 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 170 |
-
|
| 171 |
-
**BibTeX:**
|
| 172 |
-
|
| 173 |
-
[More Information Needed]
|
| 174 |
-
|
| 175 |
-
**APA:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
## Glossary [optional]
|
| 180 |
-
|
| 181 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 182 |
-
|
| 183 |
-
[More Information Needed]
|
| 184 |
-
|
| 185 |
-
## More Information [optional]
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## Model Card Authors [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
|
| 193 |
-
## Model Card
|
| 194 |
|
| 195 |
-
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- steam
|
| 5 |
+
- video games
|
| 6 |
+
- distilbert
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
datasets:
|
| 9 |
+
- SebastianHops/steam-reviews-english
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
base_model:
|
| 13 |
+
- distilbert/distilbert-base-uncased
|
| 14 |
+
pipeline_tag: text-classification
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Distilbert Steam Sentiment (Small)
|
| 18 |
|
| 19 |
This is a fine-tuned version of the distilbert/distilbert-base-uncased model trained on the SebastianHops/steam-reviews-english dataset.
|
| 20 |
It was made for the purpose of simple sentiment analysis, particularly of video game reviews.
|
| 21 |
|
|
|
|
|
|
|
| 22 |
### Model Description
|
| 23 |
|
| 24 |
+
This model uses Distilbert as a base and then uses a subset of the SebastianHops/steam-reviews-english dataset for training. I call this
|
| 25 |
+
model the "small" version because it utilizes only a fraction (100000 lines) of the training dataset for training/running speed purposes.
|
| 26 |
+
Given the dataset and base model, Distilbert Steam Sentiment (Small) is great for sentiment analysis applications, especially within the
|
| 27 |
+
video games & new media industries. The training data includes lots of gen alpha/z internet culture-related slang which makes it unique
|
| 28 |
+
compared to other sentiment analysis models.
|
| 29 |
|
| 30 |
- **Developed by:** Trevor Keay
|
| 31 |
- **Model type:** Custom-tuned Transformer
|
|
|
|
| 33 |
- **License:** Apache License 2.0
|
| 34 |
- **Finetuned from model [optional]:** distilbert/distilbert-base-uncased
|
| 35 |
|
| 36 |
+
### Model Sources
|
|
|
|
|
|
|
| 37 |
|
| 38 |
- **Base Model** https://huggingface.co/distilbert/distilbert-base-uncased
|
| 39 |
- **Training Data** https://huggingface.co/datasets/SebastianHops/steam-reviews-english
|
| 40 |
|
| 41 |
## Uses
|
| 42 |
|
| 43 |
+
While Distilbert is useful for a variety of sentence prediction and analysis appliications, sentiment analysis is the primary purpose for
|
| 44 |
+
this downstream version.
|
| 45 |
|
| 46 |
### Direct Use
|
| 47 |
|
| 48 |
+
Primarily sentiment analysis applications involving new media / videogames industry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
### Out-of-Scope Use
|
| 51 |
|
| 52 |
+
This model may not work as well when used to analyze traditional literature or more formal text as the training data is comprised of
|
| 53 |
+
extremely informal text that is littered with modern slang. I do not endorse or condone the use of this model for any malicious or
|
| 54 |
+
illegal purposes, and I do not believe it would work well for those applications anyways!
|
| 55 |
|
| 56 |
## Bias, Risks, and Limitations
|
| 57 |
|
| 58 |
+
This model reflects the biases present witin both the base model and training data. It is biased towards more extreme reactions as due to response bias, users
|
| 59 |
+
that voluntarily review games are more likely to have extreme opinions compared to the average user of a game. Additionally, due to cultural trends within the
|
| 60 |
+
gaming community, racial and/or gender biases are likely present in the output.
|
| 61 |
|
| 62 |
### Recommendations
|
| 63 |
|
|
|
|
| 67 |
|
| 68 |
## How to Get Started with the Model
|
| 69 |
|
| 70 |
+
Here is a really simple application of the model to get you going:
|
| 71 |
+
```
|
| 72 |
+
from transformers import pipeline
|
| 73 |
+
|
| 74 |
+
MODEL_NAME = "tjkeay/Distilbert_Steam_Sentiment_Small"
|
| 75 |
+
|
| 76 |
+
sentiment_classifier = pipeline(
|
| 77 |
+
task = "text-classification",
|
| 78 |
+
model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME),
|
| 79 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME),
|
| 80 |
+
device = 0 if torch.cuda.is_available() else -1
|
| 81 |
+
)
|
| 82 |
+
example_text = "10/10 could not stop dying"
|
| 83 |
+
result = sentiment_classifier(example_text)[0]
|
| 84 |
+
output = result["label"]
|
| 85 |
+
print("output (0 should be negative):", output)
|
| 86 |
+
```
|
| 87 |
## Training Details
|
| 88 |
|
| 89 |
+
The model was trained with custom arguments focused around being lightweight and efficient.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
+
### Training Data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
+
The training data contains multitudes of reviews scraped directly from steam. Only the 'game', 'review', 'voted_up', 'author_playtime_forever', and
|
| 94 |
+
'author_playtime_at_review' columns were included for training. Additionally, the model was only trained on a random sample of 100,000 entries from the dataset
|
| 95 |
+
to make the model faster to train and to use.
|
| 96 |
|
| 97 |
## Evaluation
|
| 98 |
|
| 99 |
+
Evaluation Results: {'eval_train_loss': 0.14118799567222595, 'eval_test_loss': 0.1386687308549881}
|
| 100 |
|
| 101 |
### Testing Data, Factors & Metrics
|
| 102 |
|
| 103 |
#### Testing Data
|
| 104 |
|
| 105 |
+
A train-test split of the same steam reviews dataset was used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
+
## Model Card Authors
|
| 108 |
|
| 109 |
+
Trevor Keay
|