Loading…
Loading…
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.
| 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) |
id2label = {0: "contradiction", 1: "entailment", 2: "neutral"}
This repo contains ONNX weights only. Use optimum for Python inference:
pip install optimum[onnxruntime]
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline
model = ORTModelForSequenceClassification.from_pretrained(
"codewithyug/alethex-nli-deberta-v3-large",
subfolder="onnx",
file_name="model_quantized.onnx", # INT8, 641 MB — fast
)
tokenizer = AutoTokenizer.from_pretrained("codewithyug/alethex-nli-deberta-v3-large")
nli = pipeline("zero-shot-classification", model=model, tokenizer=tokenizer)
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)
Use file_name="model.onnx" (no suffix) for the FP32 version.
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, ...] }
| 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 |
Trained with Hugging Face Trainer on MultiNLI + SNLI combined:
This model powers the ALETHEX contradiction detection engine:
pip install alethex for RAG pipelines and LangChain/LlamaIndex integrationsApache 2.0