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 β†’ HAM
  • 1 β†’ 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
Safetensors
Model size
1.74M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support