alt.freeweights.vision / deberta-v3-large-zeroshot-v2.0-c
From: MoritzLaurer <huggingface.co/MoritzLaurer>Newsgroups: alt.freeweights.visionSubject:

deberta-v3-large-zeroshot-v2.0-c

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

Zero shot classification model with 435M parameters. Safetensors weights, 881 MB in all. Published by MoritzLaurer under MIT.

435M params881MBdeberta-v3-large-zeroshot-v2.0-csafetensorspermissive
FactsParams435MSize881 MBFormatssafetensorsTaskzero shot classificationLicenseMITFrom sourcepermissive
$ fw get MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c
# manifest sha256 eaf0879570a8… · 881 MB · 10 files
$ fw verify ./deberta-v3-large-zeroshot-v2.0-c MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c
From sourceHosted (signed)MoritzLaurer/deberta-v3-large-zeroshot-v2.0-cLast check: 2026-11-15 03:38 UTC

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

Works with

Runs with

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

Overview

Size
881 MB
Weights
870 MB (safetensors)
Parameters
435M
Formats
safetensors
Task
zero shot classification
License
MIT (permissive)
Files
10, 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 03:38 UTCpassed

Model card

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

Model description: deberta-v3-large-zeroshot-v2.0-c#

zeroshot-v2.0 series of 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. not_entailment). 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 by the Hugging Face pipeline.

Training data#

Models with a "-c" in the name are trained on two types of fully commercially-friendly data:

  1. Synthetic data generated with Mixtral-8x7B-Instruct-v0.1.

I first created a list of 500+ diverse text classification tasks for 25 professions in conversations with Mistral-large. The data was manually curated. I then used this as seed data to generate several hundred thousand texts for these tasks with Mixtral-8x7B-Instruct-v0.1. The final dataset used is available in the synthetic_zeroshot_mixtral_v0.1 dataset in the subset mixtral_written_text_for_tasks_v4. Data curation was done in multiple iterations and will be improved in future iterations.

  1. Two commercially-friendly NLI datasets: (MNLI, FEVER-NLI).

These datasets were added to increase generalization.

  1. Models without a "-c" in the name also included a broader mix of training data with a broader mix of licenses: ANLI, WANLI, LingNLI,

and all datasets in this list where used_in_v1.1==True.

How to use the models#

#!pip install transformers[sentencepiece]
from transformers import pipeline
text = "Angela Merkel is a politician in Germany and leader of the CDU"
hypothesis_template = "This text is about {}"
classes_verbalized = ["politics", "economy", "entertainment", "environment"]
zeroshot_classifier = pipeline("zero-shot-classification", model="MoritzLaurer/deberta-v3-large-zeroshot-v2.0")  # change the model identifier here
output = zeroshot_classifier(text, classes_verbalized, hypothesis_template=hypothesis_template, multi_label=False)
print(output)

multi_label=False forces the model to decide on only one class. multi_label=True enables the model to choose multiple classes.

Metrics#

The models were evaluated on 28 different text classification tasks with the f1_macro metric. The main reference point is facebook/bart-large-mnli which is, at the time of writing (03.04.24), the most used commercially-friendly 0-shot classifier.

Image: results_aggreg_v2.0

