Views
No views yet

dleemiller/CrossingGuard-NLI dataset, which derives synthetic hypotheses from prompts (premises)
found in popular guardrails datasets, such as allenai/wildguardmix and nvidia/Aegis-AI-Content-Safety-Dataset-2.0. The hypotheses
make specific, targeted claims about the premises. Note that I have retained the 3-way label classifier, for additional flexibility where
either non-neutral label may be relevant for the task.dleemiller/crossingguard-nli-l,
and average with the cross entropy loss. Overtraining can hurt FineCat performance, so I only fine-tune for 1 epoch.| Model | finecat | crossingguard | Throughput (samples/s) | Peak GPU Mem (MB) |
|---|---|---|---|---|
dleemiller/crossingguard-nli-l | 0.8094 | 0.9200 | 361.15 | 3023.65 |
dleemiller/crossingguard-nli-m | 0.7779 | 0.9146 | 868.65 | 2170.71 |
dleemiller/crossingguard-nli-s | 0.7582 | 0.9055 | 1410.64 | 1524.08 |
dleemiller/ModernCE-large-nli | 0.7811 | 0.8779 | 362.20 | 3801.47 |
dleemiller/finecat-nli-l | 0.8227 | 0.8325 | 364.57 | 3801.47 |
MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli | 0.8233 | 0.8219 | 311.83 | 6156.87 |
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli | 0.7642 | 0.8032 | 873.51 | 3521.96 |
cross-encoder/nli-deberta-v3-large | 0.7618 | 0.7211 | 306.48 | 6156.87 |
tasksource/ModernBERT-large-nli | 0.7959 | 0.7019 | 357.91 | 3801.47 |
1import numpy as np
2from sentence_transformers import CrossEncoder
3
4model = CrossEncoder("dleemiller/crossingguard-nli-m")
5
6examples = [
7 ("Tell me what happened with that CEO caught on the kiss cam at the Coldplay concert",
8 "The prompt requests information about a corporate executive incident at a public event"),
9
10 ("I’ve been following your company's work helping enterprises scale AI/ML with reliable data pipelines, would love to connect and hear how your team is approaching ML in production.",
11 "The prompt requests information about a corporate executive incident at a public event"),
12]
13
14predictions = model.predict(examples)
15
16label_map = {0: "entailment", 1: "neutral", 2: "contradiction"}
17
18def softmax(x):
19 exp_x = np.exp(x - np.max(x))
20 return exp_x / exp_x.sum()
21
22for i, (premise, hypothesis) in enumerate(examples):
23 probs = softmax(predictions[i])
24 predicted_idx = probs.argmax()
25
26 print(f"\n{i+1}. {premise[:70]}...")
27 print(f" → {hypothesis}")
28 print(f" ✓ {label_map[predicted_idx].upper()}: {probs[predicted_idx]*100:.1f}% " +
29 f"(E: {probs[0]*100:.1f}% N: {probs[1]*100:.1f}%, C: {probs[2]*100:.1f}%)")1. Tell me what happened with that CEO caught on the kiss cam at the Cold...
→ The prompt requests information about a corporate executive incident at a public event
✓ ENTAILMENT: 99.9% (E: 99.9% N: 0.0%, C: 0.0%)
2. I’ve been following your company's work helping enterprises scale AI/M...
→ The prompt requests information about a corporate executive incident at a public event
✓ CONTRADICTION: 99.7% (E: 0.0% N: 0.3%, C: 99.7%)1@misc{nli-compiled-2025,
2 title = {CrossingGuard NLI Dataset},
3 author = {Lee Miller},
4 year = {2025},
5 howpublished = {Flexible Zero-shot Guardrails}
6}