alt.freeweights.vision / mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
From: MoritzLaurer <huggingface.co/MoritzLaurer>Newsgroups: alt.freeweights.visionSubject:

mDeBERTa-v3-base-xnli-multilingual-nli-2mil7

Date: 2026-11-15Commit: b5113ebSigned: 2DC28CC7B26A283B ✓

Zero shot classification model with 279M parameters. Onnx and safetensors weights, 2.59 GB in all. Published by MoritzLaurer under MIT.

279M params2.59GBmDeBERTa-v3-base-xnli-multilingual-nli-2mil7onnx safetensorspermissive
FactsParams279MSize2.59 GBFormatsonnx, safetensorsTaskzero shot classificationLicenseMITFrom sourcepermissive
$ fw get MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
# manifest sha256 c2545ace6d79… · 2.59 GB · 13 files
$ fw verify ./mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
From sourceHosted (signed)MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7Last check: 2026-11-15 02:26 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Overview

Size
2.59 GB
Weights
558 MB (safetensors)
Parameters
279M
Formats
onnx, safetensors
Task
zero shot classification
License
MIT (permissive)
Files
13, each with a sha256
Publisher
MoritzLaurer
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:26 UTCpassed

Model card

From the publisher at commit b5113eb. Shown as plain text with links; images open at the publisher.

Model card for mDeBERTa-v3-base-xnli-multilingual-nli-2mil7#

Model description#

This multilingual model can perform natural language inference (NLI) on 100 languages and is therefore also suitable for multilingual zero-shot classification. The underlying mDeBERTa-v3-base model was pre-trained by Microsoft on the CC100 multilingual dataset with 100 languages. The model was then fine-tuned on the XNLI dataset and on the multilingual-NLI-26lang-2mil7 dataset. Both datasets contain more than 2.7 million hypothesis-premise pairs in 27 languages spoken by more than 4 billion people.

As of December 2021, mDeBERTa-v3-base is the best performing multilingual base-sized transformer model introduced by Microsoft in this paper.

How to use the model#
Simple zero-shot classification pipeline#
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/mDeBERTa-v3-base-mnli-xnli")
sequence_to_classify = "Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU"
candidate_labels = ["politics", "economy", "entertainment", "environment"]
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
print(output)
NLI use-case#
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")

model_name = "MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

premise = "Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU"
hypothesis = "Emmanuel Macron is the President of France"

input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
output = model(input["input_ids"].to(device))  # device = "cuda:0" or "cpu"
prediction = torch.softmax(output["logits"][0], -1).tolist()
label_names = ["entailment", "neutral", "contradiction"]
prediction = {name: round(float(pred) * 100, 1) for pred, name in zip(prediction, label_names)}
print(prediction)
Training data#

This model was trained on the multilingual-nli-26lang-2mil7 dataset and the XNLI validation dataset.

