Instructions to use rationalenterprise/fine_tuned_spam_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rationalenterprise/fine_tuned_spam_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="rationalenterprise/fine_tuned_spam_model")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("rationalenterprise/fine_tuned_spam_model") model = AutoModelForSequenceClassification.from_pretrained("rationalenterprise/fine_tuned_spam_model") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("rationalenterprise/fine_tuned_spam_model")
model = AutoModelForSequenceClassification.from_pretrained("rationalenterprise/fine_tuned_spam_model")Quick Links
fine_tuned_spam_model
This model is a fine-tuned version of huawei-noah/TinyBERT_General_4L_312D on a dataset of batch-labeled emails and SMS messages that were identified to be spam (Enron, spamassassin, sms-spam, etc.). It achieves the following results on the evaluation set:
- Loss: 0.6292
- Accuracy: 0.7664
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.6875 | 1.0 | 364 | 0.7508 | 0.7226 |
| 0.5574 | 2.0 | 728 | 0.6804 | 0.7292 |
| 0.5481 | 3.0 | 1092 | 0.6292 | 0.7664 |
Framework versions
- Transformers 4.49.0
- Pytorch 2.6.0+cpu
- Datasets 3.3.2
- Tokenizers 0.21.1
- Downloads last month
- 8
Model tree for rationalenterprise/fine_tuned_spam_model
Base model
huawei-noah/TinyBERT_General_4L_312D
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="rationalenterprise/fine_tuned_spam_model")