Transformers
Safetensors
PEFT
Generated from Trainer
trl
sft
lora
safety-classifier
constitutional-ai
hf_jobs
trackio
Instructions to use imadreamerboy/constitutional-safety-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use imadreamerboy/constitutional-safety-classifier with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("imadreamerboy/constitutional-safety-classifier", device_map="auto") - PEFT
How to use imadreamerboy/constitutional-safety-classifier with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
| { | |
| "model": "imadreamerboy/constitutional-safety-classifier", | |
| "base_model": "Qwen/Qwen3-1.7B", | |
| "paper_alignment": { | |
| "paper": "Constitutional Classifiers (arXiv:2501.18837)", | |
| "note": "Exact Anthropic jailbreaks and Claude.ai traffic are not public. Public proxies evaluate held-out accuracy, harmful recall/ASR-proxy, and over-refusal/FPR per Section 5." | |
| }, | |
| "datasets": { | |
| "heldout_constitutional_classifier_data": { | |
| "n": 500, | |
| "safe_n": 250, | |
| "unsafe_n": 250, | |
| "accuracy": 0.802, | |
| "unsafe_precision": 0.7381703470031545, | |
| "unsafe_recall_tpr": 0.936, | |
| "unsafe_f1": 0.8253968253968254, | |
| "over_refusal_fpr": 0.332, | |
| "missed_unsafe_fnr_asr_proxy": 0.064, | |
| "mean_unsafe_score": 0.644300048828125, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 167, | |
| 83 | |
| ], | |
| [ | |
| 16, | |
| 234 | |
| ] | |
| ], | |
| "auroc": 0.929824, | |
| "auprc": 0.9352743249330117, | |
| "threshold_sweep": { | |
| "max_tpr_at_fpr<=0.005": { | |
| "threshold": 0.997, | |
| "tpr": 0.22, | |
| "fpr": 0.0 | |
| }, | |
| "max_tpr_at_fpr<=0.01": { | |
| "threshold": 0.997, | |
| "tpr": 0.22, | |
| "fpr": 0.0 | |
| }, | |
| "max_tpr_at_fpr<=0.05": { | |
| "threshold": 0.981, | |
| "tpr": 0.728, | |
| "fpr": 0.032 | |
| } | |
| } | |
| }, | |
| "toxicchat_toxicity": { | |
| "n": 500, | |
| "safe_n": 250, | |
| "unsafe_n": 250, | |
| "accuracy": 0.9, | |
| "unsafe_precision": 0.8571428571428571, | |
| "unsafe_recall_tpr": 0.96, | |
| "unsafe_f1": 0.9056603773584906, | |
| "over_refusal_fpr": 0.16, | |
| "missed_unsafe_fnr_asr_proxy": 0.04, | |
| "mean_unsafe_score": 0.609771484375, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 210, | |
| 40 | |
| ], | |
| [ | |
| 10, | |
| 240 | |
| ] | |
| ], | |
| "auroc": 0.973272, | |
| "auprc": 0.9734237903869332 | |
| }, | |
| "toxicchat_jailbreak_subset": { | |
| "n": 66, | |
| "safe_n": 0, | |
| "unsafe_n": 66, | |
| "accuracy": 0.9848484848484849, | |
| "unsafe_precision": 1.0, | |
| "unsafe_recall_tpr": 0.9848484848484849, | |
| "unsafe_f1": 0.9923664122137404, | |
| "over_refusal_fpr": 0.0, | |
| "missed_unsafe_fnr_asr_proxy": 0.015151515151515152, | |
| "mean_unsafe_score": 0.9376479640151515, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 0, | |
| 0 | |
| ], | |
| [ | |
| 1, | |
| 65 | |
| ] | |
| ], | |
| "auroc": null, | |
| "auprc": null | |
| }, | |
| "aegis2_prompt_only": { | |
| "n": 500, | |
| "safe_n": 250, | |
| "unsafe_n": 250, | |
| "accuracy": 0.752, | |
| "unsafe_precision": 0.6769662921348315, | |
| "unsafe_recall_tpr": 0.964, | |
| "unsafe_f1": 0.7953795379537953, | |
| "over_refusal_fpr": 0.46, | |
| "missed_unsafe_fnr_asr_proxy": 0.036, | |
| "mean_unsafe_score": 0.70212744140625, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 135, | |
| 115 | |
| ], | |
| [ | |
| 9, | |
| 241 | |
| ] | |
| ], | |
| "auroc": 0.9228399999999999, | |
| "auprc": 0.9148293600951266 | |
| }, | |
| "aegis2_prompt_response": { | |
| "n": 500, | |
| "safe_n": 250, | |
| "unsafe_n": 250, | |
| "accuracy": 0.778, | |
| "unsafe_precision": 0.698005698005698, | |
| "unsafe_recall_tpr": 0.98, | |
| "unsafe_f1": 0.8153078202995009, | |
| "over_refusal_fpr": 0.424, | |
| "missed_unsafe_fnr_asr_proxy": 0.02, | |
| "mean_unsafe_score": 0.69241552734375, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 144, | |
| 106 | |
| ], | |
| [ | |
| 5, | |
| 245 | |
| ] | |
| ], | |
| "auroc": 0.93728, | |
| "auprc": 0.9249390018989783 | |
| }, | |
| "beavertails_prompt_response": { | |
| "n": 500, | |
| "safe_n": 250, | |
| "unsafe_n": 250, | |
| "accuracy": 0.814, | |
| "unsafe_precision": 0.7460815047021944, | |
| "unsafe_recall_tpr": 0.952, | |
| "unsafe_f1": 0.836555360281195, | |
| "over_refusal_fpr": 0.324, | |
| "missed_unsafe_fnr_asr_proxy": 0.048, | |
| "mean_unsafe_score": 0.652507080078125, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 169, | |
| 81 | |
| ], | |
| [ | |
| 12, | |
| 238 | |
| ] | |
| ], | |
| "auroc": 0.9336800000000001, | |
| "auprc": 0.9187361971235515 | |
| }, | |
| "or_bench_hard_overrefusal_expected_safe": { | |
| "n": 500, | |
| "safe_n": 500, | |
| "unsafe_n": 0, | |
| "accuracy": 0.05, | |
| "unsafe_precision": 0.0, | |
| "unsafe_recall_tpr": 0.0, | |
| "unsafe_f1": 0.0, | |
| "over_refusal_fpr": 0.95, | |
| "missed_unsafe_fnr_asr_proxy": 0.0, | |
| "mean_unsafe_score": 0.890638671875, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 25, | |
| 475 | |
| ], | |
| [ | |
| 0, | |
| 0 | |
| ] | |
| ], | |
| "auroc": null, | |
| "auprc": null | |
| }, | |
| "or_bench_toxic_expected_unsafe": { | |
| "n": 500, | |
| "safe_n": 0, | |
| "unsafe_n": 500, | |
| "accuracy": 0.996, | |
| "unsafe_precision": 1.0, | |
| "unsafe_recall_tpr": 0.996, | |
| "unsafe_f1": 0.9979959919839679, | |
| "over_refusal_fpr": 0.0, | |
| "missed_unsafe_fnr_asr_proxy": 0.004, | |
| "mean_unsafe_score": 0.979162109375, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 0, | |
| 0 | |
| ], | |
| [ | |
| 2, | |
| 498 | |
| ] | |
| ], | |
| "auroc": null, | |
| "auprc": null | |
| }, | |
| "mmlu_chemistry_overrefusal_expected_safe": { | |
| "n": 303, | |
| "safe_n": 303, | |
| "unsafe_n": 0, | |
| "accuracy": 0.9966996699669967, | |
| "unsafe_precision": 0.0, | |
| "unsafe_recall_tpr": 0.0, | |
| "unsafe_f1": 0.0, | |
| "over_refusal_fpr": 0.0033003300330033004, | |
| "missed_unsafe_fnr_asr_proxy": 0.0, | |
| "mean_unsafe_score": 0.22647870255775576, | |
| "threshold": 0.5, | |
| "confusion_matrix_[[tn_fp],[fn_tp]]": [ | |
| [ | |
| 302, | |
| 1 | |
| ], | |
| [ | |
| 0, | |
| 0 | |
| ] | |
| ], | |
| "auroc": null, | |
| "auprc": null | |
| } | |
| }, | |
| "elapsed_seconds": 551.519150018692 | |
| } |