| --- |
| language: |
| - en |
| license: apache-2.0 |
| library_name: transformers |
| tags: |
| - text-classification |
| - hallucination-detection |
| - grounding |
| - factual-consistency |
| - nli |
| - rag |
| datasets: |
| - stanfordnlp/snli |
| - nyu-mll/multi_nli |
| - anli |
| pipeline_tag: text-classification |
| --- |
| |
| # π‘οΈ FactGuard |
|
|
| Lightweight hallucination and grounding detection model. Checks whether a claim is supported by the given context. |
|
|
| Built on [ModernBERT-base](https://huggingface.co/answerdotai/ModernBERT-base) (149M params), fine-tuned on 1M+ NLI pairs from SNLI, MultiNLI, and ANLI. |
|
|
| **Classes:** Supported, Not Supported |
|
|
| ## π Usage |
|
|
| ```python |
| from transformers import pipeline |
| |
| classifier = pipeline("text-classification", model="ENTUM-AI/FactGuard") |
| |
| result = classifier({ |
| "text": "Apple reported revenue of $94.8 billion in Q1 2024.", |
| "text_pair": "Apple's Q1 2024 revenue was $94.8 billion." |
| }) |
| # [{'label': 'Supported', 'score': 0.99}] |
| |
| result = classifier({ |
| "text": "Apple reported revenue of $94.8 billion in Q1 2024.", |
| "text_pair": "Apple's revenue exceeded $100 billion." |
| }) |
| # [{'label': 'Not Supported', 'score': 0.97}] |
| ``` |
|
|
| ## π Training Data |
|
|
| | Dataset | Samples | |
| |---------|---------| |
| | [stanfordnlp/snli](https://huggingface.co/datasets/stanfordnlp/snli) | ~550K | |
| | [nyu-mll/multi_nli](https://huggingface.co/datasets/nyu-mll/multi_nli) | ~393K | |
| | [anli](https://huggingface.co/datasets/anli) | ~163K | |
|
|
| 1M+ NLI pairs mapped to binary grounding labels. |
|
|
| ## π Use Cases |
|
|
| - **RAG pipelines** β verify LLM responses against source documents |
| - **Fact-checking** β detect unsupported claims in generated text |
| - **Content moderation** β flag hallucinated content before publishing |
|
|
| ## β οΈ Limitations |
|
|
| - English only |
| - Designed for single claim verification against a given context |
|
|