llm-semantic-router / mlcommons-safety-classifier-level1-binary

huggingface.co
Total runs: 63
24-hour runs: 0
7-day runs: -1
30-day runs: 58
Model's Last Updated: January 22 2026
text-classification

Introduction of mlcommons-safety-classifier-level1-binary

Model Details of mlcommons-safety-classifier-level1-binary

MLCommons AI Safety Classifier - Level 1 (Binary)

A LoRA-finetuned multilingual BERT model for binary content safety classification (safe/unsafe), following the MLCommons AI Safety Hazard Taxonomy.

Model Description

This is Level 1 of a hierarchical safety classification system:

  • Level 1 (this model) : Binary classification (safe vs unsafe)
  • Level 2 : 9-class hazard category classification

The model uses mmBERT (Multilingual ModernBERT) as the base, supporting 1800+ languages.

Training Results
Metric Value
Recall 86.1%
F1 Score 86.5%
False Positive Rate 13.1%
Accuracy 86.6%
Training Data
Model Architecture & Training
Base Model
LoRA Configuration
Parameter Value
Rank (r) 32
Alpha 64
Dropout 0.1
Target Modules attn.Wqkv , attn.Wo , mlp.Wi , mlp.Wo
Trainable Parameters 6.76M (2.15%)
Training Hyperparameters
Parameter Value
Epochs 10
Batch Size 64
Learning Rate 3e-4
Optimizer AdamW
Scheduler Linear warmup
Hardware & Environment
Component Specification
GPU AMD Instinct MI300X
VRAM 192GB HBM3
Platform ROCm 6.2
Container rocm/pytorch:rocm6.2_ubuntu22.04_py3.10_pytorch_release_2.3.0
Training Time ~4 minutes
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel

# Load base model and tokenizer
base_model = "jhu-clsp/mmBERT-base"
tokenizer = AutoTokenizer.from_pretrained("llm-semantic-router/mlcommons-safety-classifier-level1-binary")
model = AutoModelForSequenceClassification.from_pretrained(base_model, num_labels=2)
model = PeftModel.from_pretrained(model, "llm-semantic-router/mlcommons-safety-classifier-level1-binary")

# Classify
text = "How do I make a cake?"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item()
label = "safe" if prediction == 0 else "unsafe"
print(f"Classification: {label}")
Label Mapping
{
  "safe": 0,
  "unsafe": 1
}
Intended Use

This model is designed for:

  • Content moderation pipelines
  • LLM input/output safety filtering
  • Jailbreak and prompt injection detection
  • First-stage filtering before detailed hazard classification
Limitations
  • Optimized for English but supports 1800+ languages via mmBERT
  • Should be used as part of a broader safety system
  • May require domain-specific fine-tuning for specialized applications
Citation
@misc{mlcommons-safety-classifier,
  title={MLCommons AI Safety Classifier},
  author={LLM Semantic Router Team},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/llm-semantic-router/mlcommons-safety-classifier-level1-binary}
}
License

Apache 2.0

Runs of llm-semantic-router mlcommons-safety-classifier-level1-binary on huggingface.co

63
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
58
30-day runs

More Information About mlcommons-safety-classifier-level1-binary huggingface.co Model

More mlcommons-safety-classifier-level1-binary license Visit here:

https://choosealicense.com/licenses/apache-2.0

mlcommons-safety-classifier-level1-binary huggingface.co

mlcommons-safety-classifier-level1-binary huggingface.co is an AI model on huggingface.co that provides mlcommons-safety-classifier-level1-binary's model effect (), which can be used instantly with this llm-semantic-router mlcommons-safety-classifier-level1-binary model. huggingface.co supports a free trial of the mlcommons-safety-classifier-level1-binary model, and also provides paid use of the mlcommons-safety-classifier-level1-binary. Support call mlcommons-safety-classifier-level1-binary model through api, including Node.js, Python, http.

mlcommons-safety-classifier-level1-binary huggingface.co Url

https://huggingface.co/llm-semantic-router/mlcommons-safety-classifier-level1-binary

llm-semantic-router mlcommons-safety-classifier-level1-binary online free

mlcommons-safety-classifier-level1-binary huggingface.co is an online trial and call api platform, which integrates mlcommons-safety-classifier-level1-binary's modeling effects, including api services, and provides a free online trial of mlcommons-safety-classifier-level1-binary, you can try mlcommons-safety-classifier-level1-binary online for free by clicking the link below.

llm-semantic-router mlcommons-safety-classifier-level1-binary online free url in huggingface.co:

https://huggingface.co/llm-semantic-router/mlcommons-safety-classifier-level1-binary

mlcommons-safety-classifier-level1-binary install

mlcommons-safety-classifier-level1-binary is an open source model from GitHub that offers a free installation service, and any user can find mlcommons-safety-classifier-level1-binary on GitHub to install. At the same time, huggingface.co provides the effect of mlcommons-safety-classifier-level1-binary install, users can directly use mlcommons-safety-classifier-level1-binary installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mlcommons-safety-classifier-level1-binary install url in huggingface.co:

https://huggingface.co/llm-semantic-router/mlcommons-safety-classifier-level1-binary

Url of mlcommons-safety-classifier-level1-binary

mlcommons-safety-classifier-level1-binary huggingface.co Url

Provider of mlcommons-safety-classifier-level1-binary huggingface.co

llm-semantic-router
ORGANIZATIONS

Other API from llm-semantic-router