SAVRN
Search Contact SAVRN

Open-weight model · Zero-shot classification

deberta-base-long-nli

by Tasksource tasksource/deberta-base-long-nli

deberta-v3-base with context length of 1280 fine-tuned on tasksource for 250k steps. I oversampled long NLI tasks (ConTRoL, doc-nli).

Parameters184M
Context1,280
Weights737.7 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads2.8k

Runs On

What it takes to serve deberta-base-long-nli (184M 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 0.4 GB 0.4 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 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 Tasksource, published under apache-2.0, revision 04dcf11f844b.

deberta-v3-base with context length of 1280 fine-tuned on tasksource for 250k steps. I oversampled long NLI tasks (ConTRoL, doc-nli). Training data include helpsteer v1/v2, logical reasoning tasks (FOLIO, FOL-nli, LogicNLI...), OASST, hh/rlhf, linguistics oriented NLI tasks, tasksource-dpo, fact verification tasks. This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Further fine-tuning on a new task or tasksource task (classification, token classification, reward modeling or multiple-choice) [FT]. Zero-shot GPT-4 scores…

Read Tasksource's full model card

Model Card for Model ID

deberta-v3-base with context length of 1280 fine-tuned on tasksource for 250k steps. I oversampled long NLI tasks (ConTRoL, doc-nli). Training data include helpsteer v1/v2, logical reasoning tasks (FOLIO, FOL-nli, LogicNLI...), OASST, hh/rlhf, linguistics oriented NLI tasks, tasksource-dpo, fact verification tasks.

This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Further fine-tuning on a new task or tasksource task (classification, token classification, reward modeling or multiple-choice) [FT].

dataset accuracy
anli/a1 63.3
anli/a2 47.2
anli/a3 49.4
nli_fever 79.4
FOLIO 61.8
ConTRoL-nli 63.3
cladder 71.1
zero-shot-label-nli 74.4
chatbot_arena_conversations 72.2
oasst2_pairwise_rlhf_reward 73.9
doc-nli 90.0

Zero-shot GPT-4 scores 61% on FOLIO (logical reasoning), 62% on cladder (probabilistic reasoning) and 56.4% on ConTRoL (long context NLI).

[ZS] Zero-shot classification pipeline

from transformers import pipeline
classifier = pipeline("zero-shot-classification",model="tasksource/deberta-base-long-nli")

text = "one day I will see the world"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(text, candidate_labels)

NLI training data of this model includes label-nli, a NLI dataset specially constructed to improve this kind of zero-shot classification.

[NLI] Natural language inference pipeline

from transformers import pipeline
pipe = pipeline("text-classification",model="tasksource/deberta-base-long-nli")
pipe([dict(text='there is a cat',
  text_pair='there is a black cat')]) #list of (premise,hypothesis)
# [{'label': 'neutral', 'score': 0.9952911138534546}]

[TA] Tasksource-adapters: 1 line access to hundreds of tasks

# !pip install tasknet
import tasknet as tn
pipe = tn.load_pipeline('tasksource/deberta-base-long-nli','glue/sst2') # works for 500+ tasksource tasks
pipe(['That movie was great !', 'Awful movie.'])
# [{'label': 'positive', 'score': 0.9956}, {'label': 'negative', 'score': 0.9967}]

The list of tasks is available in model config.json. This is more efficient than ZS since it requires only one forward pass per example, but it is less flexible.

[FT] Tasknet: 3 lines fine-tuning

# !pip install tasknet
import tasknet as tn
hparams=dict(model_name='tasksource/deberta-base-long-nli', learning_rate=2e-5)
model, trainer = tn.Model_Trainer([tn.AutoTask("glue/rte")], hparams)
trainer.train()

Citation

More details on this article:

@inproceedings{sileo-2024-tasksource,
    title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework",
    author = "Sileo, Damien",
    editor = "Calzolari, Nicoletta  and
      Kan, Min-Yen  and
      Hoste, Veronique  and
      Lenci, Alessandro  and
      Sakti, Sakriani  and
      Xue, Nianwen",
    booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)",
    month = may,
    year = "2024",
    address = "Torino, Italia",
    publisher = "ELRA and ICCL",
    url = "https://aclanthology.org/2024.lrec-main.1361",
    pages = "15655--15684",
}

