CoolFace
Modelpublic

RamzyBakir/jellyphish-bert-base-mail

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
1likes34downloads
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. -->

JellyPhish

This model is a fine-tuned version of google-bert/bert-base-uncased on the zefang-liu/phishing-email-dataset and kxm1k4m1/generate_phishing_email_final datasets. It achieves the following results on the evaluation set:

  • —Loss: 0.1658
  • —Accuracy: 0.9365
  • —Macro F1: 0.9364
  • —Weighted F1: 0.9364
  • —Precision: 0.9366
  • —Recall: 0.9363

Intended uses

  • —Detecting phishing emails in corporate environments.
  • —Classifying raw email text into phishing vs. legitimate.
  • —Serving as a baseline for email security NLP tasks.

Limitations

  • —Model performance depends on the domain of the training data; may not generalize to unseen types of phishing.
  • —Sensitive to noisy/unstructured inputs (e.g., raw HTML emails).
  • —Should not be used as the only defense mechanism against phishing — combine with rule-based and security systems.

How to use

python

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("RamzyBakir/jellyphish-bert-base-mail")
model = AutoModelForSequenceClassification.from_pretrained("RamzyBakir/jellyphish-bert-base-mail)

inputs = tokenizer("Your email text here", return_tensors="pt")
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 3e-05
  • —trainbatchsize: 32
  • —evalbatchsize: 32
  • —seed: 42
  • —optimizer: Use OptimizerNames.ADAMWTORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
  • —lrschedulertype: linear
  • —num_epochs: 10

Training results

Training LossEpochStepValidation LossAccuracyMacro F1Weighted F1PrecisionRecall
0.51271.02380.36150.88870.88850.88860.88930.8883
0.32142.04760.24370.91570.91570.91570.91560.9158
0.24973.07140.21360.91930.91920.91930.92020.9189
0.22574.09520.19370.92530.92520.92520.92580.9249
0.20765.011900.17660.93090.93080.93090.93080.9309
0.2016.014280.17510.93220.93210.93210.93250.9319
0.19597.016660.17140.93610.93610.93610.93640.9359
0.19448.019040.16760.93550.93540.93550.93560.9353
0.19049.021420.16480.93680.93670.93680.93680.9367
0.191210.023800.16580.93650.93640.93640.93660.9363

Framework versions

  • —Transformers 4.52.4
  • —Pytorch 2.6.0+cu124
  • —Datasets 3.6.0
  • —Tokenizers 0.21.2