File size: 1,961 Bytes
9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 9a03237 2301245 | 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 69 70 71 | ---
language: en
license: apache-2.0
tags:
- text-classification
- zero-shot-classification
- nli
datasets:
- Pankaj8922/nli-high-quality-balanced
base_model: prajjwal1/bert-medium
metrics:
- accuracy
- f1
model-index:
- name: bert-medium-nli
results:
- task:
type: text-classification
name: Natural Language Inference
dataset:
name: Pankaj8922/nli-high-quality-balanced
type: Pankaj8922/nli-high-quality-balanced
metrics:
- type: accuracy
value: 0.8373
name: Test Accuracy
- type: f1
value: 0.8372
name: Test F1 (macro)
---
# bert-medium-nli
Fine-tuned [`prajjwal1/bert-medium`](https://huggingface.co/prajjwal1/bert-medium) for natural language
inference (entailment / neutral / contradiction), intended for use as a zero-shot
text classification model via the entailment trick (hypothesis = "This text is
about {label}.").
Trained on [`Pankaj8922/nli-high-quality-balanced`](https://huggingface.co/datasets/Pankaj8922/nli-high-quality-balanced), a
combined and filtered subset of MNLI, SNLI, FEVER-NLI, and ANLI:
annotator-agreement filtered, deduplicated, teacher-confidence filtered,
hypothesis-only artifact filtered, and class-balanced.
## Results
| Split | Accuracy | F1 (macro) | Precision (macro) | Recall (macro) |
|---|---|---|---|---|
| Validation | 0.8389 | 0.8389 | 0.8389 | 0.8389 |
| Test | 0.8373 | 0.8372 | 0.8372 | 0.8373 |
## Training details
- Base model: `prajjwal1/bert-medium`
- Epochs: 3
- Batch size: 64 (train), 128 (eval)
- Learning rate: 5e-05
- Max sequence length: 256
## Labels
- 0: entailment
- 1: neutral
- 2: contradiction
## Intended use / limitations
This is a small (~41M parameter) model, so its ceiling on zero-shot performance
against novel, unseen label sets is lower than larger NLI-tuned checkpoints
(e.g. DeBERTa-v3-base or -large variants). Best suited for fast inference or
resource-constrained settings rather than maximum accuracy.
|