Skip to content

Releases: KOKOSde/localmod

v0.1.0

01 Jan 07:40

Choose a tag to compare

Full Changelog: https://github.com/KOKOSde/localmod/commits/v0.1.0

LocalMod: Fully Offline Content Moderation API

Your data never leaves your infrastructure. Self-hosted alternative to Amazon Comprehend, Azure Content Moderator, and Perspective API.

✨ Features

  • 6 Classifiers: Toxicity, PII, Prompt Injection, Spam, NSFW Text, NSFW Image
  • 100% Offline: Download models once, run forever without internet
  • High Accuracy: 0.75 balanced accuracy on toxicity (beats Amazon Comprehend)
  • Fast API: FastAPI with async endpoints
  • Docker Ready: One command deployment

📊 Benchmarks

Category Accuracy Benchmark
Toxicity 0.75 CHI 2025 (HateXplain, Civil Comments, SBIC)
Spam 99.8% UCI SMS Spam Collection

🧠 Models

Text Classifiers:

  • Toxicity: Weighted ensemble (toxic-bert, dehatebert, s-nlp, facebook)
  • PII: Regex + validation
  • Prompt Injection: DeBERTa v3
  • Spam: RoBERTa
  • NSFW Text: NSFW classifier

Image Classifier:

  • NSFW Image: Falconsai ViT (71M+ downloads)

🚀 Quick Start

pip install localmod
localmod download # Download models (~3GB)
localmod server # Start API on :8000

📄 License

MIT - Free for commercial use