Views
No views yet
unsloth/qwen3-14b-unsloth-bnb-4bit| Metric | Value |
|---|---|
| Accuracy | 88.75% |
| Precision | 0.833 |
| Recall | 0.970 |
| F1-Score | 0.896 |
| Category | Baseline | Fine-tuned |
|---|---|---|
| Human-Phishing | 100% | 94% |
| Human-Legitimate | 0% | 62% |
| LLM-Phishing | 100% | 100% |
| LLM-Legitimate | 0% | 99% |
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base_model = AutoModelForCausalLM.from_pretrained(
5 "unsloth/qwen3-14b-unsloth-bnb-4bit",
6 load_in_4bit=True,
7 device_map="auto",
8)
9model = PeftModel.from_pretrained(base_model, "ellachang/phishing-detector-14b-lora")
10tokenizer = AutoTokenizer.from_pretrained("ellachang/phishing-detector-14b-lora")
11
12prompt = """Analyze the following email and determine if it is a phishing email or a legitimate email. Provide your classification.
13
14### Input:
15{email_text}
16
17### Response:"""
18
19inputs = tokenizer(prompt.format(email_text="<your email here>"), return_tensors="pt")
20outputs = model.generate(**inputs, max_new_tokens=20, temperature=0)
21print(tokenizer.decode(outputs[0], skip_special_tokens=True))