qwen35-27b-phish-qlora (QLoRA adapter)

This repository contains a QLoRA/LoRA adapter fine-tuned on a phishing-email dataset to help classify emails as PHISHING or LEGIT.

This repo does not include the full base model weights. You must download the base model separately and load this adapter on top.

Base model

  • Qwen/Qwen3.5-27B

Dataset

  • Kaggle: naserabdullahalam/phishing-email-dataset

What it does

Given an email body, the intended behavior is to output exactly one label:

  • PHISHING
  • LEGIT

Quickstart (Transformers + PEFT)

Install

pip install -U "transformers" "peft" "accelerate" "bitsandbytes" "torch"


import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

BASE_ID = "Qwen/Qwen3.5-27B"
ADAPTER_ID = "rudycaz/qwen35-27b-phish-qlora"  # this repo

tok = AutoTokenizer.from_pretrained(BASE_ID, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    BASE_ID,
    device_map="auto",
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
)

model = PeftModel.from_pretrained(model, ADAPTER_ID)

email_text = """Subject: Urgent! Verify your account
..."""

prompt = (
    "You are a security assistant. Classify the following email as PHISHING or LEGIT.\n\n"
    f"EMAIL:\n{email_text}\n\n"
    "Answer with exactly one word: PHISHING or LEGIT."
)

inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=4)
print(tok.decode(out[0], skip_special_tokens=True))
Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for rudycaz/qwen35-27b-phish-qlora

Base model

Qwen/Qwen3.5-27B
Adapter
(52)
this model