CoolFace
Modelpublic

nosadaniel/mistral-7b-instruct-tuned

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes9downloads
Model Card

Model Card for mistral-7b-instruct-sft

Abstract

This repository hosts a fine‑tuned Mistral 7B‑Instruct model that leverages parameter‑efficient LoRA adaptation via the Unsloth framework. The model is adapted for email‑security tasks using a curated phishing‑email training dataset and demonstrates state‑of‑the‑art performance (94.9 % accuracy, 93.9 % precision, 96.1 % recall).

Model Details

Model Description

  • Developed by: Montimage
  • Model type: Large Language Model (LLM)
  • Language(s): English
  • License: Apache‑2.0
  • Finetuned from model: unsloth/mistral-7b-instruct-v0.3-bnb-4bit

Model Sources

  • Repository: https://huggingface.co/nosadaniel/mistral-7b-instruct-tuned

How to Get Started with the Model

You can download the model using the Hugging Face Space.

Locally using Ollama

  1. 1.Install Ollama – https://ollama.com
  2. 2.Pull the base model:
bash
   ollama pull unsloth/mistral-7b-instruct-v0.3-bnb-4bit
  1. 1.Create a merged‑model manifest (no file extension) with the following content and place it in a folder of your choice:
text
   FROM mistral-7b-instruct-v0.3-bnb-4bit
   ADAPTER /path/to/your/downloaded/adapter

Then run:

bash
   ollama create merged-model --from ./merged-model
  1. 1.Run the merged model:
bash
   ollama run merged-model

Training Details

Training Data

  • Dataset: Phishing Email Training Dataset
  • Link: https://huggingface.co/datasets/nosadelian/phishing-email-training-dataset

Training Procedure

  • Fine‑tuning method: LoRA (Low‑Rank Adaptation) via Unsloth
  • Training regime: fp16 mixed precision
  • Epochs: 3 (full dataset)
  • Learning rate: 2e‑4
  • Batch size: 32

Model Comparison Table (selected row for this model)

ModelSamplesAccuracyPrecisionRecallF1‑ScoreSpecificityFPRFNRMCCValidityAvg Response Time (s)Total Input TokensTotal Output TokensAvg Input TokensAvg Output TokensQuality MeanQuality StdExcellent (%)Good (%)Fair (%)Poor (%)
mistral-7b-instruct-sft2560.9490.9390.9610.9500.9380.0620.0390.899100.0 %18.70144,24772,299563.5282.40.9510.09894.90.05.10.0
mistral:7b2560.8400.9390.7270.8190.9530.0470.2730.698100.0 %12.57144,24776,797563.5300.00.8500.16084.00.06.69.4

Comparison with Base Model (mistral:7b): The fine‑tuned model achieves substantially higher accuracy (94.9 % vs 84.0 %), recall (96.1 % vs 72.7 %), and overall quality metrics, while maintaining comparable precision, demonstrating the effectiveness of LoRA fine‑tuning for email‑phishing detection.

Model Performance Analysis – mistral‑7b‑instruct‑sft

  • Total Responses: 256
  • Accuracy: 94.9 % (243/256)
  • Valid Responses: 100 % (256/256)
  • Average Confidence: 0.921
Classification Metrics
MetricValue
Accuracy94.9 %
Precision93.9 %
Recall96.1 %
F1‑Score95.0 %
Specificity93.8 %
Confusion Matrix
Predicted PositivePredicted Negative
Actual Positive123 (TP)5 (FN)
Actual Negative8 (FP)120 (TN)
Additional Metrics
  • False Positive Rate: 6.2 %
  • False Negative Rate: 3.9 %
  • Negative Predictive Value: 96.0 %
  • Matthews Correlation Coefficient: 0.899
Performance Insights
  • High Precision – Low false‑positive rate, fostering user trust.
  • High Recall – Catches the vast majority of phishing attempts, enhancing security.
  • Excellent F1‑Score – Well‑balanced precision and recall.
  • Strong MCC – Strong overall correlation between predictions and ground truth.

Citation

BibTeX:

bibtex
@dataset{mistral-7b-instruct-sft,
  title={Fine‑tuned Mistral 7B‑Instruct model for Email Phishing Detection},
  author={Montimage, Nosadaniel, Luong89},
  year={2025},
  publisher={Montimage}
}

APA:

Montimage, Nosakhare Daniel Ahanor, & Luong89. (2025). Fine‑tuned Mistral 7B‑Instruct model for Email Phishing Detection. Montimage.

Model Card Authors

Montimage Email Security Research Division AI/ML Engineering Team Cybersecurity Domain Experts

Framework versions

  • PEFT 0.17.1