leolee99/NotInject
Viewer • Updated • 339 • 914 • 5
How to use KIMMISEON/distilbert-prompt-guard-4class with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="KIMMISEON/distilbert-prompt-guard-4class") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("KIMMISEON/distilbert-prompt-guard-4class")
model = AutoModelForSequenceClassification.from_pretrained("KIMMISEON/distilbert-prompt-guard-4class")This is a 4-class DistilBERT classifier fine-tuned for:
Base model: {BASE_MODEL}
Datasets used:
Notes:
sensitive_access is a custom merged class created from exfiltration / prompt-extraction / excessive-agency style attacks.Base model
distilbert/distilbert-base-uncased