Update README.md
Browse files123---license: isc---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186---language: enlicense: mittags:- moderation- safety- content-moderation- transformer- chain-of-thought- reasoninglibrary_name: pytorchpipeline_tag: text-classification---# GreesyGuard (GreesyGPT)GreesyGuard is a lightweight **reasoning-based content moderation model** designed to analyze user messages, evaluate harm potential, and produce structured moderation verdicts.Unlike traditional classifiers, GreesyGuard performs **step‑by‑step analysis inside `<think>` blocks** before generating the final moderation decision.This improves transparency and makes moderation decisions easier to audit.---# Model OverviewGreesyGuard is a Transformer model specialized for safety classification tasks such as:- harassment detection- hate speech- spam detection- misinformation identification- crisis detectionInstead of directly outputting a label, the model:1. Analyzes the message2. Evaluates context and intent3. Identifies policy violations4. Outputs a final moderation verdict---# Moderation LabelsThe model produces the following moderation categories:SAFESPAMMISINFORMATIONHARASSMENTHATE_SPEECHCRISIS_REFERRALUNSAFEExample output:```## Verdict**HARASSMENT**```---# Model Architecture| Parameter | Value ||-----------|------|Layers | 12 |Heads | 12 |Embedding Dimension | 768 |Context Window | 12,000 tokens |Tokenizer | o200k_base (extended) |Vocabulary Size | 8192 |Key architectural features:- Transformer decoder architecture- Rotary Positional Embeddings (RoPE)- KV‑Cache optimized inference- Structured chat‑template training- Markdown reasoning output---# Reasoning ModesThe model supports configurable reasoning budgets:| Mode | Think Tokens | Purpose ||-----|-------------|--------|NONE | 200 | Fast moderation |LOW | 512 | Balanced reasoning |MEDIUM | 1536 | Detailed analysis |HIGH | 3072 | Maximum review depth |Higher modes produce more thorough moderation reasoning but increase latency.---# Example Usage```pythonfrom model import GreesyGPT, generate_moderation, ReasoningMode, OutputFormatmodel = GreesyGPT()result = generate_moderation(model,prompt="You're worthless and nobody likes you.",mode=ReasoningMode.MEDIUM,output_format=OutputFormat.JSON)print(result["verdict_fmt"])```Example structured output:```{"verdict": "HARASSMENT","severity": 3,"confidence_hint": "medium"}```---# Training FormatTraining data follows a structured conversation template:```<|system|>moderation instructions</|system|><|user|>message to review</|user|><|assistant|><think>step-by-step reasoning</think>verdict<|endoftext|>```Only assistant tokens contribute to the training loss.---# Intended UseGreesyGuard is designed for:- social media moderation- comment filtering- forum safety pipelines- research in explainable moderation systems---# Limitations- The reasoning output may appear confident but still be incorrect.- Sarcasm and cultural context can be misinterpreted.- The model should **not be used for fully automated enforcement** without human oversight.---# SafetyModeration systems should always include **human review for high‑impact actions** such as account suspension or legal escalation.---# AuthorsCreated by the **GreesyGuard Project**Author: NicatGitHub: https://github.com/Nicat-dcw/GreesyGuard
README.md+186-3