--- language: en base_model: jhu-clsp/ettin-encoder-400m pipeline_tag: text-classification library_name: pytorch tags: - reddit - distillation - multi-head-classification --- # Online Integrity Classifier **Reply intent, safety, and spam signals** This classifier labels a forum reply in context across five dimensions. Its labels include spam and AI-like writing style, which can help prioritize replies for review. It was trained and evaluated on Reddit replies. It uses an [Ettin 400M encoder](https://huggingface.co/jhu-clsp/ettin-encoder-400m) with masked mean pooling and a separate softmax head for intent, style, harm, quality, and tone. The base encoder is MIT-licensed. ## Training and evaluation The student was trained on the teacher model's soft label distributions for 61,097 examples. Validation used 3,088 examples with no thread overlap between training and validation. The release criterion was at least 70% top-1 agreement with the teacher model across all five heads. | Head | Validation agreement | | --- | ---: | | Intent | 72.4% | | Style | 78.2% | | Harm | 97.7% | | Quality | 80.9% | | Tone | 94.7% | A separate throughput benchmark measured 217.2 rows/s over 16,384 rows at batch size 64 on the training GPU using BF16 autocast. ## Local inference Download the repository to a directory, install `torch`, `transformers>=4.48`, and `safetensors`, and run from that directory. The bundled loader restores the encoder and all five heads. ```python from inference import classify, load model, tokenizer, groups = load(".", device="cpu") labels = classify( model, tokenizer, groups, community="Gardening", title="Basil on a windowsill", replying_to="How often should I water it?", reply="Check the soil first. Water it when the top feels dry.", ) print({group: result["primary"] for group, result in labels.items()}) ``` Pass the forum or community name as `community`. For Reddit inputs, use `subreddit` with the bare subreddit name to reproduce the training input format. For top-level replies, pass the post title and body together as `replying_to`. For nested replies, pass the immediate parent comment. The tokenizer truncates the context and reply pair to 384 tokens. The label vocabulary is in `info.json`. ## Limitations The reported scores measure top-1 agreement with the teacher model on held-out Reddit replies. The student can inherit the teacher model's errors and the training corpus's biases. Use human review for consequential moderation decisions. The `ai_like` label measures a style category and cannot establish who authored a reply.