Downloads · 30 days
6
12% of all-time downloads
VoltageVagabond/spam-classifier-liquid
spam-classifier-liquid is a text classification model from VoltageVagabond. Use it when you need a label for a piece of text. It is set up for peft. The card lists the license as mit.
This repository was created for a senior project in ENGT 375 Applied Machine Learning at Old Dominion University. It is provided for educational and research demonstration purposes only. It is not intended for product…
Downloads · 30 days
6
12% of all-time downloads
All-time downloads
49
Public
Repo size
709 MB
Likes
0
Public
Click a slice to open those files.
.pt490 MB · 50%
From the Hugging Face model README
This repository was created for a senior project in ENGT 375 Applied Machine Learning at Old Dominion University. It is provided for educational and research demonstration purposes only. It is not intended for production use, security filtering, or making real-world spam/phishing decisions. Always use established security tools for operational email protection.
library_name: transformers tags:
ENGT 375 — Applied Machine Learning | Spring 2026 | ODU Liquid AI's LFM2.5-1.2B-Instruct model fine-tuned with LoRA adapters using HuggingFace Transformers + PEFT for spam email classification.
w1, w2, in_proj, out_proj, v_proj, k_proj, q_proj, w3
| Hyperparameter | Value |
|---|---|
| Training examples | ~8,000 (fast) / ~16,000 (full) — 3-class Spam/Ham/Phishing |
| Test examples | ~20% holdout from the retrain split |
| Epochs | 3 |
| Batch size | 1 (effective 4 with gradient accumulation steps = 4) |
| Learning rate | 2e-4 |
| Max sequence length | 256 |
| Optimizer | adamw_torch (bitsandbytes 8-bit not supported on MPS) |
| Weight dtype | bfloat16 |
| Device | MPS (Apple Silicon) |
| Gradient checkpointing | Enabled (use_reentrant=False) |
| Max gradient norm | 0.3 |
| LoRA rank | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.1 |
| Target modules | 8 (q_proj, k_proj, v_proj, out_proj, w1, w2, w3, in_proj) |
| Training time | ~1–1.5 hours (per fine_tune.py; earlier docs listed ~2–2.5 hours before the v0.4.3 memory optimization) |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-1.2B-Instruct")
model = PeftModel.from_pretrained(base_model, "adapters")
tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-1.2B-Instruct")
pip install -r requirements.txt
python app.py
adapters/ — LoRA adapter weights + configfine_tune.py — Training scriptapp.py — Gradio web interfacetraining_data/ — Training datasetThis model is an educational demonstration of LLM fine-tuning with HuggingFace PEFT, created as part of a university course project. It is suitable for:
It is not intended for production spam filtering.
Note: Three-class classification (SPAM / HAM / PHISHING) is supported as of v0.4.0 — earlier versions were binary. The model is deployed as a HuggingFace Space (see Space header above).
| Model | Description | Link |
|---|---|---|
| spam-classifier-mlx | Qwen 3.5 0.8B MLX LoRA fine-tune | VoltageVagabond/spam-classifier-mlx |
| spam-xai-model | sklearn voting ensemble (RF + LR + SVM) with LIME/SHAP/ELI5 explainability | VoltageVagabond/spam-xai-model |
| spam-xai-classifier (Space) | Live Gradio web app for the sklearn classifier | VoltageVagabond/spam-xai-classifier |
@misc{voltagevagabond2026spamliquid,
title={Spam Classifier — Liquid AI LFM2.5-1.2B LoRA Fine-Tune},
author={VoltageVagabond},
year={2026},
howpublished={\url{https://huggingface.co/VoltageVagabond/spam-classifier-liquid}},
note={ENGT 375 — Applied Machine Learning, Old Dominion University, Spring 2026}
}