File size: 1,354 Bytes
8458e2c
 
 
 
 
 
 
 
 
 
 
 
9bbc697
8458e2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9bbc697
8458e2c
 
 
 
 
 
 
 
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
---
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