Configuration

Architecture
DebertaV2ForSequenceClassification
Context length (tokens)
1,280
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
128,100
Stored precision
float32
Model type
deberta-v2

Identity and Version

Repository
tasksource/deberta-base-long-nli
Publisher
Tasksource
Task
Zero-shot classification
Modality
Text
Library
transformers
Parameters
184M parameters
Languages
Not stated by the source
Revision
04dcf11f844b07bc57015169fca2b7d6df8299d5
First published
2024-06-28
Last updated
2024-10-04

Files and Weights

9 files, 748.9 MB in total. The weights are 1 file totalling 737.7 MB in safetensors.

Weights1 file · 737.7 MB
Configuration3 files · 19.4 KB
Tokenizer2 files · 8.7 MB
Documentation1 file · 10.5 KB
Other1 file · 2.5 MB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights737.7 MB 71cace068738
added_tokens.jsonConfiguration23 B
config.jsonConfiguration19.1 KB
special_tokens_map.jsonConfiguration286 B
README.mdDocumentation10.5 KB
spm.modelOther2.5 MB c679fbf93643
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer8.7 MB
tokenizer_config.jsonTokenizer1.3 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
737.7 MB
Download from Tasksource

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

Built From

  • Derived from microsoft/deberta-v3-base
  • Trained on (disclosed) 12ml/e-CARE
  • Trained on (disclosed) AndyChiang/cloth
  • Trained on (disclosed) AndyChiang/dgen
  • Trained on (disclosed) Anthropic/model-written-evals
  • Trained on (disclosed) Anthropic/persuasion
  • Trained on (disclosed) AshtonIsNotHere/biosift-nli
  • Trained on (disclosed) AshtonIsNotHere/nli4ct_semeval2024
  • Trained on (disclosed) CLUTRR/v1
  • Trained on (disclosed) ColumbiaNLP/FLUTE
  • Trained on (disclosed) Dahoas/synthetic-instruct-gptj-pairwise
  • Trained on (disclosed) Dzeniks/hover
  • Trained on (disclosed) GBaker/MedQA-USMLE-4-options-hf
  • Trained on (disclosed) GGLab/PARADISE
  • Trained on (disclosed) HannahRoseKirk/HatemojiBuild
  • Trained on (disclosed) IlyaGusev/headline_cause
  • Trained on (disclosed) Jiangjie/ekar_english
  • Trained on (disclosed) MoritzLaurer/dataset_train_nli
  • Trained on (disclosed) PiC/phrase_similarity
  • Trained on (disclosed) PolyAI/banking77
  • Trained on (disclosed) RuyuanWan/Dilemmas_Disagreement
  • Trained on (disclosed) RuyuanWan/Dynasent_Disagreement
  • Trained on (disclosed) RuyuanWan/Politeness_Disagreement
  • Trained on (disclosed) RuyuanWan/SBIC_Disagreement
  • Trained on (disclosed) RuyuanWan/SChem_Disagreement
  • Trained on (disclosed) SetFit/insincere-questions
  • Trained on (disclosed) SetFit/toxic_conversations
  • Trained on (disclosed) ade_corpus_v2
  • Trained on (disclosed) ag_news
  • Trained on (disclosed) ai2_arc
  • Trained on (disclosed) alisawuffles/WANLI
  • Trained on (disclosed) allenai/scicite
  • Trained on (disclosed) allenai/scifact_entailment
  • Trained on (disclosed) amazon_polarity
  • Trained on (disclosed) amydeng2000/CREAK
  • Trained on (disclosed) app_reviews
  • Trained on (disclosed) aps/dynahate
  • Trained on (disclosed) aps/super_glue
  • Trained on (disclosed) art
  • Trained on (disclosed) blimp
  • Trained on (disclosed) blog_authorship_corpus
  • Trained on (disclosed) circa
  • Trained on (disclosed) civil_comments
  • Trained on (disclosed) codah
  • Trained on (disclosed) commonsense_qa
  • Trained on (disclosed) copenlu/scientific-exaggeration-detection
  • Trained on (disclosed) corypaik/prost
  • Trained on (disclosed) cos_e
  • Trained on (disclosed) cosmos_qa
  • Trained on (disclosed) dbpedia_14
  • Trained on (disclosed) declare-lab/cicero
  • Trained on (disclosed) definite_pronoun_resolution
  • Trained on (disclosed) demelin/moral_stories
  • Trained on (disclosed) demo-org/auditor_review
  • Trained on (disclosed) discovery
  • Trained on (disclosed) dream
  • Trained on (disclosed) dynabench/dynasent
  • Trained on (disclosed) emo
  • Trained on (disclosed) erbacher/AmbigNQ-clarifying-question
  • Trained on (disclosed) ethos

