VeriLLM DeBERTa
compact LLM hallucination detector
2 min readupdated
This model checks whether an AI-generated sentence (hypothesis) aligns with the source text (premise). Built on a compact cross-encoder (an architecture that processes both texts simultaneously using cross-attention) based on cross-encoder/nli-deberta-v3-xsmall, it weighs in at just 70.83M parameters and was created by Rabbit-Bull. Fine-tuned on the RAGTruth dataset, it runs smoothly on a CPU with no GPU required—making it a handy tool for RAG and chatbot developers who need to quickly catch model fabrications.
Key features
- Compact footprint: 70,829,571 parameters using the
DebertaV2ForSequenceClassificationarchitecture, designed to run on a CPU. - Three classification labels: sorts claims into
CONTRADICTED(conflicts with the text),SUPPORTED_PROXY(no annotated hallucinations), andUNSUPPORTED(lacks evidence in the source). - Trained on RAGTruth: fine-tuned on sentence-level annotations from a popular benchmark for factual accuracy verification.
What you can do
- Plug it into a RAG pipeline to automatically verify LLM outputs against retrieved documents before showing them to users.
- Use it as a lightweight classifier to filter out hallucinations during English text summarization and question answering.
- Integrate it into the hybrid VeriLLM verification system alongside probability calibration and claim decomposition.
Example
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tok = AutoTokenizer.from_pretrained("Rabbit-Bull/verillm-deberta")
mod = AutoModelForSequenceClassification.from_pretrained("Rabbit-Bull/verillm-deberta")
inputs = tok("JWST launched in Dec 2021.", "JWST launched in December 2021.", return_tensors="pt")
with torch.no_grad():
print(mod.config.id2label[torch.argmax(mod(**inputs).logits, dim=-1).item()])Read more
DetailsRAGTruth test metrics (17,906 sentences): Accuracy — 92.86%, Weighted F1 — 92.76%, Macro-F1 — 69.99%.
Per-class F1: SUPPORTED_PROXY — 96.20%, CONTRADICTED — 61.67%, UNSUPPORTED — 52.09% (affected by class imbalance).
Hardware and limits: optimized for CPU, 512-token max input length, English only, and checks consistency strictly against the provided context rather than general world knowledge.










Comments