alt.freeweights.vision / multilingual-MiniLMv2-L6-mnli-xnli-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject:

multilingual-MiniLMv2-L6-mnli-xnli-ONNX

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

Zero shot classification model. Onnx weights, 1.96 GB in all. Published by onnx-community under MIT.

vision1.96GBmultilingual-MiniLMv2-L6-mnli-xnli-ONNXonnxpermissive
FactsParamsnot statedSize1.96 GBFormatsonnxTaskzero shot classificationLicenseMITFrom sourcepermissive
$ fw get onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
# manifest sha256 1660ed8db14a… · 1.96 GB · 15 files
$ fw verify ./multilingual-MiniLMv2-L6-mnli-xnli-ONNX onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
From sourceHosted (signed)onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNXLast check: 2026-11-15 05:06 UTC

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

Quantized of multilingual-MiniLMv2-L6-mnli-xnli.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
1.96 GB
Weights
107 MB (smallest of 8 ONNX variants)
Parameters
not stated
Formats
onnx
Task
zero shot classification
License
MIT (permissive)
Files
15, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: MoritzLaurer/multilingual-MiniLMv2-L6-mnli-xnli

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 05:06 UTCpassed

Model card

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

multilingual-MiniLMv2-L6-mnli-xnli (ONNX)#

This is an ONNX version of MoritzLaurer/multilingual-MiniLMv2-L6-mnli-xnli. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for zero-shot-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ZeroShotClassificationPipeline



language:

  • multilingual
  • en
  • ar
  • bg
  • de
  • el
  • es
  • fr
  • hi
  • ru
  • sw
  • th
  • tr
  • ur
  • vi
  • zh

license: mit tags:

  • zero-shot-classification
  • text-classification
  • nli
  • pytorch

metrics:

  • accuracy

datasets:

  • multi_nli
  • xnli

pipeline_tag: zero-shot-classification widget:

  • text: "Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU" candidate_labels: "politics, economy, entertainment, environment"


Multilingual MiniLMv2-L6-mnli-xnli#

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 multilingual-MiniLM-L6 model was created by Microsoft and was distilled from XLM-RoBERTa-large (see details in the original paper and newer information in this repo). The model was then fine-tuned on the XNLI dataset, which contains hypothesis-premise pairs from 15 languages, as well as the English MNLI dataset.

The main advantage of distilled models is that they are smaller (faster inference, lower memory requirements) than their teachers (XLM-RoBERTa-large). The disadvantage is that they lose some of the performance of their larger teachers.

For highest inference speed, I recommend using this 6-layer model. For higher performance I recommend mDeBERTa-v3-base-mnli-xnli (as of 14.02.2023).

How to use the model#
Simple zero-shot classification pipeline#
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/multilingual-MiniLMv2-L6-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/multilingual-MiniLMv2-L6-mnli-xnli"
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 XNLI development dataset and the MNLI train dataset. The XNLI development set consists of 2490 professionally translated texts from English to 14 other languages (37350 texts in total) (see this paper). Note that the XNLI contains a training set of 15 machine translated versions of the MNLI dataset for 15 languages, but due to quality issues with these machine translations, this model was only trained on the professional translations from the XNLI development set and the original English MNLI training set (392 702 texts). Not using machine translated texts can avoid overfitting the model to the 15 languages; avoids catastrophic forgetting of the other languages it was pre-trained on; and significantly reduces training costs.

Training procedure#

The model was trained using the Hugging Face trainer with the following hyperparameters. The exact underlying model is mMiniLMv2-L6-H384-distilled-from-XLMR-Large.

training_args = TrainingArguments(
    num_train_epochs=3,              # total number of training epochs
    learning_rate=4e-05,
    per_device_train_batch_size=64,   # batch size per device during training
    per_device_eval_batch_size=120,    # batch size for evaluation
    warmup_ratio=0.06,                # number of warmup steps for learning rate scheduler
    weight_decay=0.01,               # strength of weight decay
)
Eval results#

The model was evaluated on the XNLI test set on 15 languages (5010 texts per language, 75150 in total). 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 of doing NLI on the other languages it was training on, but performance is most likely lower than for those languages available in XNLI.

The average XNLI performance of multilingual-MiniLM-L6 reported in the paper is 0.68 (see table 11). This reimplementation has an average performance of 0.713. This increase in performance is probably thanks to the addition of MNLI in the training data and this model was distilled from XLM-RoBERTa-large instead of -base (multilingual-MiniLM-L6-v2).

Datasetsavg_xnliarbgdeelenesfrhiruswthtrurvizh
Accuracy0.7130.6870.7420.7190.7230.7890.7480.7410.6910.7140.6420.6990.6960.6640.7230.721
Speed text/sec (A100 GPU, eval_batch=120)6093.06210.06003.06053.05409.06531.06205.05615.05734.05970.06219.06289.06533.05851.05970.06798.0
Datasetsmnli_mmnli_mm
Accuracy0.7820.8
Speed text/sec (A100 GPU, eval_batch=120)4430.04395.0

