Spam Email Detection Using DistilBERT

Project Overview

A DistilBERT-based model that classifies email messages as Spam or Ham.

Dataset

SetFit/enron_spam

  • Training samples: 8,000
  • Testing samples: 2,000
  • Spam label: 1
  • Ham label: 0

Technologies

  • Python
  • PyTorch
  • Hugging Face Transformers
  • Google Colab
  • DistilBERT

Workflow

  1. Dataset preparation
  2. Tokenization
  3. Model training
  4. Model evaluation
  5. Spam and Ham prediction
  6. Spam indicator explanation

Example

Input: Congratulations! You won a free prize.

Prediction: SPAM

Limitation

Spam explanations use predefined keyword indicators and do not establish the model's causal reasoning.

Downloads last month
35
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support