Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ source_datasets:
|
|
| 15 |
|
| 16 |
# SMS Spam Collection (Balanced)
|
| 17 |
|
| 18 |
-
A balanced SMS spam dataset for text classification
|
| 19 |
|
| 20 |
## Overview
|
| 21 |
|
|
@@ -29,7 +29,7 @@ A balanced SMS spam dataset for text classification, created following Sebastian
|
|
| 29 |
|
| 30 |
## Dataset Description
|
| 31 |
|
| 32 |
-
This is a balanced version of the UCI SMS Spam Collection dataset. Originally, the dataset had 5,572 messages with an imbalanced distribution (4,825 ham, 747 spam).
|
| 33 |
|
| 34 |
### Label Distribution (Balanced)
|
| 35 |
|
|
@@ -53,8 +53,6 @@ This is a balanced version of the UCI SMS Spam Collection dataset. Originally, t
|
|
| 53 |
3. **Split** into train (70%), validation (10%), test (20%) sets
|
| 54 |
4. **Converted** labels to integers: ham=0, spam=1
|
| 55 |
|
| 56 |
-
This follows exactly the process described in Sebastian Raschka's "Build a Large Language Model From Scratch" book, Chapter 6.
|
| 57 |
-
|
| 58 |
## Usage with Hugging Face
|
| 59 |
|
| 60 |
```python
|
|
@@ -127,18 +125,10 @@ This dataset is designed for fine-tuning LLMs for spam detection.
|
|
| 127 |
|
| 128 |
**Model:** [mustafaege/spam-detector-gpt2-hf](https://huggingface.co/mustafaege/spam-detector-gpt2-hf)
|
| 129 |
|
| 130 |
-
The model was trained following the book's Chapter 6.5 approach:
|
| 131 |
-
- Base Model: openai-community/gpt2 (124M parameters)
|
| 132 |
-
- Modified Layer: Added `out_head = nn.Linear(768, 2)` classification head
|
| 133 |
-
- Unfrozen Layers: Last transformer block (h[-1]), Final LayerNorm (ln_f), Classification head (out_head)
|
| 134 |
-
- Classification Method: Using the last token hidden state for prediction
|
| 135 |
-
|
| 136 |
## License
|
| 137 |
|
| 138 |
The original UCI SMS Spam Collection dataset is available under the [UCI Machine Learning Repository](https://archive.ics.uci.edu/dataset/228/sms+spam+collection) terms.
|
| 139 |
|
| 140 |
## References
|
| 141 |
|
| 142 |
-
- Book: "Build a Large Language Model From Scratch" by Sebastian Raschka
|
| 143 |
-
- Chapter 6: Finetuning for Text Classification
|
| 144 |
- Original Dataset: [UCI SMS Spam Collection](https://archive.ics.uci.edu/dataset/228/sms+spam+collection)
|
|
|
|
| 15 |
|
| 16 |
# SMS Spam Collection (Balanced)
|
| 17 |
|
| 18 |
+
A balanced SMS spam dataset for text classification.
|
| 19 |
|
| 20 |
## Overview
|
| 21 |
|
|
|
|
| 29 |
|
| 30 |
## Dataset Description
|
| 31 |
|
| 32 |
+
This is a balanced version of the UCI SMS Spam Collection dataset. Originally, the dataset had 5,572 messages with an imbalanced distribution (4,825 ham, 747 spam). We balanced it to 747 ham and 747 spam for training efficiency.
|
| 33 |
|
| 34 |
### Label Distribution (Balanced)
|
| 35 |
|
|
|
|
| 53 |
3. **Split** into train (70%), validation (10%), test (20%) sets
|
| 54 |
4. **Converted** labels to integers: ham=0, spam=1
|
| 55 |
|
|
|
|
|
|
|
| 56 |
## Usage with Hugging Face
|
| 57 |
|
| 58 |
```python
|
|
|
|
| 125 |
|
| 126 |
**Model:** [mustafaege/spam-detector-gpt2-hf](https://huggingface.co/mustafaege/spam-detector-gpt2-hf)
|
| 127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
## License
|
| 129 |
|
| 130 |
The original UCI SMS Spam Collection dataset is available under the [UCI Machine Learning Repository](https://archive.ics.uci.edu/dataset/228/sms+spam+collection) terms.
|
| 131 |
|
| 132 |
## References
|
| 133 |
|
|
|
|
|
|
|
| 134 |
- Original Dataset: [UCI SMS Spam Collection](https://archive.ics.uci.edu/dataset/228/sms+spam+collection)
|