facebook/bart-large-mnliroberta-base-zeroshot-v2.0-croberta-large-zeroshot-v2.0-cdeberta-v3-base-zeroshot-v2.0-cdeberta-v3-base-zeroshot-v2.0 (fewshot)deberta-v3-large-zeroshot-v2.0-cdeberta-v3-large-zeroshot-v2.0 (fewshot)bge-m3-zeroshot-v2.0-cbge-m3-zeroshot-v2.0 (fewshot)
all datasets mean0.4970.5870.6220.6190.643 (0.834)0.6760.673 (0.846)0.59(0.803)
amazonpolarity (2)0.9370.9240.9510.9370.943 (0.961)0.9520.956 (0.968)0.942(0.951)
imdb (2)0.8920.8710.9040.8930.899 (0.936)0.9230.918 (0.958)0.873(0.917)
appreviews (2)0.9340.9130.9370.9380.945 (0.948)0.9430.949 (0.962)0.932(0.954)
yelpreviews (2)0.9480.9530.9770.9790.975 (0.989)0.9880.985 (0.994)0.973(0.978)
rottentomatoes (2)0.830.8020.8410.840.86 (0.902)0.8690.868 (0.908)0.813(0.866)
emotiondair (6)0.4550.4820.4860.4590.495 (0.748)0.4990.484 (0.688)0.453(0.697)
emocontext (4)0.4970.5550.630.590.592 (0.799)0.6990.676 (0.81)0.61(0.798)
empathetic (32)0.3710.3740.4040.3780.405 (0.53)0.4470.478 (0.555)0.387(0.455)
financialphrasebank (3)0.4650.5620.4550.7140.669 (0.906)0.6910.582 (0.913)0.504(0.895)
banking77 (72)0.3120.1240.290.4210.446 (0.751)0.5130.567 (0.766)0.387(0.715)
massive (59)0.430.4280.5430.5120.52 (0.755)0.5260.518 (0.789)0.414(0.692)
wikitoxic_toxicaggreg (2)0.5470.7510.7660.7510.769 (0.904)0.7410.787 (0.911)0.736(0.9)
wikitoxic_obscene (2)0.7130.8170.8540.8530.869 (0.922)0.8830.893 (0.933)0.783(0.914)
wikitoxic_threat (2)0.2950.710.8170.8130.87 (0.946)0.8270.879 (0.952)0.68(0.947)
wikitoxic_insult (2)0.3720.7240.7980.7590.811 (0.912)0.770.779 (0.924)0.783(0.915)
wikitoxic_identityhate (2)0.4730.7740.7980.7740.765 (0.938)0.7970.806 (0.948)0.761(0.931)
hateoffensive (3)0.1610.3520.290.3150.371 (0.862)0.470.461 (0.847)0.291(0.823)
hatexplain (3)0.2390.3960.3140.3760.369 (0.765)0.3780.389 (0.764)0.29(0.729)
biasframes_offensive (2)0.3360.5710.5830.5440.601 (0.867)0.6440.656 (0.883)0.541(0.855)
biasframes_sex (2)0.2630.6170.8350.7410.809 (0.922)0.8460.815 (0.946)0.748(0.905)
biasframes_intent (2)0.6160.5310.6350.5540.61 (0.881)0.6960.687 (0.891)0.467(0.868)
agnews (4)0.7030.7580.7450.680.742 (0.898)0.8190.771 (0.898)0.687(0.892)
yahootopics (10)0.2990.5430.620.5780.564 (0.722)0.6210.613 (0.738)0.587(0.711)
trueteacher (2)0.4910.4690.4020.4310.479 (0.82)0.4590.538 (0.846)0.471(0.518)
spam (2)0.5050.5280.5040.5070.464 (0.973)0.740.597 (0.983)0.441(0.978)
wellformedquery (2)0.4070.3330.3330.3350.491 (0.769)0.3340.429 (0.815)0.361(0.718)
manifesto (56)0.0840.1020.1820.170.187 (0.376)0.2580.256 (0.408)0.147(0.331)
capsotu (21)0.340.4790.5230.5020.477 (0.664)0.6030.502 (0.686)0.472(0.644)

These numbers indicate zeroshot performance, as no data from these datasets was added in the training mix. Note that models without a "-c" in the title were evaluated twice: one run without any data from these 28 datasets to test pure zeroshot performance (the first number in the respective column) and the final run including up to 500 training data points per class from each of the 28 datasets (the second number in brackets in the column, "fewshot"). No model was trained on test data.

Details on the different datasets are available here: https://github.com/MoritzLaurer/zeroshot-classifier/blob/main/v1_human_data/datasets_overview.csv

When to use which model#

  • deberta-v3-zeroshot vs. roberta-zeroshot: deberta-v3 performs clearly better than roberta, but it is a bit slower.

roberta is directly compatible with Hugging Face's production inference TEI containers and flash attention. These containers are a good choice for production use-cases. tl;dr: For accuracy, use a deberta-v3 model. If production inference speed is a concern, you can consider a roberta model (e.g. in a TEI container and HF Inference Endpoints).

  • commercial use-cases: models with "-c" in the title are guaranteed to be trained on only commercially-friendly data.

Models without a "-c" were trained on more data and perform better, but include data with non-commercial licenses. Legal opinions diverge if this training data affects the license of the trained model. For users with strict legal requirements, the models with "-c" in the title are recommended.

Note that multilingual models perform worse than English-only models. You can therefore also first machine translate your texts to English with libraries like EasyNMT and then apply any English-only model to the translated data. Machine translation also facilitates validation in case your team does not speak all languages in the data.

  • context window: The bge-m3 models can process up to 8192 tokens. The other models can process up to 512. Note that longer text inputs both make the

mode slower and decrease performance, so if you're only working with texts of up to 400~ words / 1 page, use e.g. a deberta model for better performance.

Reproduction#

Reproduction code is available in the v2_synthetic_data directory here: https://github.com/MoritzLaurer/zeroshot-classifier/tree/main

Limitations and bias#

The model can only do text classification tasks.

Biases can come from the underlying foundation model, the human NLI training data and the synthetic data generated by Mixtral.

License#

The foundation model was published under the MIT license. The licenses of the training data vary depending on the model, see above.

Citation#

This model is an extension of the research described in this paper.

If you use this model academically, please cite:

