nli-mdeberta-en — English-pruned NLI cross-encoder for Statelet
English-pruned ONNX build of
MoritzLaurer/mDeBERTa-v3-base-mnli-xnli,
packaged for the NLI discrimination paths in
Statelet: conflict detection,
query–fact relevance, and answer-chain composition.
This is an English-only derivative. Do not use it for multilingual NLI.
⚠️ Licensing — read before commercial use
The upstream weights are published under MIT, and that is the license declared here. However the upstream model is fine-tuned on MultiNLI and XNLI, and:
- XNLI is released under CC BY-NC 4.0 — a non-commercial license
(see
LICENSEin facebookresearch/XNLI). - MultiNLI is mixed: CC-BY-3.0 / CC-BY-SA-3.0 / MIT / other.
Whether a non-commercial training-data term restricts the resulting weights is unsettled, and the upstream author chose MIT. We surface this rather than resolve it. Review it yourself before commercial deployment.
Label order
config.json here carries only the label mapping, which is identical to upstream:
0 = entailment, 1 = neutral, 2 = contradiction
Statelet reads id2label from config.json; this ordering is not the same as
some other NLI checkpoints, so do not assume it when swapping models.
What was changed
The checkpoint is fully fp32 — fp16 breaks it via ONNX Runtime's
SimplifiedLayerNormFusion, so it was never fp16'd. About 770 MB of it is the
250,000-row multilingual word-embedding table
(deberta.embeddings.word_embeddings.weight), consumed by a single Gather.
That table is pruned to its ~120k Latin / shared / byte / special rows, and the
kept rows are stored INT8. The INT8 surgery swaps only the embedding Gather
(adding Gather(int8) + Cast + Mul) and leaves every LayerNorm in fp32, so it
does not trigger the fp16 LayerNorm bug. Matmuls stay fp32.
Verification: the pruned tokenizer's ids equal remap(original ids) on English
text, and new_table[remap(id)] == old_table[id] by construction, so the fp32
prune is provably lossless for English. The 3-class decision and probabilities
were additionally compared fp32 vs pruned-INT8.
Files
| file | size | notes |
|---|---|---|
model.onnx |
~432 MiB | fp32 embedding table |
model_int8.onnx |
~242 MiB | INT8 embedding table, fp32 elsewhere |
tokenizer.json |
— | pruned tokenizer — must be used with these graphs |
config.json |
— | id2label / label2id only |
Use in Statelet
STATELET_MODEL_ROOT=/absolute/path/to/models
with this repository at $STATELET_MODEL_ROOT/nli-mdeberta-en, or set
STATELET_NLI_MODEL to point straight at it. If no NLI model is found, Statelet
disables NLI and falls back to heuristic conflict/relevance scoring.
Citation
Cite the upstream model and the MNLI/XNLI datasets; see the upstream card.
- Downloads last month
- 38
Model tree for statelet/nli-mdeberta-en
Base model
MoritzLaurer/mDeBERTa-v3-base-mnli-xnli