Views
No views yet
Depending on what you uploaded, this repo is either:
- Adapter-only (LoRA/QLoRA): requires the base model + this adapter, or
- Merged/fused model: can be loaded directly without separately applying an adapter.
Qwen/Qwen3-4B (use the exact base model you fine-tuned from)PHISHINGLEGIT1You are a security assistant. Classify the following email as PHISHING or LEGIT.
2
3EMAIL:
4<paste email here>
5
6Answer with exactly one word: PHISHING or LEGIT.
7
8pip install -U torch transformers peft accelerate bitsandbytes safetensors
9
10import torch
11from transformers import AutoTokenizer, AutoModelForCausalLM
12
13MODEL_ID = "rudycaz/qwen3-4b-phishing-detection" # this repo
14
15tok = AutoTokenizer.from_pretrained(MODEL_ID, trust_remote_code=True)
16model = AutoModelForCausalLM.from_pretrained(
17 MODEL_ID,
18 device_map="auto",
19 torch_dtype=torch.bfloat16,
20 trust_remote_code=True,
21)
22
23email_text = """Subject: Verify your account
24Body: Please click the link below to verify...
25"""
26
27prompt = (
28 "You are a security assistant. Classify the following email as PHISHING or LEGIT.\n\n"
29 f"EMAIL:\n{email_text}\n\n"
30 "Answer with exactly one word: PHISHING or LEGIT."
31)
32
33inputs = tok(prompt, return_tensors="pt").to(model.device)
34out = model.generate(**inputs, max_new_tokens=4)
35print(tok.decode(out[0], skip_special_tokens=True))