Downloads · 30 days
77
6% of all-time downloads
Davv4/phishing-qwen3.5-2b-gguf
phishing-qwen3.5-2b-gguf is a machine learning model from Davv4. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
GGUF version of Davv4/phishing-qwen3.5-2b, a fine-tuned Qwen/Qwen3.5-2B model for email phishing detection. This version is optimized for use with Ollama — no Python ML dependencies required.
Downloads · 30 days
77
6% of all-time downloads
All-time downloads
1.3K
Public
Repo size
7.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf7.1 GB · 100%
From the Hugging Face model README
GGUF version of Davv4/phishing-qwen3.5-2b, a fine-tuned Qwen/Qwen3.5-2B model for email phishing detection. This version is optimized for use with Ollama — no Python ML dependencies required.
The model expects a plain text email in the following format:
Sender: <sender email address>
Receiver: <receiver email address>
Date: <email date>
Subject: <email subject>
Body: <email body text>
Example input:
Sender: [email protected]
Receiver: [email protected]
Date: Sun, 01 Jun 2025 22:10:05 +0000
Subject: Netflix: Payment declined - Update your billing information
Body: Dear Kevin, We were unable to process your most recent payment and
your Netflix membership is at risk of cancellation. Update billing:
http://netf1ix-account-alert.com/billing-update. Act within 48 hours.
The model responds with a structured JSON object:
{
"is_phishing": true,
"confidence_score": 0.98,
"threat_type": "Credential Harvesting / Financial Fraud",
"risk_level": "CRITICAL",
"reasoning": "The sender domain 'netf1ix-account-alert.com' replaces the letter 'l' with '1' to impersonate Netflix..."
}
| Field | Type | Description |
|---|---|---|
is_phishing | boolean | true if phishing, false if legitimate |
confidence_score | float (0.0–1.0) | Model's confidence in its verdict |
threat_type | string or null | Category of threat, or null if legitimate |
risk_level | string | One of LOW, MEDIUM, HIGH, CRITICAL |
reasoning | string | Human-readable explanation of the verdict |
Download and install Ollama from https://ollama.com.
hf download Davv4/phishing-qwen3.5-2b-gguf phishing-qwen3.5-2b.gguf
Create a file named Modelfile with the following content:
FROM /path/to/phishing-qwen3.5-2b.gguf
SYSTEM """You are an email security analyst. Analyze the provided email and determine if it is a phishing attempt. Respond ONLY with a valid JSON object using this exact schema: {"is_phishing": boolean, "confidence_score": number (0.0-1.0), "threat_type": "string or null", "risk_level": "LOW|MEDIUM|HIGH|CRITICAL", "reasoning": "string"}"""
PARAMETER temperature 0.1
PARAMETER num_predict 512
Replace
/path/to/phishing-qwen3.5-2b.ggufwith the actual path where you saved the file.
ollama create phishing-detector -f Modelfile
ollama run phishing-detector
Once loaded, you can call it from any directory — no need to stay in the Modelfile folder.
import json
import requests
def analyze_email(email_text: str) -> dict:
response = requests.post(
"http://localhost:11434/api/generate",
json={
"model": "phishing-detector",
"prompt": email_text,
"stream": False
}
)
raw = response.json()["response"]
try:
result = json.loads(raw.strip())
except json.JSONDecodeError:
result = {"error": "Failed to parse model output", "raw": raw}
return result
# Example usage
email = """Sender: [email protected]
Receiver: [email protected]
Date: Sun, 01 Jun 2025 22:10:05 +0000
Subject: Netflix: Payment declined - Update your billing information
Body: Dear Kevin, We were unable to process your payment.
Update billing: http://netf1ix-account-alert.com/billing-update. Act within 48 hours."""
result = analyze_email(email)
print(json.dumps(result, indent=2))
Expected output:
{
"is_phishing": true,
"confidence_score": 0.98,
"threat_type": "Credential Harvesting / Financial Fraud",
"risk_level": "CRITICAL",
"reasoning": "The sender domain 'netf1ix-account-alert.com' replaces the letter 'l' with '1' to impersonate Netflix. The link routes to a fraudulent domain rather than netflix.com. Loss aversion and urgency tactics are used to pressure the victim."
}
Looking for the HuggingFace Transformers version? See Davv4/phishing-qwen3.5-2b.
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3.5-2B |
| Fine-tuning method | LoRA (rank 8, alpha 16) |
| Training framework | LLaMA Factory |
| Training epochs | 10 |
| Learning rate | 3e-4 |
| Task | Supervised Fine-Tuning (SFT) |
This model inherits the Apache 2.0 license from the base Qwen3.5-2B model.