The multilingual-nli-26lang-2mil7 dataset contains 2 730 000 NLI hypothesis-premise pairs in 26 languages spoken by more than 4 billion people. The dataset contains 105 000 text pairs per language. It is based on the English datasets MultiNLI, Fever-NLI, ANLI, LingNLI and WANLI and was created using the latest open-source machine translation models. The languages in the dataset are: ['ar', 'bn', 'de', 'es', 'fa', 'fr', 'he', 'hi', 'id', 'it', 'ja', 'ko', 'mr', 'nl', 'pl', 'ps', 'pt', 'ru', 'sv', 'sw', 'ta', 'tr', 'uk', 'ur', 'vi', 'zh'] (see ISO language codes. For more details, see the datasheet. In addition, a sample of 105 000 text pairs was also added for English following the same sampling method as the other languages, leading to 27 languages.

Moreover, for each language a random set of 10% of the hypothesis-premise pairs was added where an English hypothesis was paired with the premise in the other language (and the same for English premises and other language hypotheses). This mix of languages in the text pairs should enable users to formulate a hypothesis in English for a target text in another language.

The XNLI validation set consists of 2490 professionally translated texts from English to 14 other languages (37350 texts in total) (see this paper). Note that XNLI also contains a training set of 14 machine translated versions of the MultiNLI dataset for 14 languages, but this data was excluded due to quality issues with the machine translations from 2018.

Note that for evaluation purposes, three languages were excluded from the XNLI training data and only included in the test data: ["bg","el","th"]. This was done in order to test the performance of the model on languages it has not seen during NLI fine-tuning on 27 languages, but only during pre-training on 100 languages - see evaluation metrics below.

The total training dataset had a size of 3 287 280 hypothesis-premise pairs.

Training procedure#

mDeBERTa-v3-base-mnli-xnli was trained using the Hugging Face trainer with the following hyperparameters.

training_args = TrainingArguments(
    num_train_epochs=3,              # total number of training epochs
    learning_rate=2e-05,
    per_device_train_batch_size=32,   # batch size per device during training
    gradient_accumulation_steps=2,   # to double the effective batch size for 
    warmup_ratio=0.06,                # number of warmup steps for learning rate scheduler
    weight_decay=0.01,               # strength of weight decay
    fp16=False
)
Eval results#

The model was evaluated on the XNLI test set in 15 languages (5010 texts per language, 75150 in total) and the English test sets of MultiNLI, Fever-NLI, ANLI, LingNLI and WANLI . Note that multilingual NLI models are capable of classifying NLI texts without receiving NLI training data in the specific language (cross-lingual transfer). This means that the model is also able to do NLI on the other 73 languages mDeBERTa was pre-trained on, but performance is most likely lower than for those languages seen during NLI fine-tuning. The performance on the languages ["bg","el","th"] in the table below is a good indicated of this cross-lingual transfer, as these languages were not included in the training data.

XNLI subsetsarbgdeelenesfrhiruswthtrurvizh
Accuracy0.7940.8220.8240.8090.8710.8320.8230.7690.8030.7460.7860.7920.7440.7930.803
Speed (text/sec, A100-GPU)1344.01355.01472.01149.01697.01446.01278.01115.01380.01463.01713.01594.01189.0877.01887.0
English Datasetsmnli_test_mmnli_test_mmanli_testanli_test_r3fever_testling_testwanli_test
Accuracy0.8570.8560.5370.4970.7610.7880.7320.794
Speed (text/sec, A100-GPU)1000.01009.0794.0672.0374.01177.01468.0

Also note that if other multilingual models on the model hub claim performance of around 90% on languages other than English, the authors have most likely made a mistake during testing since non of the latest papers shows a multilingual average performance of more than a few points above 80% on XNLI (see here or here).

Limitations and bias#

Please consult the original DeBERTa-V3 paper and literature on different NLI datasets for potential biases. Moreover, note that the multilingual-nli-26lang-2mil7 dataset was created using machine translation, which reduces the quality of the data for a complex task like NLI. You can inspect the data via the Hugging Face dataset viewer for languages you are interested in. Note that grammatical errors introduced by machine translation are less of an issue for zero-shot classification, for which grammar is less important.

Citation#

If the dataset is useful for you, please cite the following article:

@article{laurer_less_2022,
	title = {Less {Annotating}, {More} {Classifying} – {Addressing} the {Data} {Scarcity} {Issue} of {Supervised} {Machine} {Learning} with {Deep} {Transfer} {Learning} and {BERT} - {NLI}},
	url = {https://osf.io/74b8k},
	language = {en-us},
	urldate = {2022-07-28},
	journal = {Preprint},
	author = {Laurer, Moritz and Atteveldt, Wouter van and Casas, Andreu Salleras and Welbers, Kasper},
	month = jun,
	year = {2022},
	note = {Publisher: Open Science Framework},
}

Ideas for cooperation or questions?#

For updates on new models and datasets, follow me on Twitter. If you have questions or ideas for cooperation, contact me at m{dot}laurer{at}vu{dot}nl or on LinkedIn

Debugging and issues#

Note that DeBERTa-v3 was released in late 2021 and older versions of HF Transformers seem to have issues running the model (e.g. resulting in an issue with the tokenizer). Using Transformers==4.13 or higher might solve some issues. Note that mDeBERTa currently does not support FP16, see here: https://github.com/microsoft/DeBERTa/issues/77

Files

13 files · 2.59 GBWeights 558 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.44 KB66fb4ef4a766f41e81a8dd325678242029781eff355510b892a1379a850f54bf
LICENSE1.03 KB655d75c66aadf109f3e3fe6175810c977e642a027f1dcf227463a0ccb3873d2a
README.md11.9 KB0784c14bc6eb570eaba78dc8c6bb3c437e88e38dbf064e98023f28ff19397205
added_tokens.json23 Bfb697283833d25e2c711f1bc37730ecd8b20f4bd5f015db1d84aefe0adc9155a
config.json1.09 KBbc7b85f164a17c1b007d87fb99d3676f4a4d2e6511d2288dd3f5334dc0f34e6b
model.safetensors558 MB7c8e29f1115986d032e92b0fbaa0bdef1062a46f658b08705f237c05014a8541
onnx/model.onnx1.12 GBe9238a33e07411eae1d1cef1d5f22e5f556717ce586c827581bb59598a45fe37
onnx/model_quantized.onnx339 MB18307c3bcb5d896a624c077af061b259d341829f3d13c8b3d49a044e28d4fe6a
pytorch_model.bin558 MB2945aa0e24a64a42ee8acac1f1e6656087bf1586c45d47a695199e90862046f6
special_tokens_map.json173 B311de3f4eed9d76a43bf0d71f10e62e086ca65ccce9f15d5da0d2098bf519ecc
spm.model4.31 MB13c8d666d62a7bc4ac8f040aab68e942c861f93303156cc28f5c7e885d86d6e3
tokenizer.json16.3 MBe23095eb61ba944c7be3a5d3e8ec19e37ce7ced0daa03550bde03e83c21b3f8a
tokenizer_config.json467 B25e9f84c6b43da7bff43a0aee8eeee2c8a39d246823d8464b9275ef704eab42f
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
b5113eb38a pinned now2026-11-15 02:26 UTC13 files · 2.59 GB

Use it

$ fw get MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
# manifest sha256 c2545ace6d79… · 2.59 GB · 13 files
$ fw verify ./mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json --dir ./mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 $ python3 fw.py verify ./mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 ./MoritzLaurer__mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7 --revision b5113eb38ab63efdd7f280f8c144ea8b13f978ce --local-dir ./mDeBERTa-v3-base-xnli-multilingual-nli-2mil7

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
655d75c66aadf109f3e3fe6175810c977e642a027f1dcf227463a0ccb3873d2a
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: MoritzLaurer <huggingface.co/MoritzLaurer>Newsgroups: alt.freeweights.visionSubject: mDeBERTa-v3-base-xnli-multilingual-nli-2mil7Date: 2026-11-15Commit: b5113ebSigned: 2DC28CC7B26A283B ✓
Upstream
MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
Pinned commit
b5113eb38ab63efdd7f280f8c144ea8b13f978ce
Manifest
mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json · .minisig
Manifest sha256
c2545ace6d79a02df1c30cad19b6a93aab80652aeb973c6459c035f6f13edae1
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:26 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json $ curl -O https://freeweights.allternit.com/manifests/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json.minisig $ minisign -Vm mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. mDeBERTa-v3-base-xnli-multilingual-nli-2mil7.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of mDeBERTa-v3-base-xnli-multilingual-nli-2mil7. Each has its own license check and page.

From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX