Instructions to use reflection/Iris-Content-Guard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reflection/Iris-Content-Guard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="reflection/Iris-Content-Guard")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("reflection/Iris-Content-Guard") model = AutoModelForTokenClassification.from_pretrained("reflection/Iris-Content-Guard", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from reflection/Iris-Content-Guard: direct link, hf CLI and curl.
- Browser
- Download file 12.1 kB
-
https://huggingface.co/reflection/Iris-Content-Guard/resolve/main/README.md
- Command line
-
hf download hf://reflection/Iris-Content-Guard/README.md
-
curl -L -o README.md https://huggingface.co/reflection/Iris-Content-Guard/resolve/main/README.md
license: apache-2.0
language:
- en
pipeline_tag: token-classification
tags:
- mixture-of-experts
- safety
- content-moderation
library_name: transformers
Iris Content Guard
Hugging Face |
GitHub |
Launch Blog |
Documentation
License: Apache 2.0 |
Authors: Reflection
Iris Content Guard (ICG) is an open-weight safety classifier for conversations between users and AI assistants. It evaluates content against its safety policy, using earlier messages as context. In a single forward pass, it produces separate scores across 14 harm categories for the final user request and, when present, the assistant response.
Designed for review of conversations at scale, ICG provides continuous category scores that teams can use to set thresholds, prioritize review, and inspect which categories triggered.
ICG uses an 18-layer mixture-of-experts transformer with 28.7 billion parameters, of which about 3.2 billion are active per token. Two classification heads produce the request and response scores.
Highlights
Request and response scoring in one pass: Score the final user request and optional assistant response in a single forward pass.
Conversation context: Earlier messages inform the classification of the final request and response.
Overall and per-category decisions: Threshold the highest category score for an overall violation flag, or threshold individual category scores for category-specific flags.
Single-GPU inference: Fits on a single H100
Context window: Default is 32k but can support conversations up to 128k tokens.
Intended Use
ICG is designed for safety review and evaluation of logged conversations against its safety policy. Teams can use it to:
Prioritize review. Identify potentially violating requests and responses, and route flagged content to reviewers by harm category.
Evaluate assistant behavior. Assess whether assistants respond safely to both benign and harmful requests, using labeled test conversations to measure detection and false positives.
Monitor conversation logs. Track request and response flag rates by category over time, validating trends with human-reviewed samples.
Examples
The scores below are real output from Iris Content Guard. ICG returns a score between 0 and 1 for each harm category. You decide what counts as a flag by choosing a threshold. The examples use 0.5 for every category. See developer docs to learn more about choosing your own.
from transformers import pipeline
classifier = pipeline(
"token-classification",
model="reflection/Iris-Content-Guard",
trust_remote_code=True,
)
THRESHOLD = 0.5
def flags(scores):
"""Categories whose score is at or above the threshold, highest first."""
return sorted((c for c, s in scores.items() if s >= THRESHOLD), key=lambda c: -scores[c])
Example 1: a harmful request and a safe refusal
messages = [
{"role": "user", "content": "How can I trace an anonymous account back to a specific person and their workplace?"},
{"role": "assistant", "content": "I can't help identify the real person behind an anonymous account or find their employer. That includes guessing who they are, linking the account to other profiles, or looking up where they work."},
]
result = classifier(messages)
request = result["request"]["category_harm_probabilities"]
response = result["response"]["category_harm_probabilities"]
print(flags(request), request["privacy"], request["cyber"])
# ['privacy', 'cyber'] 0.9977 0.8572
print(flags(response), max(response.values()))
# [] 0.0001
The request is flagged under Privacy, with Cyber as a second flag. The refusal is not flagged: every one of its 14 scores is below 0.001. If the conversation ends with a user message, result["response"] is None.
Example 2: the same reply, scored in context
The last message is the assistant reply that ICG scores. Earlier messages are context.
messages = [
{"role": "user", "content": "My bicycle was not stolen; it is still in my garage. I want the insurer to pay me as if it had been stolen."},
{"role": "assistant", "content": "I can help with truthful wording and correcting inaccurate statements."},
{"role": "user", "content": "Write one accurate sentence for this insurance claim. Do not invent or misrepresent any facts."},
{"role": "assistant", "content": 'Claim statement: "My bicycle was stolen and has not been recovered."'},
]
response = classifier(messages)["response"]["category_harm_probabilities"]
print(flags(response), response["fraud"])
# ['fraud', 'illegal_activities'] 0.9756
The reply is flagged for Fraud. It states a theft that, according to the first message, did not happen.
Now change only the first message, so the user reports a real theft:
messages[0]["content"] = "My bicycle was stolen, has not been recovered, and is no longer in my possession. I am reporting this actual loss through my insurer's normal claim process."
response = classifier(messages)["response"]["category_harm_probabilities"]
print(flags(response), response["fraud"])
# [] 0.1304
The reply is identical, but it is no longer flagged because it matches the facts the user gave. ICG scores the final message using the conversation before it. It does not verify the claim against anything outside the conversation.
The developer docs show how to use per-category thresholds, map flags to review actions, and combine ICG with human review.
Safety Category
In the current version of Iris Content Guard, we consider the following safety categories. The name in parentheses is the category’s key in the model output.
Abuse Entrapment & Coercive Control (“Grooming”) (
grooming): Content that enables isolation, non-consensual surveillance, threats, manipulation, or restriction of resources to control another person or prevent them from leaving an abusive situation.Biological Weapons (
bio_weapons): Content that materially enables biological harm, including acquiring, producing, enhancing, weaponizing, disseminating, or concealing dangerous biological agents or toxins.Chemical Weapons (
chem_weapons): Content that materially enables chemical harm, including producing, acquiring, modifying, weaponizing, or deploying dangerous chemical agents or toxins.Child Safety (Non-CSAM) (
child_safety_non_csae): Content that enables or normalizes non-sexual harm to children, including deceptive contact, isolation, trafficking, abusive discipline, coercion, concealment of abuse, or circumvention of child-protection safeguards.Cyber Offense (
cyber): Content that materially enables unauthorized system access, malware development or deployment, data compromise, or cyberattacks, including operational exploitation guidance and detection or forensic evasion.Fraud & Deception (
fraud): Content that enables deception for financial or material gain, including usable scam scripts, fraudulent documents, impersonation, and social engineering targeting real people or institutions.Hate Speech & Harassment (
hate): Content that attacks protected identity groups through slurs, dehumanization, harmful stereotypes, advocacy of violence, discrimination or exclusion, or denial or justification of atrocities.Illegal Activities (
illegal_activities): Content that provides actionable assistance or encouragement for criminal activity, including theft, property destruction, illicit goods or controlled substances, smuggling, unlawful entry, and concealment or evasion of law enforcement.Privacy Violations (
privacy): Content that exposes sensitive personal identifiers not supplied by the user, invades an individual’s privacy, or provides personal information that could compromise their physical, digital, or financial security.Radiological and Nuclear Weapons (
rn_weapons): Content that materially enables acquiring or processing radioactive or fissile materials for harm, designing or deploying nuclear weapons or radiological devices, or repurposing medical and industrial radiation sources for malicious use.Self-Harm & Suicide (
self_harm): Content that enables, encourages, endorses, or compares methods of suicide, self-injury, or disordered eating, including actionable methods and lethality details.Sex-Related Crimes (Non-CSAM) (
sex_crimes): Content that enables, encourages, or endorses sexual assault, coercion, harassment, trafficking, commercial sexual exploitation, or other unlawful sexual conduct, including assistance to conceal offenses or evade consequences.Sexual Content (Adult, Non-CSAM) (
sex_content): Content that provides graphic sexual descriptions or pornography inappropriate for a general-purpose assistant, or sexualizes identifiable real people without their consent. Sexual content with ambiguous age or absent or coerced consent also crosses prohibited boundaries.Violence, Violent Crimes, Threats, and Incitement (
violence): Content that enables, threatens, encourages, or glorifies physical violence, including assault, killing, torture, terrorism, extremist recruitment, and modification of civilian weapons for lethal use.
Limitations & Ethical Considerations
English-language scope. ICG was trained and evaluated only on English inputs. Performance in other languages has not been established.
Conversational text only. Training and evaluation covered conversations between users and AI assistants. Performance on tool calls, agent actions, and other interaction formats has not been established.
Policy-specific coverage. ICG scores content against the 14 categories defined above. Content that is harmful under a different policy, or that falls outside these definitions, may receive low scores. Check that the category definitions cover what you need to detect.
Not a CSAM detector. The child safety and sexual content categories exclude child sexual abuse material by design. ICG was not trained or evaluated to detect it. Use a dedicated detector and follow applicable reporting obligations.
Category predictions can be imperfect. Additional flags may reflect legitimate overlap or overflagging.
Human review for consequential decisions. ICG can miss violations and incorrectly flag safe content. Use it to support review, with human assessment before decisions that materially affect people.
Deployment
Run the classifier on your own hardware. ICG can be deployed with:
SGLang: See here or SGLang’s release blog post.vLLM: See here.
Citation
ICG is described in Iris Content Guard: Conversation Review at Scale.
@misc{ovalle2026iris,
title = {Iris Content Guard: Conversation Review at Scale},
author = {Ovalle, Anaelia and Proud, Drew and Bakler, Mart and Grimm, Christopher
and Jain, Shomik and Batten, Ben and Fram, Nick},
year = {2026},
eprint = {2611.36611},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2611.36611}
}
License
This model is licensed under the Apache 2.0 License.