Downloads · 30 days
6
26% of all-time downloads
vincentoh/wizard101-l0-bouncer
wizard101-l0-bouncer is a text classification model from vincentoh. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Fast safety classifier for the first layer of a multi-level content moderation cascade. Built on DeBERTa-v3-xsmall for speed and efficiency.
Downloads · 30 days
6
26% of all-time downloads
All-time downloads
23
Public
Parameters
70.8M
286 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors283 MB · 96%
From the Hugging Face model README
Fast safety classifier for the first layer of a multi-level content moderation cascade. Built on DeBERTa-v3-xsmall for speed and efficiency.
L0 Bouncer is the first line of defense in a safety cascade system. It quickly filters obvious safe/harmful content, passing uncertain cases to more powerful downstream models (L1 GuardReasoner, L2/L3 reasoning models).
Design Goals:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
# Load model
tokenizer = AutoTokenizer.from_pretrained("vincentoh/wizard101-l0-bouncer")
model = AutoModelForSequenceClassification.from_pretrained("vincentoh/wizard101-l0-bouncer")
model.eval()
# Inference
text = "How do I make a cake?"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
# Index 0 = safe, Index 1 = harmful
safe_prob = probs[0][0].item()
harmful_prob = probs[0][1].item()
if harmful_prob > safe_prob:
prediction = "harmful"
confidence = harmful_prob
else:
prediction = "safe"
confidence = safe_prob
print(f"Prediction: {prediction} ({confidence:.2%})")
# Route to L1 if confidence < 0.9
needs_l1 = confidence < 0.9
if needs_l1:
# Send to GuardReasoner-8B for detailed analysis
pass
Benchmark results on safety datasets:
| Dataset | Samples | Accuracy |
|---|---|---|
| JailbreakBench | 200 | 68.0% |
| SG-Bench | 500 | 88.8% |
| StrongREJECT | 313 | 96.8% |
| WildGuardMix | 500 | 96.8% |
Note: Lower accuracy on adversarial datasets (JailbreakBench) is expected - these cases route to L1+ for deeper analysis.
User Input
│
▼
┌─────────┐
│ L0 │ ◄── This model (fast filter)
│ Bouncer │
└────┬────┘
│ (uncertain cases)
▼
┌─────────┐
│ L1 │ GuardReasoner-8B
└────┬────┘
│
▼
┌─────────┐
│ L2/L3 │ GPT-OSS reasoning models
└─────────┘
Apache 2.0
Part of the Wizard101 Safety Cascade project for efficient multi-level content moderation.