CoolFace
Modelpublic

rudycaz/phi35-phish-mlx

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes17downloads
Model Card

phi35-phish-mlx

This repository contains an Apple MLX-format phishing-focused model derived from Phi-3.5 Mini Instruct (4-bit). It is intended to help classify suspicious emails and support security review workflows.

What’s in this repo

This repo is meant to be used in one of these ways:

  • —Fused model (base + adapter merged into a single MLX model directory), OR
  • —Adapter-only (LoRA adapter weights) to be applied on top of the base model locally

If you are unsure which you uploaded, check the repo file list:

  • —Fused model typically includes MLX weights + tokenizer/config files for direct inference.
  • —Adapter-only typically includes adapter weight files/config and requires the base model separately.

Base model

  • —mlx-community/Phi-3.5-mini-instruct-4bit

Dataset

This model was fine-tuned for phishing detection using a Kaggle phishing email dataset:

  • —Kaggle dataset: “phishing-email-dataset” (naserabdullahalam) https://www.kaggle.com/datasets/naserabdullahalam/phishing-email-dataset
If you trained Phi-3.5 on a different Kaggle dataset, replace the link above with the exact dataset URL you used so the citation is accurate.

Intended behavior

Given an email, the intended output is a single label:

  • —PHISHING
  • —LEGIT

Example prompt format:

text
You are a security assistant. Classify the following email as PHISHING or LEGIT.

EMAIL:
<paste email here>

Answer with exactly one word: PHISHING or LEGIT.


pip install -U mlx-lm huggingface_hub

from mlx_lm import load, generate

# Option A: load this repo directly (if fused model is uploaded)
MODEL_ID = "rudycaz/phi35-phish-mlx"

model, tokenizer = load(MODEL_ID)

prompt = """You are a security assistant. Classify the following email as PHISHING or LEGIT.

EMAIL:
Subject: Verify your account
Body: Please click the link below to verify...

Answer with exactly one word: PHISHING or LEGIT.
"""

print(generate(model, tokenizer, prompt, max_tokens=8))