nli-cdv3 / README.md
Pankaj8922's picture
Update README.md
9bbc697 verified
---
language: en
tags:
- nli
- contradiction-detection
- animised
- bert
license: apache-2.0
---
# Animised NLI Contradiction Detector v3
`prajjwal1/bert-medium` (41M) trained directly on hard labels
with a **3:1 imbalanced dataset** to prevent contradiction bias.
## Why v3?
Upgrade from bert-small to bert-medium for stronger performance,
while keeping the conservative contradiction policy from v2.
## Results
| Metric | Value |
|----------|------------------------------------|
| Accuracy | 0.8636 (86.36%) |
| Loss | 0.366860 |
| Epochs | 4 |
## Labels
`0` = entailment | `1` = neutral | `2` = contradiction
## Usage
```python
from transformers import pipeline
clf = pipeline("text-classification", model="Animised/nli-cdv3")
clf("Premise [SEP] Hypothesis", top_k=None)
```
## Purpose
Character fact consistency checker for the
[Animised](https://huggingface.co/Animised) project.
## Training details
- Base model : `prajjwal1/bert-medium` (41M params)
- Dataset : [Animised/nli-v3](https://huggingface.co/datasets/Animised/nli-v3)
- Data ratio : 3:1 (entailment+neutral : contradiction)
- Loss : CrossEntropyLoss (hard labels)
- Epochs : 4
- Batch size : 384
- Max length : 256
- LR : 4e-05
- GPUs : 2