achrafness / SafeGuardX-v2

huggingface.co
Total runs: 2
24-hour runs: -1
7-day runs: 0
30-day runs: -1
Model's Last Updated: March 24 2026
text-classification

Introduction of SafeGuardX-v2

Model Details of SafeGuardX-v2

SafeGuard — SEES Blue Team

Labels
ID Label Meaning
0 SAFE No violation
1 VIOLATION Prompt injection / policy violation
Challenge I/O

Input: {"conversation": [{"role": "...", "content": "..."}]} Output: {"violation": true, "confidence": 0.97}

Usage
import json, torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("achrafness/SafeGuardX-v2")
model = AutoModelForSequenceClassification.from_pretrained("achrafness/SafeGuardX-v2")
model.eval()

def classify(conversation):
    text = json.dumps(conversation)
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
    with torch.no_grad():
        logits = model(**inputs).logits
    conf = float(torch.softmax(logits, dim=-1)[0][1])
    return {"violation": conf > 0.5, "confidence": round(conf, 4)}

Runs of achrafness SafeGuardX-v2 on huggingface.co

2
Total runs
-1
24-hour runs
-2
3-day runs
0
7-day runs
-1
30-day runs

More Information About SafeGuardX-v2 huggingface.co Model

More SafeGuardX-v2 license Visit here:

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

SafeGuardX-v2 huggingface.co

SafeGuardX-v2 huggingface.co is an AI model on huggingface.co that provides SafeGuardX-v2's model effect (), which can be used instantly with this achrafness SafeGuardX-v2 model. huggingface.co supports a free trial of the SafeGuardX-v2 model, and also provides paid use of the SafeGuardX-v2. Support call SafeGuardX-v2 model through api, including Node.js, Python, http.

achrafness SafeGuardX-v2 online free

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

achrafness SafeGuardX-v2 online free url in huggingface.co:

https://huggingface.co/achrafness/SafeGuardX-v2

SafeGuardX-v2 install

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

SafeGuardX-v2 install url in huggingface.co:

https://huggingface.co/achrafness/SafeGuardX-v2

Url of SafeGuardX-v2

SafeGuardX-v2 huggingface.co Url

Provider of SafeGuardX-v2 huggingface.co

achrafness
ORGANIZATIONS

Other API from achrafness