Animised NLI Contradiction Detector v2

prajjwal1/bert-small (29M) trained directly on hard labels
with a 3:1 imbalanced dataset to prevent contradiction bias.

Why v2?

The v1 model (distilled from teacher soft labels on a balanced dataset)
showed a strong contradiction bias โ€” predicting contradiction even
in clearly entailing cases.

v2 fixes this by training on a deliberately imbalanced dataset where
entailment+neutral outnumber contradiction 3:1. This makes the model
conservative about predicting contradiction โ€” it requires stronger
evidence before flagging something as inconsistent.

Results

Metric Value
Accuracy 0.8120 (81.20%)
Loss 0.480365
Epochs 4

Labels

0 = entailment | 1 = neutral | 2 = contradiction

Usage

from transformers import pipeline

clf = pipeline("text-classification", model="Animised/nli-cdv2")

clf(
    "Rem was raised by her mother [SEP] Rem's mum taught her to cook soba.",
    top_k=None
)

Purpose

Character fact consistency checker for the
Animised project โ€”
detects when generated dialogue contradicts a character's bible.

Training details

  • Base model : prajjwal1/bert-small (29M params)
  • Dataset : Animised/nli-v2
  • Data ratio : 3:1 (entailment+neutral : contradiction)
  • Loss : CrossEntropyLoss (hard labels, no distillation)
  • Epochs : 4
  • Batch size : 512
  • Max length : 256
  • LR : 4e-05
  • GPUs : 2

vs v1

Feature v1 v2
Training Distillation (soft labels) Direct (hard labels)
Data balance 1:1:1 3:1 (E+N:C)
Contradiction Trigger-happy (~82% false) Conservative
Accuracy 79.6% 81.20%
Downloads last month
23
Safetensors
Model size
28.8M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support