CoolFace
Modelpublic

Sanrove/albert-spam-sms-classification-finetuned

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes9downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

training_dir

This model is a fine-tuned version of albert-base-v2 on an Spam Data Collection dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.0393
  • —Accuracy: 0.9946
  • —F1 Score: 0.9946

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

SMS 1:

Message: Hey, I'll be there in 10 minutes. See you soon!

Label: label_0 (ham)

SMS 2:

Message: Congratulations! You've won a $1000 gift card. Claim it now by clicking the link.

Label: label_1 (spam)

In this SMS classification example, the first message is labeled as "label0" because it appears to be a legitimate text message (ham) with someone informing they will arrive shortly. The second message is labeled as "label1" because it is clearly spam, offering a prize and urging the recipient to click a link, which is a common characteristic of spam messages. The classification model uses these labels to identify and filter out spammy SMS messages, ensuring that legitimate messages reach the user's inbox (ham).

Training procedure

Colab

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 5e-05
  • —trainbatchsize: 16
  • —evalbatchsize: 64
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —num_epochs: 10

Training results

Training LossEpochStepValidation LossAccuracyF1 Score
No log1.02440.10700.97850.9785
No log2.04880.06730.98800.9880
0.08853.07320.02930.99460.9946
0.08854.09760.02800.99640.9964
0.03065.012200.03550.99520.9952
0.03066.014640.03640.99520.9952
0.00877.017080.04480.99460.9946
0.00878.019520.06180.99220.9922
0.00479.021960.04200.99460.9946
0.004710.024400.03930.99460.9946

Framework versions

  • —Transformers 4.33.2
  • —Pytorch 2.0.1+cu118
  • —Datasets 2.14.5
  • —Tokenizers 0.13.3