File size: 1,796 Bytes
2f04da5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
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