Instructions to use hidan616/hermes_spam_filter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hidan616/hermes_spam_filter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hidan616/hermes_spam_filter", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("hidan616/hermes_spam_filter", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Hermes Spam Filter
A lightweight Transformer-based spam classifier designed for Discord, live chat, streaming chats, gaming communities, and other high-volume conversational environments.
Hermes is designed as a Layer-1 spam filtering model. Its purpose is to process large volumes of incoming messages quickly and remove obvious unwanted traffic before more expensive moderation systems analyze the remaining messages.
It is not intended to be a universal spam, abuse, phishing, or content-moderation model.
Model Overview
Model ID: hidan616/hermes_spam_filter
Task: Binary sequence classification
Classes:
0βHAM1βSPAM
Architecture: Lightweight Transformer Encoder
Parameters: 1,742,465
Model size: Approximately 7 MB
Language: English
Tokenizer: Custom BPE Tokenizer
Primary environments:
- Discord
- Live-stream chat
- Gaming communities
- Community servers
- Real-time messaging
- Chat applications
- High-volume moderation pipelines
Architecture
Hermes uses a compact Transformer encoder architecture optimized for low-latency binary spam classification.
| Component | Configuration |
|---|---|
Embedding dimension (d_model) |
128 |
| Attention heads | 4 |
| Encoder layers | 2 |
| Maximum sequence length | 512 |
| Tokenizer | Custom BPE Tokenizer |
| Parameters | 1,742,465 |
| Classification task | Binary |
Architecture characteristics
- Embedding dimension: 128
- Attention heads: 4
- Encoder layers: 2
- Maximum sequence length: 512 tokens
- Custom BPE tokenizer
- Binary HAM/SPAM classification
The architecture deliberately uses a small embedding dimension and only two Transformer encoder layers to keep the model computationally compact.
Hermes does not attempt to model language at the scale of large general-purpose Transformer models. It is specialized for its target task:
Fast spam and unwanted-message filtering.
How to use
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL_ID = "hidan616/hermes_spam_filter"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForSequenceClassification.from_pretrained(
MODEL_ID,
trust_remote_code=True
)
model.eval()
text = "Claim your exclusive special reserved reward by confirming."
cleaned_text = model.normalize_text(text)
inputs = tokenizer(cleaned_text, return_tensors="pt")
logits = model(**inputs).logits
score = torch.sigmoid(logits).squeeze().item()
label = "SPAM" if score >= 0.5 else "HAM"
print(f"Label: {label}")
print(f"Score: {score:.4f}")
Why Hermes Exists
Large Transformer models can provide strong language understanding, but running a large model against every message can be unnecessarily expensive in high-volume messaging environments.
A Discord server, live-streaming platform, gaming community, or chat application may process thousands of messages continuously.
Most of those messages do not require expensive analysis.
Hermes is designed to handle the first filtering stage:
Incoming message
β
βΌ
βββββββββββββββββββββββ
β Hermes Layer 1 β
β Fast spam filter β
ββββββββββββ¬βββββββββββ
β
βββββββ΄ββββββ
β β
obvious uncertain
unwanted message
β β
βΌ βΌ
filter Layer 2+
β
βΌ
deeper moderation
- Downloads last month
- 201