Skip to content

MistyozAI/EvoMind

Repository files navigation

EvoMind 2.0

A lightweight 7.4M parameter transformer for real-time content safety classification - detecting harmful prompts, toxic language, and unsafe content.

Features

  • Compact & Fast: 7.4M parameters
  • Advanced Architecture: CosmicFish [GQA, RoPE, SwiGLU, RMSNorm]
  • Multi-category Detection: Harmful instructions, toxicity, violence, manipulation
  • Mobile Ready: CoreML export for iOS/macOS
  • Production Ready: FP16 quantization for ~50% size reduction

Model Specs

Component Value
Layers 4 transformer blocks
Attention Heads 4 (2 query groups)
Embedding Dim 128
Context Length 256 tokens
Parameters 7.4M

Performance

  • Accuracy: 76.3% overall, 95% on baseline cases
  • F1 Score: 0.77
  • ROC AUC: 0.82
  • FPR/FNR: 26.3% / 21.3%

validation_report

Quick Start

git clone https://github.com/MistyozAI/EvoMind.git
cd EvoMind
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt

Training Pipeline

# 1. Prepare dataset
python prepare.py --output_dir data/safety

# 2. Train model
python train.py --data_path data/safety/safety_dataset.jsonl

# 3. Validate
python validation.py --model_path out_safety/safety_best.pt

# 4. Quantize for production
python quantize.py --input_path out_safety/safety_best.pt

# 5. Export to CoreML (optional)
python coreml.py

Requirements

  • Python 3.8+
  • PyTorch 2.0+
  • See requirements.txt

License

Apache-2.0 - See LICENSE


Made with ❤️ by Mistyoz AI

About

Compact transformer model for detecting harmful/unsafe text prompts

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages