Text Classification
Transformers
PyTorch
Safetensors
inferenceguard-roberta
privacy
inferential-privacy
roberta
multi-task-classification
risk-estimation
integrated-gradients
llm-firewall
Run this model with HF Jobs
Run AT707/InferenceGuard-Roberta-Risk on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/AT707/InferenceGuard-Roberta-Risk. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AT707/InferenceGuard-Roberta-Risk on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use AT707/InferenceGuard-Roberta-Risk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AT707/InferenceGuard-Roberta-Risk with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="AT707/InferenceGuard-Roberta-Risk")# pip install -U transformers accelerate # Load model directly from transformers import RobertaRiskClassifier model = RobertaRiskClassifier.from_pretrained("AT707/InferenceGuard-Roberta-Risk", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Initial release of InferenceGuard RoBERTa risk classifier
Browse filesFiles changed (5)
- README.mdAdded+41
- config.jsonAdded+38
- pytorch_model.binAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+17
1234567891011121314151617181920212223242526272829303132333435363738394041---language:- enlicense: mittags:- privacy- inferential-privacy- roberta- multi-task-classification- llm-firewallbase_model: roberta-basepipeline_tag: text-classification---
# InferenceGuard RoBERTa Multi-Task Risk Classifier
Production multi-task classifier designed to detect and quantify inferential privacy risks in LLM prompts.The model predicts inferability across four demographic dimensions: age, location, occupation, and education.It acts as the primary risk estimation engine within the InferenceGuard privacy firewall framework.
## Model Details
- Backbone: roberta-base- Task: Multi-task binary inferability classification- Target Attributes: age, location, occupation, education- Calibration: Attribute-level temperature scaling
## Quick Start
```pythonfrom transformers import AutoTokenizerfrom src.risk_model.roberta_model import RobertaRiskClassifier
repo_id = "AT707/InferenceGuard-Roberta-Risk"tokenizer = AutoTokenizer.from_pretrained(repo_id)model = RobertaRiskClassifier.from_pretrained(repo_id)
inputs = tokenizer("I graduated from MIT in 2012 and work as a surgeon in Boston.", return_tensors="pt")probs = model.predict_proba(**inputs)print(probs)```1234567891011121314151617181920212223242526272829303132333435363738{ "transformers_version": "5.22.1", "architectures": null, "output_hidden_states": false, "return_dict": true, "dtype": null, "chunk_size_feed_forward": 0, "is_encoder_decoder": false, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "problem_type": null, "_name_or_path": "", "base_model_name": "roberta-base", "num_heads": 4, "num_classes_per_head": 1, "hidden_size": 768, "classifier_dropout": 0.1, "temperature_values": [ 1.0, 1.0, 1.0, 1.0 ], "attributes": [ "age", "location", "occupation", "education" ], "model_type": "inferenceguard-roberta", "output_attentions": false}123version https://git-lfs.github.com/spec/v1oid sha256:33eef435c3304196143c693ef61aba400cc0fbd14a9fa7ad92b724726e51c223size 5034014231234567891011121314151617{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<s>", "cls_token": "<s>", "eos_token": "</s>", "errors": "replace", "is_local": false, "local_files_only": false, "mask_token": "<mask>", "model_max_length": 512, "pad_token": "<pad>", "sep_token": "</s>", "tokenizer_class": "RobertaTokenizer", "trim_offsets": true, "unk_token": "<unk>"}README.mdAdded+41
config.jsonAdded+38
pytorch_model.binAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+17