Instructions to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf", filename="Llama-Phishsense-1B.IQ3_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with Ollama:
ollama run hf.co/RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
- Unsloth Studio
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf:Q4_K_M
Run and chat with the model
lemonade run user.AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf-Q4_K_M
List all available models
lemonade list
Quantization made by Richard Erkhov.
Llama-Phishsense-1B - GGUF
- Model creator: https://huggingface.co/AcuteShrewdSecurity/
- Original model: https://huggingface.co/AcuteShrewdSecurity/Llama-Phishsense-1B/
| Name | Quant method | Size |
|---|---|---|
| Llama-Phishsense-1B.Q2_K.gguf | Q2_K | 0.54GB |
| Llama-Phishsense-1B.IQ3_XS.gguf | IQ3_XS | 0.58GB |
| Llama-Phishsense-1B.IQ3_S.gguf | IQ3_S | 0.6GB |
| Llama-Phishsense-1B.Q3_K_S.gguf | Q3_K_S | 0.6GB |
| Llama-Phishsense-1B.IQ3_M.gguf | IQ3_M | 0.61GB |
| Llama-Phishsense-1B.Q3_K.gguf | Q3_K | 0.64GB |
| Llama-Phishsense-1B.Q3_K_M.gguf | Q3_K_M | 0.64GB |
| Llama-Phishsense-1B.Q3_K_L.gguf | Q3_K_L | 0.68GB |
| Llama-Phishsense-1B.IQ4_XS.gguf | IQ4_XS | 0.7GB |
| Llama-Phishsense-1B.Q4_0.gguf | Q4_0 | 0.72GB |
| Llama-Phishsense-1B.IQ4_NL.gguf | IQ4_NL | 0.72GB |
| Llama-Phishsense-1B.Q4_K_S.gguf | Q4_K_S | 0.72GB |
| Llama-Phishsense-1B.Q4_K.gguf | Q4_K | 0.75GB |
| Llama-Phishsense-1B.Q4_K_M.gguf | Q4_K_M | 0.75GB |
| Llama-Phishsense-1B.Q4_1.gguf | Q4_1 | 0.77GB |
| Llama-Phishsense-1B.Q5_0.gguf | Q5_0 | 0.83GB |
| Llama-Phishsense-1B.Q5_K_S.gguf | Q5_K_S | 0.83GB |
| Llama-Phishsense-1B.Q5_K.gguf | Q5_K | 0.85GB |
| Llama-Phishsense-1B.Q5_K_M.gguf | Q5_K_M | 0.85GB |
| Llama-Phishsense-1B.Q5_1.gguf | Q5_1 | 0.89GB |
| Llama-Phishsense-1B.Q6_K.gguf | Q6_K | 0.95GB |
| Llama-Phishsense-1B.Q8_0.gguf | Q8_0 | 1.23GB |
Original model description:
base_model: - meta-llama/Llama-Guard-3-1B datasets: - ealvaradob/phishing-dataset language: - en license: llama3.2 metrics: - accuracy - precision - recall library_name: transformers
Revolutionize Phishing Protections with the Shrewd's Llama-Phishsense-1B!
Phishing attacks are constantly evolving, targeting businesses and individuals alike. What if you could deploy a highly efficient/effective, AI-powered defense system that proactively identifies these threats and safeguards your inbox?
- Enter the Shrewd's AcuteShrewdSecurity/Llama-Phishsense-1Bโ your new secret SOTA (finetuned Llama-Guard-3-1B) defense to combat phishing. It's trained to sense phishing.
PS: it's small enough to be used anywhere, and is a model trained to have the phishing detection sense. See Launch Post here
Why Phishing is a Growing Threat
Phishing is no longer just a concern for individuals; itโs an enterprise-level threat. MANY of cyberattacks begin with phishing emails aimed at compromising valuable data. Malicious actors craft increasingly deceptive messages, making it difficult for even the most vigilant people to distinguish between real and fraudulent emails.
The results? Billions in financial losses, compromised personal and professional accounts, and reputational damage.
The Solution: AI-Powered Phishing Detection
Traditional security systems struggle to keep pace with modern phishing tactics. Thatโs where AI comes in. The Llama-Phishsense-1B is designed to:
- Automatically detect phishing patterns in real-time.
- Protect your organization from costly breaches.
- Empower people to confidently navigate their inbox, knowing they are safeguarded.
Join the Movement for Better Cybersecurity
Our initiative is more than just another AI toolโitโs a step toward global cyber resilience. By leveraging the latest advances in Low-Rank Adaptation (LoRA), the AcuteShrewdSecurity/Llama-Phishsense-1B model is designed to identify phishing attempts with minimal resources, making it fast and efficient without sacrificing accuracy.
Why You Should Use This Model
1. Protect Against Corporate Enterprise Phishing
In a corporate setting, phishing emails can look legitimate and may easily bypass traditional filters. Attackers specifically tailor their messages to target people, especially those in finance, HR, or IT. The AcuteShrewdSecurity/Llama-Phishsense-1B can be integrated into your corporate email system to act as an additional layer of protection:
- Mitigate risks of people-targeted phishing attacks.
- Prevent unauthorized access to sensitive information.
- Reduce downtime associated with recovering from successful phishing exploits.
2. Individual Use Case
For individuals, managing personal information is more crucial than ever. Phishing emails that appear to be from legitimate services, such as online banking or social networks, can easily slip through basic email filters. This model:
- Identifies phishing attempts before you even open the email.
- Provides a clear 'TRUE' or 'FALSE' prediction on whether an email is safe.
- Gives peace of mind knowing your private data is secure.
3. Offer Phishing Protection as a Service
For security professionals and IT providers, integrating Llama-Phishsense-1B into your security offerings can give clients an added layer of reliable, AI-driven protection:
- Add this model to your existing cybersecurity stack.
- Increase client satisfaction by offering a proven phishing detection system.
- Help clients avoid costly breaches and maintain operational efficiency.
Model Description
The Llama-Phishsense-1B is a fine-tuned version of meta-llama/Llama-Guard-3-1B, enhanced to handle phishing detection specifically within corporate email environments. Through advanced LoRA-based fine-tuning, it classifies emails as either "TRUE" (phishing) or "FALSE" (non-phishing), offering lightweight yet powerful protection against the ever-growing threat of email scams.
Key Features:
- Base Model:
meta-llama/Llama-Guard-3-1B (SFT on yueliu1999/GuardReasonerTrain) - LoRA Fine-tuning: Efficient adaptation using Low-Rank Adaptation for quick, resource-friendly deployment.
- Task: Binary email classificationโphishing (TRUE) or non-phishing (FALSE).
- Dataset: A custom-tailored phishing email dataset, featuring real-world phishing and benign emails.
- Model Size: 1 Billion parameters, ensuring robust performance without overburdening resources.
- Architecture: Causal Language Model with LoRA-adapted layers for speed and efficiency.
Why Choose This Model?
Phishing is responsible for the majority of security breaches today. The Llama-Phishsense-1B model is your answer to this problem:
- Highly Accurate: The model has achieved outstanding results in real-world evaluations, with an F1-score of 0.99 on balanced datasets.
- Fast and Efficient: Leveraging LoRA fine-tuning, it operates faster while requiring fewer computational resources, meaning you get top-notch protection without slowing down your systems.
- Accessible to Everyone: Whether you're a IT team or a solo email user, this tool is designed for easy integration and use.
Training and Fine-tuning:
LoRA Configuration:
- Rank:
r=16 - Alpha:
lora_alpha=32 - Dropout:
lora_dropout=0.1 - Adapted on the q_proj and v_proj transformer layers for efficient fine-tuning.
Training Data:
The model was fine-tuned on a balanced dataset of phishing and non-phishing emails (30k each), selected from ealvaradob/phishing-dataset to ensure real-world applicability.
Optimizer:
- AdamW Optimizer: Weight decay of
0.01with a learning rate of1e-3.
Training Configuration:
- Mixed-precision (FP16): Enables faster training without sacrificing accuracy.
- Gradient accumulation steps: 10.
- Batch size: 10 per device.
- Number of epochs: 10.
Performance (Before and After finetuning):
Our model has demonstrated its effectiveness across multiple datasets (evals from zefang-liu/phishing-email-dataset, and custom created):
| Metric | Base Model (meta-llama/Llama-Guard-3-1B) | Finetuned Model (AcuteShrewdSecurity/Llama-Phishsense-1B) | Performance Gain (Finetuned vs Base) |
|---|---|---|---|
| Accuracy | 0.52 | 0.97 | 0.45 |
| Precision | 0.52 | 0.96 | 0.44 |
| Recall | 0.53 | 0.98 | 0.45 |
On the validation dataset (which includes custom expert-designed phishing cases), the model still performs admirably:
| Metric | Base Model (meta-llama/Llama-Guard-3-1B) | Finetuned Model (AcuteShrewdSecurity/Llama-Phishsense-1B) | Performance Gain (Finetuned vs Base) |
|---|---|---|---|
| Accuracy | 0.31 | 0.98 | 0.67 |
| Precision | 0.99 | 1.00 | 0.01 |
| Recall | 0.31 | 0.98 | 0.67 |
Comparasion with some relevant models is seen below.

