File size: 1,253 Bytes
e0f7878 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 d4b50fd 8462978 8cea895 d4b50fd 8cea895 d4b50fd 8cea895 e0f7878 | 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 | ---
license: apache-2.0
language:
- en
---
# DistilBERT for Sarcasm Detection ๐ญ
This is a fine-tuned [DistilBERT](https://huggingface.co/distilbert-base-uncased) model on the **News Headlines Dataset for Sarcasm Detection**.
## ๐ Dataset
- **Source:** [News Headlines Dataset for Sarcasm Detection](https://www.kaggle.com/rmisra/news-headlines-dataset-for-sarcasm-detection)
- **Task:** Binary classification (`0 = Not Sarcastic`, `1 = Sarcastic`)
- **Size:** ~28,000 headlines
## ๐ง Model Training
- Framework: Hugging Face Transformers
- Tokenizer: `distilbert-base-uncased`
- Training epochs: 3
- Optimizer: AdamW
- Batch size: 16
## ๐ Performance
| Model | Accuracy |
|--------------|----------|
| **DistilBERT (ours)** | **93.1%** |
| GRU | 85.3% |
| LSTM | 84.6% |
| Logistic Regression | 83.4% |
| SVM | 82.9% |
| Naive Bayes | 82.7% |
## ๐ Usage
```python
from transformers import pipeline
# Load the model from HF Hub
classifier = pipeline("text-classification", model="YamenRM/sarcasm_model")
# Example
text = "Oh great, another Monday morning meeting!"
print(classifier(text))
```
### Output:
[{'label': 'SARCASTIC', 'score': 0.93}]
## โจ Author
Trained and uploaded by **YamenRM .** |