Limitations and bias#

Please consult the original paper and literature on different NLI datasets for potential biases.

Citation#

If you use this model, please cite: Laurer, Moritz, Wouter van Atteveldt, Andreu Salleras Casas, and Kasper Welbers. 2022. ‘Less Annotating, More Classifying – Addressing the Data Scarcity Issue of Supervised Machine Learning with Deep Transfer Learning and BERT - NLI’. Preprint, June. Open Science Framework. https://osf.io/74b8k.

Ideas for cooperation or questions?#

If you have questions or ideas for cooperation, contact me at m{dot}laurer{at}vu{dot}nl or LinkedIn

Files

15 files · 1.96 GBWeights 107 MB (smallest of 8 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 15 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md7.42 KBbbf530d28bb3e0f10305414a21fc13c651ec2939582d3e147aed7d8c098e19a5
config.json989 B3ebbbdf3c3803649b49715fd169207c0f42c4250dfea5dd304b1d8b8f745852a
onnx/model.onnx428 MB95743cad9148e16eac551a13ddccd5cef2bd1e3a56e325451a5e9212fea30cc9
onnx/model_bnb4.onnx392 MB0e2434b4a8b3490a7fc3b49ee712cfd1027730cf8b974587647a8631170c9355
onnx/model_fp16.onnx214 MB911561370b93632d5c6f5c1541454382ebc263ee7915e695a8565fcc8830175e
onnx/model_int8.onnx107 MB55614f3c7da74184742eaa0006b978744437aa91de9ba4913db42f94d7844a8f
onnx/model_q4.onnx392 MBf04736b3c9d8a1032074c9d91afa580c1bc37c159e7a0aea82c674a89c1236ec
onnx/model_q4f16.onnx199 MB0894ef5b95060b457ae017f51bc01cac5076bb34ab3495350a39d80c478fe7ae
onnx/model_quantized.onnx107 MB55614f3c7da74184742eaa0006b978744437aa91de9ba4913db42f94d7844a8f
onnx/model_uint8.onnx107 MB71492c28b2d12ecab30a863e78d4746bb1eb997fed72a0bae27b0f2be0968b77
quantize_config.json310 B9b60b5877b9a1687b5cddbc06124a974cb7536af9dbf5295279bf73c3823170c
special_tokens_map.json964 B8c785abebea9ae3257b61681b4e6fd8365ceafde980c21970d001e834cf10835
tokenizer.json17.1 MBd0091a328b3441d754e481db5a390d7f3b8dabc6016869fd13ba350d23ddc4cd
tokenizer_config.json1.29 KB329b7d21f02c6c6c9d358733b03a34a89cd8e4fe36998869a6ab824b98e9bf9d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
ca5daf3d11 pinned now2026-11-15 05:06 UTC15 files · 1.96 GB

Use it

$ fw get onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
# manifest sha256 1660ed8db14a… · 1.96 GB · 15 files
$ fw verify ./multilingual-MiniLMv2-L6-mnli-xnli-ONNX onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json --dir ./multilingual-MiniLMv2-L6-mnli-xnli-ONNX $ python3 fw.py verify ./multilingual-MiniLMv2-L6-mnli-xnli-ONNX ./onnx-community__multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX --revision ca5daf3d11b6c4b3143b1f4602a2edfb64c3ad7e --local-dir ./multilingual-MiniLMv2-L6-mnli-xnli-ONNX

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
Inherited from the base model MoritzLaurer/multilingual-MiniLMv2-L6-mnli-xnli: the strictest license along the lineage applies. 2026-11-15
Text in
README.md
Text sha256
bbf530d28bb3e0f10305414a21fc13c651ec2939582d3e147aed7d8c098e19a5
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: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: multilingual-MiniLMv2-L6-mnli-xnli-ONNXDate: 2026-11-15Commit: ca5daf3Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
Pinned commit
ca5daf3d11b6c4b3143b1f4602a2edfb64c3ad7e
Manifest
multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json · .minisig
Manifest sha256
1660ed8db14a87c1c34f1ff455f1e35491b371747ea4902063ceba8f2dca8dcc
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:06 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json.minisig $ minisign -Vm multilingual-MiniLMv2-L6-mnli-xnli-ONNX.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

Parent

MoritzLaurer/multilingual-MiniLMv2-L6-mnli-xnli · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/multilingual-MiniLMv2-L6-mnli-xnli-ONNX
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. multilingual-MiniLMv2-L6-mnli-xnli-ONNX.json. Provenance. Takedown history: none.
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