Views
No views yet
MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanliargmax == entailment_class. Re-initializing as a 2-class head (v1) lost
0.075 macro-F1.| Test set | Metric | Score |
|---|---|---|
LegalBench contract_nli_explicit_identification N=100 seed=0 | macro-F1 | 0.838 |
| Phase-1 baseline (Qwen3-14B as judge) | macro-F1 | 0.831 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tok = AutoTokenizer.from_pretrained("cs-552-2026-Clanker-Scientists/safeguard-deberta-contractnli-v2")
5model = AutoModelForSequenceClassification.from_pretrained("cs-552-2026-Clanker-Scientists/safeguard-deberta-contractnli-v2")
6model.eval()
7
8premise = "The Receiving Party shall not disclose any Confidential Information..."
9hypothesis = "The Agreement explicitly identifies confidential information as such."
10
11inputs = tok(premise, hypothesis, truncation=True, max_length=512, return_tensors="pt")
12with torch.no_grad():
13 logits = model(**inputs).logits
14pred = logits.argmax(-1).item()
15# 0 = entailment (supported), 1 = neutral (unsupported), 2 = contradiction (unsupported)
16supported = (pred == 0)
17print("Supported" if supported else "Unsupported")