SAVRN
Search Contact SAVRN

Open-weight model · Zero-shot classification

xlm-roberta-large-xnli

by Joe Davison joeddav/xlm-roberta-large-xnli

This model takes xlm-roberta-large and fine-tunes it on a combination of NLI data in 15 languages. It is intended to be used for zero-shot text classification, such as with the Hugging Face ZeroShotClassificationPipeline.

Parameters561M
Context514
Weights6.7 GB
Licensemit
AccessOpen weights
Monthly Downloads101.4k

Runs On

What it takes to serve xlm-roberta-large-xnli (561M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 1.1 GB 1.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.6 GB 0.7 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.3 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Joe Davison, published under mit, revision b227ee8435ce.

Model Description

This model takes xlm-roberta-large and fine-tunes it on a combination of NLI data in 15 languages. It is intended to be used for zero-shot text classification, such as with the Hugging Face ZeroShotClassificationPipeline.

Intended Usage

This model is intended to be used for zero-shot text classification, especially in languages other than English. It is fine-tuned on XNLI, which is a multilingual NLI dataset. The model can therefore be used with any of the languages in the XNLI corpus:

  • English
  • French
  • Spanish
  • German
  • Greek
  • Bulgarian
  • Russian
  • Turkish
  • Arabic
  • Vietnamese
  • Thai
  • Chinese
  • Hindi
  • Swahili
  • Urdu

Since the base model was pre-trained trained on 100 different languages, the model has shown some effectiveness in languages beyond those listed above as well. See the full list of pre-trained languages in appendix A of the XLM Roberata paper

For English-only classification, it is recommended to use bart-large-mnli or a distilled bart MNLI model.

With the zero-shot classification pipeline

Read the full model card (514 words)

Configuration

Architecture
XLMRobertaForSequenceClassification
Context length (tokens)
514
Layers
24
Hidden size
1,024
Feed-forward size
4,096
Attention heads
16
Vocabulary size
250,002
Model type
xlm-roberta

Identity and Version

Repository
joeddav/xlm-roberta-large-xnli
Publisher
Joe Davison
Task
Zero-shot classification
Modality
Text
Library
transformers
Parameters
561M parameters
Languages
en, fr, es, de, el, bg, ru, tr
Revision
b227ee8435ceadfa86dc1368a34254e2838bf242
First published
2022-03-02
Last updated
2024-10-16

Files and Weights

9 files, 6.7 GB in total. The weights are 3 files totalling 6.7 GB in bin, h5, safetensors.

Weights3 files · 6.7 GB
Configuration2 files · 884 B
Tokenizer1 file · 25 B
Documentation1 file · 5.2 KB
Other1 file · 5.1 MB
Repository1 file · 399 B
Every file
FileTypeSizeSHA-256
model.safetensorsWeights2.2 GB 8869b0c99ad3
pytorch_model.binWeights2.2 GB 947e0cebe098
tf_model.h5Weights2.2 GB 913bd557db7f
config.jsonConfiguration734 B
special_tokens_map.jsonConfiguration150 B
README.mdDocumentation5.2 KB
sentencepiece.bpe.modelOther5.1 MB
.gitattributesRepository399 B
tokenizer_config.jsonTokenizer25 B

License and Download

License
mit
Access
Open weights, no gate
Download size
6.7 GB
Download from Joe Davison

Released by Joe Davison through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:1911.02116
  • Trained on (disclosed) multi_nli
  • Trained on (disclosed) xnli

Memory Requirements

PrecisionWeights in memory
As published6.7 GB
16-bit1.1 GB
8-bit0.6 GB
4-bit0.3 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Compare xlm-roberta-large-xnli

Questions About xlm-roberta-large-xnli

How much GPU memory does xlm-roberta-large-xnli need?

About 1.3 GB at 16-bit and 0.3 GB at 4-bit: the weights (561M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run xlm-roberta-large-xnli on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use xlm-roberta-large-xnli commercially?

Yes. xlm-roberta-large-xnli is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is xlm-roberta-large-xnli's context length?

514 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Models in this series are designed for efficient zeroshot classification with the Hugging Face pipeline. These models can do classification without training data and run on both GPUs and CPUs. An overview of the latest zeroshot classifiers is available in my Zeroshot Classifier Collection. The main update of this zeroshot-v2.0 series of models is that several models are trained on fully commercially-friendly data for users with strict license requirements. These models can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text (entailment vs. notentailment). This task format is based on the Natural Language Inference task (NLI). The task is…

Open weights mit 568M parameters 8,194 tokens transformers

Model · Zero-shot classification

LLM2CLIP-Openai-L-14-336

Microsoft

Weiquan Huang 1, Aoqi Wu 1, Yifan Yang 2†, Xufang Luo 2, Yuqing Yang 2, Liang Hu 1, Qi Dai 2, Xiyang Dai 2, Dongdong Chen 2, Chong Luo 2, Lili Qiu 2 In this paper, we propose LLM2CLIP, a novel approach that embraces the power of LLMs to unlock CLIP’s potential. By fine-tuning the LLM in the caption space with contrastive learning, we extract its textual capabilities into the output embeddings, significantly improving the output layer’s textual discriminability. We then design an efficient training process where the fine-tuned LLM acts as a powerful teacher for CLIP’s visual encoder. Thanks to the LLM’s presence, we can now incorporate longer and more complex captions without being…

Open weights apache-2.0 579M parameters

This model was fine-tuned on the MultiNLI, Fever-NLI, Adversarial-NLI (ANLI), LingNLI and WANLI datasets, which comprise 885 242 NLI hypothesis-premise pairs. This model is the best performing NLI model on the Hugging Face Hub as of 06.06.22 and can be used for zero-shot classification. It significantly outperforms all other large models on the ANLI benchmark. The foundation model is DeBERTa-v3-large from Microsoft. DeBERTa-v3 combines several recent innovations compared to classical Masked Language Models like BERT, RoBERTa etc., see the paper DeBERTa-v3-large-mnli-fever-anli-ling-wanli was trained on the MultiNLI, Fever-NLI, Adversarial-NLI (ANLI), LingNLI and WANLI datasets, which…

Open weights mit 435M parameters 512 tokens transformers

This model was trained using SentenceTransformers Cross-Encoder class. This model is based on microsoft/deberta-v3-large The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral. For futher evaluation results, see SBERT.net - Pretrained Cross-Encoder. Pre-trained models can be used like this: You can use the model also directly with Transformers library (without SentenceTransformers library): This model can also be used for zero-shot-classification

Open weights apache-2.0 435M parameters 512 tokens sentence-transformers

Model · Zero-shot classification

deberta-v3-large-tasksource-nli

Damien Sileo

DeBERTa-v3-large fine-tuned with multi-task learning on 600 tasks of the tasksource collection You can further fine-tune this model to use it for any classification or multiple-choice task. This checkpoint has strong zero-shot validation performance on many tasks (e.g. 77% on WNLI). The untuned model CLS embedding also has strong linear probing performance (90% on MNLI), due to the multitask training. This is the shared model with the MNLI classifier on top. Its encoder was trained on many datasets including bigbench, Anthropic rlhf, anli... alongside many NLI and classification tasks with a SequenceClassification heads while using only one shared encoder. Each task had a specific CLS…

Open weights apache-2.0 435M parameters 512 tokens transformers

Models in this series are designed for efficient zeroshot classification with the Hugging Face pipeline. These models can do classification without training data and run on both GPUs and CPUs. An overview of the latest zeroshot classifiers is available in my Zeroshot Classifier Collection. The main update of this zeroshot-v2.0 series of models is that several models are trained on fully commercially-friendly data for users with strict license requirements. These models can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text (entailment vs. notentailment). This task format is based on the Natural Language Inference task (NLI). The task is…

Open weights mit 435M parameters 512 tokens transformers