lelloman/bert-torrent-nsfw
0
BERT Torrent NSFW Classifier
A BERT-tiny binary classifier for detecting NSFW content in torrent names and file listings.
Model Details
- Architecture: BERT-tiny (2 layers, 128 hidden, 2 attention heads)
- Task: Binary classification (safe vs nsfw)
- Input: Torrent name + top 3 filenames by size
- Output: Logits for [safe, nsfw]
- Format: ONNX (embedded weights)
- Size: ~17MB
Usage
This model is designed to be used with mimmo, a Rust-based torrent content classifier.
# With mimmo CLI
mimmo --detect-nsfw "Torrent.Name.Here"Training
Trained on a dataset of ~10k torrent names labeled as safe/nsfw using:
- BERT-tiny base model
- Binary cross-entropy loss
- AdamW optimizer
Performance
The model is used as a fallback after keyword and pattern matching stages:
- Keywords - HashSet lookup for explicit terms (confidence: 0.95)
- Patterns - Regex for JAV codes, studio patterns (confidence: 0.90)
- ML (this model) - For ambiguous cases
Limitations
- Trained primarily on English torrent names
- May not catch all NSFW content, especially with obfuscated names
- Should be used in combination with keyword/pattern stages for best results
License
MIT
