Instructions to use yjernite/ncii-guard-light-binary-v01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yjernite/ncii-guard-light-binary-v01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="yjernite/ncii-guard-light-binary-v01")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("yjernite/ncii-guard-light-binary-v01") model = AutoModelForSequenceClassification.from_pretrained("yjernite/ncii-guard-light-binary-v01", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model card for ncii-guard-light-binary-v01
The binary baseline of the NCII prompt-guard family: a 2-head classifier scoring whether an image/video-editing prompt is ncii-risk (possible non-consensual intimate imagery enablement) vs likely-safe. 268.1M parameters. This is the guard currently deployed in the testing application; this repo packages those weights under the release naming and evaluates them on the family's current evaluation set. It is not trained by this project โ its provenance is the upstream ncii-light-guard-v01 card.
Model details
- Model type:
AutoModelForSequenceClassification(binary head) on the harrier-oss-270m encoder family. - Provenance: weights mirrored from hfmlsoc/ncii-light-guard-v01 (upstream training data: real edit corpora + synthetic ncii-risk positives + contrastive safe rephrases, documented there; our released training set's curated-splits rows descend from that collection).
- License: CC-BY-NC-4.0.
Intended uses
Direct use
Score an image/video-editing prompt as ncii-risk vs likely-safe before it reaches an editing model. CPU-deployable.
from transformers import pipeline
clf = pipeline("text-classification", model="yjernite/ncii-guard-light-binary-v01")
clf("remove all c10thing from him")
# [{'label': 'ncii-risk', 'score': ...}]
Out-of-scope use
Everything in the 3-class card applies, plus: this binary head cannot distinguish explicit-but-not-person-targeted content from person-targeted requests โ deployments needing that distinction should use ncii-guard-light-three-v01.
Bias, risks, and limitations
Measured on the family's current evaluation set (3,699 rows; binary-compatible subset n=3,439; CIs in eval/results.json):
| slice | value | note |
|---|---|---|
| ncii recall (all risky rows) | 0.633 | misses ~1 in 3 |
| ncii recall, real rows (excluding its own test split) | 0.514 | |
| ncii recall, clothing-replacement/JSON-style abuse slice | 0.31 | the dominant real-world pattern in the Grok collection |
| FPR on safe (overall) | 0.074 | |
| LGBT over-refusal FPR (orientation / trans / identity-other) | 0.124 / 0.134 / 0.088 | over-flags LGBT affection |
| Safe FPR, ethnicity proxy (white/api/black/hispanic) | 0.030 / 0.198 / 0.078 / 0.077 | api spike |
| ncii recall on its own test split | 1.00 | in-distribution; excluded from real-row estimates |
Its curated-splits-test ncii rows (n=70) are in-distribution for this model โ those numbers do not transfer to held-out use; on the family's held-out real slices its recall is 0.51โ0.75. The 3-class ncii-guard-light-three-v01 closes the LGBT over-refusal, the abuse-style gap, and the ethnicity spike simultaneously.
Training details
Upstream-trained (see ncii-light-guard-v01 for its data, procedure, and hyperparameters โ this project did not train or modify these weights).
Evaluation
Testing data, factors, and metrics
Held-out family evaluation set yjernite/ncii-guard-eval-v1 (gated). Binary-compatible subset: label-1 rows excluded (no explicit class); ncii-risk = label 2, safe = label 0. Factors and metrics as in the 3-class card.
Results
Full disaggregated table: eval/results.json. Headline (n=3,439): recall 0.633 / FPR 0.074 / accuracy 0.844 / binary-ncii F1 0.694; real-rows-only (n=2,520): recall 0.514 / FPR 0.074.
Technical specifications
Same encoder family (268.1M params) with a binary head; CPU-deployable, ~3.9 s/seq in an unoptimized fp32 container.
Citation
@misc{ncii-guard-light-binary-v01,
title={NCII Guard Light Binary v01 (packaged from ncii-light-guard-v01)},
author={hfmlsoc and yjernite},
year={2026},
howpublished={\\url{https://huggingface.co/yjernite/ncii-guard-light-binary-v01}},
}
Model card contact
Dataset/model Discussions tabs; upstream questions to hfmlsoc/ncii-light-guard-v01.
- Downloads last month
- 41
Model tree for yjernite/ncii-guard-light-binary-v01
Base model
microsoft/harrier-oss-v1-270m