--- license: apache-2.0 base_model: Qwen/Qwen3.5-27B pipeline_tag: text-generation tags: - peft - lora - qlora - phishing - email-security - cybersecurity - qwen language: - en --- # 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 ```bash 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))