@misc{laurer_building_2023,
	title = {Building {Efficient} {Universal} {Classifiers} with {Natural} {Language} {Inference}},
	url = {http://arxiv.org/abs/2312.17543},
	doi = {10.48550/arXiv.2312.17543},
	abstract = {Generative Large Language Models (LLMs) have become the mainstream choice for fewshot and zeroshot learning thanks to the universality of text generation. Many users, however, do not need the broad capabilities of generative LLMs when they only want to automate a classification task. Smaller BERT-like models can also learn universal tasks, which allow them to do any text classification task without requiring fine-tuning (zeroshot classification) or to learn new tasks with only a few examples (fewshot), while being significantly more efficient than generative LLMs. This paper (1) explains how Natural Language Inference (NLI) can be used as a universal classification task that follows similar principles as instruction fine-tuning of generative LLMs, (2) provides a step-by-step guide with reusable Jupyter notebooks for building a universal classifier, and (3) shares the resulting universal classifier that is trained on 33 datasets with 389 diverse classes. Parts of the code we share has been used to train our older zeroshot classifiers that have been downloaded more than 55 million times via the Hugging Face Hub as of December 2023. Our new classifier improves zeroshot performance by 9.4\%.},
	urldate = {2024-01-05},
	publisher = {arXiv},
	author = {Laurer, Moritz and van Atteveldt, Wouter and Casas, Andreu and Welbers, Kasper},
	month = dec,
	year = {2023},
	note = {arXiv:2312.17543 [cs]},
	keywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language},
}
Ideas for cooperation or questions?#

If you have questions or ideas for cooperation, contact me at moritz{at}huggingface{dot}co or LinkedIn

Flexible usage and "prompting"#

You can formulate your own hypotheses by changing the hypothesis_template of the zeroshot pipeline. Similar to "prompt engineering" for LLMs, you can test different formulations of your hypothesis_template and verbalized classes to improve performance.

from transformers import pipeline
text = "Angela Merkel is a politician in Germany and leader of the CDU"
# formulation 1
hypothesis_template = "This text is about {}"
classes_verbalized = ["politics", "economy", "entertainment", "environment"]
# formulation 2 depending on your use-case
hypothesis_template = "The topic of this text is {}"
classes_verbalized = ["political activities", "economic policy", "entertainment or music", "environmental protection"]
# test different formulations
zeroshot_classifier = pipeline("zero-shot-classification", model="MoritzLaurer/deberta-v3-large-zeroshot-v2.0")  # change the model identifier here
output = zeroshot_classifier(text, classes_verbalized, hypothesis_template=hypothesis_template, multi_label=False)
print(output)

Files

10 files · 881 MBWeights 870 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md21.1 KB8e7e1f70d452c97a3338be7549c566dcda2bb4e5a5f683265c371301aabcfe08
added_tokens.json23 Bdc046d04c9b0ada7ae6f1dc89c465801799acdf0c9a6aab8c15a1b2d5ca4e91f
config.json1.04 KB07689c910d52b0785a1afea4423ebea8713a70760735f1ea1f8e7cf0026519d2
model.safetensors870 MB688fdc38a29c0e301fa4d67805a45db82d84b8663349aa8d20d67de39aebd02d
special_tokens_map.json286 B9463f61e1b109a8eb4688b829260d7c6b1e6dff04c98ff7269bb89e2b92369b9
spm.model2.46 MBc679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
tokenizer.json8.66 MB05402ffae6dd382a8491b1d29bfc139bec5d332662e86a026f433ce54c25c202
tokenizer_config.json1.26 KBf5a1a74a632c0e9225e09a21ddf60c2e70ef5d3bfc1f261a24fd8ddab27254d2
training_args.bin4.92 KBa0c9df41b048b9a6c166760cae0552fa58cb9607260848b090240d07967f7f3a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
b2730f1601 pinned now2026-11-15 03:38 UTC10 files · 881 MB

Use it

$ fw get MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c
# manifest sha256 eaf0879570a8… · 881 MB · 10 files
$ fw verify ./deberta-v3-large-zeroshot-v2.0-c MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c.json --dir ./deberta-v3-large-zeroshot-v2.0-c $ python3 fw.py verify ./deberta-v3-large-zeroshot-v2.0-c ./MoritzLaurer__deberta-v3-large-zeroshot-v2.0-c.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c --revision b2730f16019076bb0009481121efbe4705e0e378 --local-dir ./deberta-v3-large-zeroshot-v2.0-c

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
README.md
Text sha256
8e7e1f70d452c97a3338be7549c566dcda2bb4e5a5f683265c371301aabcfe08
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: deberta-v3-large-zeroshot-v2.0-cDate: 2026-11-15Commit: b2730f1Signed: 2DC28CC7B26A283B ✓
Upstream
MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c
Pinned commit
b2730f16019076bb0009481121efbe4705e0e378
Manifest
deberta-v3-large-zeroshot-v2.0-c.json · .minisig
Manifest sha256
eaf0879570a8667303f77c536a902004b7cfb59f4b89781c5d0989a2ee1783d2
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:38 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c.json $ curl -O https://freeweights.allternit.com/manifests/MoritzLaurer/deberta-v3-large-zeroshot-v2.0-c.json.minisig $ minisign -Vm deberta-v3-large-zeroshot-v2.0-c.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/deberta-v3-large-zeroshot-v2.0-c
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. deberta-v3-large-zeroshot-v2.0-c.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of deberta-v3-large-zeroshot-v2.0-c. 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