Text Classification
Transformers
Safetensors
English
guardeval_moderator
feature-extraction
moderation
safety
guardrails
content-moderation
modernbert
multi-task
custom_code
Instructions to use adityasaw88/modernbertguard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adityasaw88/modernbertguard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="adityasaw88/modernbertguard", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("adityasaw88/modernbertguard", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download task_config.json from adityasaw88/modernbertguard: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/adityasaw88/modernbertguard/resolve/main/task_config.json
- Command line
-
hf download hf://adityasaw88/modernbertguard/task_config.json
-
curl -L -o task_config.json https://huggingface.co/adityasaw88/modernbertguard/resolve/main/task_config.json
1.68 kB
| { | |
| "model_id": "answerdotai/ModernBERT-large", | |
| "max_len": 256, | |
| "lambda_cat": 1.0, | |
| "attn": "sdpa", | |
| "bin_labels": [ | |
| "safe", | |
| "unsafe" | |
| ], | |
| "bin2i": { | |
| "safe": 0, | |
| "unsafe": 1 | |
| }, | |
| "tax2i": { | |
| "S1": 0, | |
| "S2": 1, | |
| "S3": 2, | |
| "S4": 3, | |
| "S5": 4, | |
| "S6": 5, | |
| "S8": 6, | |
| "S9": 7, | |
| "S10": 8, | |
| "S12": 9, | |
| "S13": 10, | |
| "S14": 11, | |
| "S16": 12, | |
| "S19": 13, | |
| "S20": 14, | |
| "S21": 15, | |
| "S22": 16, | |
| "S23": 17 | |
| }, | |
| "i2tax": { | |
| "0": "S1", | |
| "1": "S2", | |
| "2": "S3", | |
| "3": "S4", | |
| "4": "S5", | |
| "5": "S6", | |
| "6": "S8", | |
| "7": "S9", | |
| "8": "S10", | |
| "9": "S12", | |
| "10": "S13", | |
| "11": "S14", | |
| "12": "S16", | |
| "13": "S19", | |
| "14": "S20", | |
| "15": "S21", | |
| "16": "S22", | |
| "17": "S23" | |
| }, | |
| "tax_names": { | |
| "S1": "Violence", | |
| "S2": "Sexual", | |
| "S3": "Criminal Planning/Confessions", | |
| "S4": "Guns and Illegal Weapons", | |
| "S5": "Controlled/Regulated Substances", | |
| "S6": "Suicide and Self Harm", | |
| "S7": "Sexual (minor)", | |
| "S8": "Hate/Identity Hate", | |
| "S9": "PII/Privacy", | |
| "S10": "Harassment", | |
| "S11": "Threat", | |
| "S12": "Profanity", | |
| "S13": "Needs Caution", | |
| "S14": "Immoral/Unethical", | |
| "S15": "Manipulation", | |
| "S16": "Fraud/Deception", | |
| "S17": "Malware", | |
| "S18": "High Risk Gov Decision Making", | |
| "S19": "Political/Misinformation/Conspiracy", | |
| "S20": "Copyright/Trademark/Plagiarism", | |
| "S21": "Unauthorized Advice", | |
| "S22": "Illegal Activity", | |
| "S23": "Other" | |
| }, | |
| "dropped_codes": [ | |
| "S7", | |
| "S11", | |
| "S15", | |
| "S17", | |
| "S18" | |
| ], | |
| "epochs": 3, | |
| "batch": 32, | |
| "lr": 6e-05, | |
| "trained_at": "2026-08-29T07:30:13" | |
| } |