Zero-Shot Classification
Transformers
ONNX
English
deberta-v2
text-classification
nli
natural-language-inference
deberta
contradiction-detection
alethex
Eval Results (legacy)
Instructions to use codewithyug/alethex-nli-deberta-v3-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codewithyug/alethex-nli-deberta-v3-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="codewithyug/alethex-nli-deberta-v3-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("codewithyug/alethex-nli-deberta-v3-large") model = AutoModelForSequenceClassification.from_pretrained("codewithyug/alethex-nli-deberta-v3-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ALETHEX NLI — DeBERTa-v3-Large
Fine-tuned DeBERTa-v3-Large for 3-class Natural Language Inference (contradiction / entailment / neutral), trained on MultiNLI + SNLI on Nvidia H100 GPU.
Used by the ALETHEX Chrome Extension to detect AI self-contradictions in real time, running 100% in-browser via Transformers.js.
Model Details
| Property | Value |
|---|---|
| Base model | microsoft/deberta-v3-large |
| Task | 3-class NLI (contradiction / entailment / neutral) |
| Training data | MultiNLI + SNLI (~942K pairs) |
| Accuracy | 92.8% on MultiNLI matched dev |
| Training hardware | Nvidia H100 80GB |
| ONNX FP32 size | 1,742 MB |
| ONNX INT8 size | 641 MB (2.71× compression) |
Labels
id2label = {0: "contradiction", 1: "entailment", 2: "neutral"}
Usage — PyTorch
from transformers import pipeline
nli = pipeline("zero-shot-classification", model="codewithyug/alethex-nli-deberta-v3-large")
result = nli(
"I live in New York.",
candidate_labels=["contradiction", "entailment", "neutral"],
hypothesis_template="This statement {}s the original: I moved to London last year."
)
print(result)
Usage — ONNX via Transformers.js (browser)
import { pipeline } from "@xenova/transformers";
// quantized=true loads onnx/model_quantized.onnx (~641MB, INT8)
const clf = await pipeline(
"zero-shot-classification",
"codewithyug/alethex-nli-deberta-v3-large",
{ quantized: true }
);
const out = await clf(
"I am vegetarian.",
["contradiction", "entailment", "neutral"],
);
console.log(out);
// { labels: ["contradiction", ...], scores: [0.94, ...] }
ONNX Files
| File | Size | Description |
|---|---|---|
onnx/model.onnx |
1,742 MB | FP32 — full precision, best accuracy |
onnx/model_quantized.onnx |
641 MB | INT8 dynamic quantization — used by the Chrome extension |
Training
Trained with Hugging Face Trainer on MultiNLI + SNLI combined:
- 3 epochs, batch size 32, learning rate 2e-5
- Warm-up ratio 0.06, weight decay 0.01
- FP16 mixed precision on H100
ALETHEX Project
This model powers the ALETHEX contradiction detection engine:
- Chrome Extension — real-time AI consistency monitoring on ChatGPT, Claude, Gemini, Copilot, DeepSeek, Perplexity, Grok
- Python Library —
pip install alethexfor RAG pipelines and LangChain/LlamaIndex integrations
License
Apache 2.0
- Downloads last month
- 49
Evaluation results
- Accuracy on MultiNLI + SNLIself-reported0.928