Update README.md
Browse files
README.md
CHANGED
|
@@ -12,28 +12,41 @@ widget:
|
|
| 12 |
- text: "This product is great!"
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# Fine-tuned RoBERTa for Sentiment Analysis on Amazon Reviews
|
| 16 |
|
| 17 |
This is a fine-tuned version of [cardiffnlp/twitter-roberta-base-sentiment-latest](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest) on the [Amazon Reviews dataset](https://www.kaggle.com/datasets/bittlingmayer/amazonreviews) for sentiment analysis.
|
| 18 |
|
| 19 |
-
## Model Details
|
| 20 |
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
|
| 26 |
-
## Training
|
| 27 |
|
| 28 |
The model was trained using the following parameters:
|
| 29 |
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
-
-
|
| 34 |
-
-
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
You can use this model directly with the Hugging Face `transformers` library:
|
| 39 |
|
|
@@ -47,7 +60,12 @@ tokenizer = RobertaTokenizer.from_pretrained(model_name)
|
|
| 47 |
# Example usage
|
| 48 |
inputs = tokenizer("This product is great!", return_tensors="pt")
|
| 49 |
outputs = model(**inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
```
|
| 51 |
-
## License
|
| 52 |
|
| 53 |
-
|
|
|
|
|
|
|
|
|
| 12 |
- text: "This product is great!"
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# π Fine-tuned RoBERTa for Sentiment Analysis on Amazon Reviews π
|
| 16 |
|
| 17 |
This is a fine-tuned version of [cardiffnlp/twitter-roberta-base-sentiment-latest](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest) on the [Amazon Reviews dataset](https://www.kaggle.com/datasets/bittlingmayer/amazonreviews) for sentiment analysis.
|
| 18 |
|
| 19 |
+
## π Model Details
|
| 20 |
|
| 21 |
+
- **π Model Name:** `AnkitAI/reviews-roberta-base-sentiment-analysis`
|
| 22 |
+
- **π Base Model:** `cardiffnlp/twitter-roberta-base-sentiment-latest`
|
| 23 |
+
- **π Dataset:** [Amazon Reviews](https://www.kaggle.com/datasets/bittlingmayer/amazonreviews)
|
| 24 |
+
- **βοΈ Fine-tuning:** This model was fine-tuned for sentiment analysis with a classification head for binary sentiment classification (positive and negative).
|
| 25 |
|
| 26 |
+
## ποΈ Training
|
| 27 |
|
| 28 |
The model was trained using the following parameters:
|
| 29 |
|
| 30 |
+
- **π§ Learning Rate:** 2e-5
|
| 31 |
+
- **π¦ Batch Size:** 16
|
| 32 |
+
- **β³ Epochs:** 3
|
| 33 |
+
- **βοΈ Weight Decay:** 0.01
|
| 34 |
+
- **π
Evaluation Strategy:** Epoch
|
| 35 |
|
| 36 |
+
|
| 37 |
+
### ποΈ Training Details
|
| 38 |
+
|
| 39 |
+
- **π Eval Loss:** 0.1049
|
| 40 |
+
- **β±οΈ Eval Runtime:** 3177.538 seconds
|
| 41 |
+
- **π Eval Samples/Second:** 226.591
|
| 42 |
+
- **π Eval Steps/Second:** 7.081
|
| 43 |
+
- **π Epoch:** 3.0
|
| 44 |
+
- **π Train Runtime:** 110070.6349 seconds
|
| 45 |
+
- **π Train Samples/Second:** 78.495
|
| 46 |
+
- **π Train Steps/Second:** 2.453
|
| 47 |
+
- **π Train Loss:** 0.0858
|
| 48 |
+
|
| 49 |
+
## π Usage
|
| 50 |
|
| 51 |
You can use this model directly with the Hugging Face `transformers` library:
|
| 52 |
|
|
|
|
| 60 |
# Example usage
|
| 61 |
inputs = tokenizer("This product is great!", return_tensors="pt")
|
| 62 |
outputs = model(**inputs)
|
| 63 |
+
|
| 64 |
+
# Get sentiment
|
| 65 |
+
logits = outputs.logits
|
| 66 |
+
print(logits)
|
| 67 |
```
|
|
|
|
| 68 |
|
| 69 |
+
## π License
|
| 70 |
+
|
| 71 |
+
This model is licensed under the [MIT License](LICENSE).
|