Memory Requirements

PrecisionWeights in memory
As published737.7 MB
16-bit0.4 GB
8-bit0.2 GB
4-bit0.1 GB

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

Questions About deberta-base-long-nli

How much GPU memory does deberta-base-long-nli need?

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

What is the cheapest GPU to run deberta-base-long-nli 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 deberta-base-long-nli commercially?

Yes. deberta-base-long-nli is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is deberta-base-long-nli's context length?

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

Similar Models

This model was trained using SentenceTransformers Cross-Encoder class. This model is based on microsoft/deberta-v3-base 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 184M parameters 512 tokens sentence-transformers

This model was trained on the MultiNLI, Fever-NLI and Adversarial-NLI (ANLI) datasets, which comprise 763 913 NLI hypothesis-premise pairs. This base model outperforms almost all large models on the ANLI benchmark. The base model is DeBERTa-v3-base from Microsoft. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see annex 11 of the original DeBERTa paper. For highest performance (but less speed), I recommend using https://huggingface.co/MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli. DeBERTa-v3-base-mnli-fever-anli was trained on the MultiNLI, Fever-NLI and Adversarial-NLI (ANLI) datasets, which…

Open weights mit 184M parameters 512 tokens transformers

Model · Zero-shot classification

deberta-v3-base-tasksource-nli

Damien Sileo

NOTE Deprecated: use https://huggingface.co/tasksource/deberta-small-long-nli for longer context and better accuracy. This is DeBERTa-v3-base fine-tuned with multi-task learning on 600+ tasks of the tasksource collection. This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Hundreds of previous tasks with tasksource-adapters [TA]. - Further fine-tuning on a new task or tasksource task (classification, token classification or multiple-choice) [FT]. NLI training data of this model includes label-nli, a NLI dataset specially…

Open weights apache-2.0 184M parameters 512 tokens transformers

This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs. The base model is DeBERTa-v3-base from Microsoft. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see annex 11 of the original DeBERTa paper. For a more powerful model, check out DeBERTa-v3-base-mnli-fever-anli which was trained on even more data. This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs. DeBERTa-v3-base-mnli was trained using the Hugging Face trainer with the following hyperparameters. The model was evaluated using the matched test set and…

Open weights 184M 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 184M parameters 512 tokens transformers

The model is designed for zero-shot classification with the Hugging Face pipeline. The model 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 so universal that any classification task can be reformulated into this task. A detailed description of how the model was trained and how it can be used is available in this paper. The model was trained on a mixture of 33 datasets and 387 classes that have been reformatted into this universal format. 1. Five NLI datasets with ~885k texts: "mnli", "anli", "fever", "wanli"…

Open weights mit 184M parameters 512 tokens transformers