{
  "id": "distilbert-nsfw-text-classifier",
  "identity": {
    "family": "distilbert",
    "display_name": "DistilBERT NSFW text classifier",
    "hub_id": "eliasalbouzidi/distilbert-nsfw-text-classifier",
    "api_name": null,
    "revision": null,
    "variants": [],
    "license": "Apache-2.0",
    "commercial_use": true,
    "commercial_use_note": "Apache-2.0 on the repo; a community fine-tune of DistilBERT.",
    "release_date": "2024-04",
    "paper_url": "https://arxiv.org/abs/2412.00064",
    "repo_url": "https://huggingface.co/eliasalbouzidi/distilbert-nsfw-text-classifier"
  },
  "task": {
    "category": "classification",
    "modalities_in": [
      "text"
    ],
    "modalities_out": [
      "labels",
      "scores"
    ],
    "best_at": "Cheap binary safe/nsfw screening of English text such as captions, titles and transcripts.",
    "worst_at": "Non-English text, sarcasm and context-dependent policy categories; it scores sexual content and does not cover other harms."
  },
  "io": {
    "input": {
      "text": {
        "language": "English",
        "tokenizer": "distilbert"
      }
    },
    "output": {
      "labels": [
        "safe",
        "nsfw"
      ],
      "scores": "nsfw_score in [0, 1]; is_nsfw = nsfw_score >= threshold (default 0.5)"
    }
  },
  "mixpeek_wiring": {
    "extractors": [],
    "feature_uris": [],
    "vector_indexes": [],
    "retriever_stages": [
      "classify"
    ],
    "composes_with": [
      "classify task=nsfw on text documents; images and video go to the ViT classifier in the same app"
    ]
  },
  "run": {
    "status": "served",
    "status_reason": "Text half of the mixpeek__content_classifier_v1 Serve app.",
    "serve_apps": [
      "mixpeek__content_classifier_v1"
    ],
    "runtime": "transformers pipeline(\"text-classification\") (DistilBertForSequenceClassification)",
    "weights_format": "safetensors",
    "trust_remote_code": false,
    "size_on_disk_mb": 268,
    "params_millions": 67,
    "preprocessing": "Pipeline tokenizer defaults.",
    "postprocessing": "Softmax over labels (top_k=None); nsfw_score is the max over labels matching nsfw/unsafe/porn/explicit/questionable.",
    "serving_shape": "realtime",
    "batch_size": null,
    "serve_batch": null,
    "scale_to_zero": {
      "min_replicas": 0,
      "max_replicas": 4,
      "idle_timeout_s": 300,
      "memory_gb": 2,
      "num_cpus": 2,
      "num_gpus": 0,
      "cold_start_s": {
        "warm_node_s": null,
        "new_node_s": null,
        "source": null
      },
      "cpu_fallback": true
    }
  },
  "cost": {
    "unmeasured": true,
    "measured": null,
    "note": "No committed throughput or cost measurement for this model."
  },
  "evidence": {
    "unmeasured": true,
    "items": []
  },
  "refs": [
    "hf://eliasalbouzidi/distilbert-nsfw-text-classifier@c0abb7a10abea1f50528885e9e38d51cca935516"
  ],
  "formats": [
    {
      "ref": "hf://eliasalbouzidi/distilbert-nsfw-text-classifier@c0abb7a10abea1f50528885e9e38d51cca935516",
      "format": "safetensors",
      "file": "model.safetensors",
      "loader": "transformers / open_clip from_pretrained; Mixpeek Hub import (api/models/huggingface.py)",
      "supported_today": true
    }
  ],
  "use_cases": [
    "moderation",
    "classification"
  ],
  "recommended": {
    "value": false,
    "for": [],
    "reason": null
  },
  "demos": [],
  "seo": {
    "title": "DistilBERT NSFW text classifier: classification model",
    "description": "DistilBERT NSFW text classifier is a text classification model (Apache-2.0). Served on Mixpeek, scaling to zero when idle.",
    "keywords": [
      "DistilBERT NSFW text classifier",
      "distilbert",
      "classification",
      "eliasalbouzidi/distilbert-nsfw-text-classifier",
      "moderation"
    ],
    "faqs": [
      {
        "q": "What is DistilBERT NSFW text classifier best at?",
        "a": "Cheap binary safe/nsfw screening of English text such as captions, titles and transcripts."
      },
      {
        "q": "What are the limits of DistilBERT NSFW text classifier?",
        "a": "Non-English text, sarcasm and context-dependent policy categories; it scores sexual content and does not cover other harms."
      },
      {
        "q": "Can DistilBERT NSFW text classifier be used commercially?",
        "a": "Yes. Apache-2.0 on the repo; a community fine-tune of DistilBERT."
      },
      {
        "q": "How does DistilBERT NSFW text classifier run on Mixpeek?",
        "a": "Text half of the mixpeek__content_classifier_v1 Serve app."
      }
    ]
  },
  "last_verified": "2026-11-05",
  "sources": [
    "https://huggingface.co/eliasalbouzidi/distilbert-nsfw-text-classifier",
    "https://huggingface.co/api/models/eliasalbouzidi/distilbert-nsfw-text-classifier",
    "server/engine/inference/nsfw/services.py",
    "server/shared/inference/nsfw/models.py",
    "server/shared/retrievers/stages/enrich/classify/services.py"
  ],
  "registry": {
    "mixpeek__content_classifier_v1": {
      "deployment": "mixpeek__content_classifier_v1",
      "service_id": "mixpeek/content-classifier-v1",
      "routes": "engine/inference/nsfw/routes.py",
      "route_prefix": "/mixpeek_content_classifier/v1",
      "enabled": true,
      "description": "Multimodal content (NSFW) classifier. Classifies text, images, and video (via sparse frame sampling) as safe/unsafe. Powers the tenant upload gate and the retriever 'classify' stage. CPU-only, no GPU required.",
      "capabilities": {
        "category": "classification",
        "modality_input": [
          "text",
          "image",
          "video"
        ],
        "modality_output": "structured",
        "supports_batch": false,
        "reranking_mode": null
      },
      "vector_config": null,
      "serve": {
        "min_replicas": 0,
        "max_replicas": 4,
        "idle_timeout_s": 300,
        "target_ongoing_requests": 5,
        "num_cpus": 2,
        "num_gpus": 0,
        "memory_gb": 2,
        "pinnable": false,
        "placement": "worker",
        "enabled": true
      },
      "interactive_twin": false,
      "interactive_serve": null,
      "schemas": {
        "input": "shared.inference.nsfw.models.InferenceRequest",
        "output": "shared.inference.nsfw.models.InferenceResponse",
        "config": "shared.inference.nsfw.models.InferenceConfigs"
      }
    }
  },
  "templates": [],
  "usage": {
    "namespaces": null,
    "collections": null,
    "uncounted": true,
    "templates": 0,
    "counted_at": null,
    "source": null
  },
  "facets": {
    "status": "served",
    "category": "classification",
    "family": "distilbert",
    "license": "Apache-2.0",
    "commercial_use": true,
    "modalities_in": [
      "text"
    ],
    "modalities_out": [
      "labels",
      "scores"
    ],
    "use_cases": [
      "moderation",
      "classification"
    ],
    "recommended": false,
    "release_date": "2024-04",
    "params_millions": 67,
    "size_on_disk_mb": 268,
    "vector_dims": null,
    "vector_distance": null,
    "weights_format": "safetensors",
    "formats": [
      "safetensors"
    ],
    "loadable_today": true,
    "trust_remote_code": false,
    "cpu_fallback": true,
    "num_gpus": 0,
    "memory_gb": 2,
    "min_replicas": 0,
    "serving_shape": "realtime",
    "served": true,
    "ref_schemes": [
      "hf"
    ],
    "has_evidence": false,
    "cost_measured": false,
    "template_count": 0,
    "usage_namespaces": null,
    "usage_collections": null,
    "usage_uncounted": true,
    "has_demo": false,
    "rank_score": 3
  },
  "rank_score": 3
}
