CoolFace
Modelpublic

wrmcodeblocks/contentmoderator

sourceHugging Faceotherupdated 3mo agoView on Hugging Face
0likes16downloads
Model Card

Content Moderator LoRA

This model is a LoRA adapter for adult-content moderation. It is intended to classify English text snippets as either allowed or blocked according to a narrow adult-content policy.

The expected assistant output is:

  • —ok for allowed content.
  • —Blocked: <brief reason> for content that should be blocked.

The model is designed for moderation decisions over text snippets such as user submissions, generated assistant responses, content metadata, and web or HTML-derived text. It is not a general-purpose safety classifier.

Quickstart

Prompt the model with the moderation instruction and the text to classify:

text
You are an adult content moderator. Respond only with 'Blocked: [specific reason]' if adult content is detected, otherwise 'ok'.

User: Beach trip packing: towel, sunscreen, swimsuit.
Assistant: ok

For content that matches the adult-content policy, the response should start with Blocked: and include a short reason:

text
User: Call 1 800 HOT 69 for steamy adult chat lines open 24/7.
Assistant: Blocked: Vulgar/slang

Model Details

  • —Base model: mlx-community/Qwen2.5-7B-Instruct-bf16
  • —Adaptation method: LoRA adapter
  • —Runtime/training family: MLX / MLX-LM style configuration
  • —Language: English
  • —Task framing: Chat-style instruction following that emits a compact moderation label
  • —Primary label set: ok and Blocked: <reason>

Intended Use

Use this model as a lightweight adult-content gate in an application pipeline. Consumers should parse the text response for an allowed or blocked decision.

Recommended uses:

  • —Flagging sexual or adult-oriented text before it is played, summarized, stored, or forwarded.
  • —Filtering generated responses before returning them to end users.
  • —Moderating content metadata after HTML-to-text normalization.
  • —Acting as one layer in a broader moderation system with logging and fallback review.

Out-of-Scope Use

This model should not be used as the only control for high-stakes moderation. It is also not designed to classify:

  • —Hate, harassment, violence, extremism, self-harm, fraud, or medical/legal risk.
  • —Image, audio, or video content directly.
  • —Content in languages other than English.
  • —Child-safety risk beyond what appears incidentally in the adult-content training examples.
  • —Jurisdiction-specific legality or age-of-consent decisions.

Training Data

The training split contains 4,383 chat-format examples:

SplitExamples`ok``blocked`
Train3,5062,1291,377
Validation877541336
Total4,3832,6701,713

The validation split is approximately 80/20 by example count. The examples include short synthetic prompts, longer content descriptions, web-derived text, and borderline moderation cases. Some source text contains HTML, so downstream pipelines should normalize by removing tags, decoding entities, replacing separators with spaces, and collapsing whitespace.

Blocked examples are focused on adult-content categories such as sexual acts or arousal, sexual slang, secret affairs or erotic intimacy, undressing or nudity, anatomical or explicit sex-education content, and sexually framed adult chat or media descriptions.

Allowed examples include routine questions, news or media summaries, family content, cooking, health and wellness, clothing references without sexual framing, and non-explicit discussions where the training labels considered the content acceptable.

Training Procedure

Training configuration:

ParameterValue
Base modelmlx-community/Qwen2.5-7B-Instruct-bf16
Iterations2,625
Batch size4
Learning rate2e-5
LoRA rank8
LoRA alpha16
LoRA dropout0.05
LoRA scale2.0
Evaluation interval200 steps
Save interval430 steps
Adapter pathadapters

LoRA target modules:

  • —self_attn.q_proj
  • —self_attn.v_proj
  • —self_attn.k_proj
  • —self_attn.o_proj
  • —mlp.up_proj
  • —mlp.down_proj
  • —mlp.gate_proj

Prompt Format

Use a concise moderation instruction and place the text to classify in the user message.

text
System: You are an adult content moderator. Respond only with 'Blocked: [specific reason]' if adult content is detected, otherwise 'ok'.

User: <text to moderate>
Assistant:

Consumers should treat the output as a label, not as free-form advice. In production, prefer parsing a leading ok or leading blocked prefix after trimming whitespace and normalizing case.

Evaluation

No benchmark metrics are included for this adapter. The available artifacts include a validation split, but do not include measured accuracy, precision, recall, F1, false-positive rate, false-negative rate, calibration, or demographic slice metrics.

Before public deployment, evaluate at minimum:

  • —Binary accuracy on the validation split.
  • —Precision, recall, and F1 for the blocked class.
  • —False-positive rate on benign health, family, education, clothing, art, and media-description examples.
  • —False-negative rate on explicit adult content and euphemistic adult-content prompts.
  • —Robustness to speech-to-text transcription errors, HTML artifacts, casing, punctuation, and short ambiguous inputs.

Limitations and Biases

  • —The policy is intentionally narrow and adult-content focused. It will not provide comprehensive safety moderation.
  • —Training labels include policy-specific judgments and borderline cases, so other applications may disagree with some allowed or blocked decisions.
  • —Some benign sexual-health, puberty, family, clothing, art, or relationship content may be overblocked.
  • —Some euphemistic, coded, misspelled, or context-dependent adult content may be underblocked.
  • —The data appears English-only and has not been validated across dialects, cultures, age groups, or demographic slices.
  • —The model emits text labels rather than calibrated probabilities.
  • —The adapter should be used with logging, fallback moderation, and human review for sensitive decisions.

Safety and Privacy Notes

Do not publish the raw training data without a separate review of privacy, source licensing, and suitability for public distribution. Some examples include long media or web descriptions, URLs, generated adult-content prompts, and sensitive moderation edge cases.

Because the model and data are about adult-content moderation, the model release should be considered not suitable for all audiences if examples or training files are included.

License

The YAML metadata uses license: other as a placeholder. Replace it with the final model and data license before publishing publicly on Hugging Face.

Also verify the license and redistribution terms of the base model, mlx-community/Qwen2.5-7B-Instruct-bf16, and any source datasets before release.

Citation

No paper or formal citation is provided for this adapter.