Paper can be found here.
How to Use the Model:
Using the Llama-Phishsense-1B is as simple as running a few lines of Python code. Youโll need to load both the base model and the LoRA adapter, and you're ready to classify emails in seconds!
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Function to load the model and tokenizer
def load_model():
tokenizer = AutoTokenizer.from_pretrained("AcuteShrewdSecurity/Llama-Phishsense-1B")
base_model = AutoModelForCausalLM.from_pretrained("AcuteShrewdSecurity/Llama-Phishsense-1B")
model_with_lora = PeftModel.from_pretrained(base_model, "AcuteShrewdSecurity/Llama-Phishsense-1B")
# Move model to GPU if available
if torch.cuda.is_available():
model_with_lora = model_with_lora.to('cuda')
return model_with_lora, tokenizer
# Function to make a single prediction
def predict_email(model, tokenizer, email_text):
prompt = f"Classify the following text as phishing or not. Respond with 'TRUE' or 'FALSE':\n\n{email_text}\nAnswer:"
inputs = tokenizer(prompt, return_tensors="pt")
# Move inputs to GPU if available
if torch.cuda.is_available():
inputs = {key: value.to('cuda') for key, value in inputs.items()}
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=5, temperature=0.01, do_sample=False)
response = tokenizer.decode(output[0], skip_special_tokens=True).split("Answer:")[1].strip()
return response
# Load model and tokenizer
model, tokenizer = load_model()
# Example email text
email_text = "Urgent: Your account has been flagged for suspicious activity. Please log in immediately."
prediction = predict_email(model, tokenizer, email_text)
print(f"Model Prediction for the email: {prediction}")
- Downloads last month
- 51
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf
Base model
meta-llama/Llama-Guard-3-1B

ollama run hf.co/RichardErkhov/AcuteShrewdSecurity_-_Llama-Phishsense-1B-gguf: