AI SeedbankHelp preserve open and free AI for humanity's future

← All models

facebook_bart-large-mnli

facebook · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: mit thumbnail: https://huggingface.co/front/thumbnails/facebook.png pipeline_tag: zero-shot-classification datasets:

  • multi_nli

bart-large-mnli

This is the checkpoint for bart-large after being trained on the MultiNLI (MNLI) dataset.

Additional information about this model:

  • The bart-large model page
  • BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
  • BART fairseq implementation

NLI-based Zero Shot Text Classification

Yin et al. proposed a method for using pre-trained NLI models as a ready-made zero-shot sequence classifiers. The method works by posing the sequence to be classified as the NLI premise and to construct a hypothesis from each candidate label. For example, if we want to evaluate whether a sequence belongs to the class "politics", we could construct a hypothesis of This text is about politics.. The probabilities for entailment and contradiction are then converted to label probabilities.

This method is surprisingly effective in many cases, particularly when used with larger pre-trained models like BART and Roberta. See this blog post for a more expansive introduction to this and other zero shot methods, and see the code snippets below for examples of using this model for zero-shot classification both with Hugging Face's built-in pipeline and with native Transformers/PyTorch code.

With the zero-shot classification pipeline

The model can be loaded with the zero-shot-classification pipeline like so:

from transformers import pipeline
classifier = pipeline("zero-shot-classification",
                      model="facebook/bart-large-mnli")

You can then use this pipeline to classify sequences into any of the class names you specify.

sequence_to_classify = "one day I will see the world"
candidate_labels = ['travel', 'cooking', 'dancing']
classifier(sequence_to_classify, candidate_labels)
#{'labels': ['travel', 'dancing', 'cooking'],
# 'scores': [0.9938651323318481, 0.0032737774308770895, 0.002861034357920289],
# 'sequence': 'one day I will see the world'}

If more than one candidate label can be correct, pass multi_label=True to calculate each class independently:

candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
classifier(sequence_to_classify, candidate_labels, multi_label=True)
#{'labels': ['travel', 'exploration', 'dancing', 'cooking'],
# 'scores': [0.9945111274719238,
#  0.9383890628814697,
#  0.0057061901316046715,
#  0.0018193122232332826],
# 'sequence': 'one day I will see the world'}

With manual PyTorch

# pose sequence as a NLI premise and label as a hypothesis
from transformers import AutoModelForSequenceClassification, AutoTokenizer
nli_model = AutoModelForSequenceClassification.from_pretrained('facebook/bart-large-mnli')
tokenizer = AutoTokenizer.from_pretrained('facebook/bart-large-mnli')

premise = sequence
hypothesis = f'This example is {label}.'

# run through model pre-trained on MNLI
x = tokenizer.encode(premise, hypothesis, return_tensors='pt',
                     truncation_strategy='only_first')
logits = nli_model(x.to(device))[0]

# we throw away "neutral" (dim 1) and take the probability of
# "entailment" (2) as the probability of the label being true 
entail_contradiction_logits = logits[:,[0,2]]
probs = entail_contradiction_logits.softmax(dim=1)
prob_label_is_true = probs[:,1]

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:ba5357fac71fc6df2534c89026379e054f37e0d3&dn=facebook_bart-large-mnli

Open magnet in torrent client · infohash ba5357fac71fc6df2534c89026379e054f37e0d3

Files & hashes

PathSizesha1sha256
README.md3.7 KB (3,793 B)f67b8475b37be4707f603d2612c6e97db72fa26cd022b7cb54ca2f65fac41cf6c9601b4491b4ac22a301227288a38beef2a18aeb
config.json1.1 KB (1,154 B)dfc96c728b40cc131e46b1c424c8e072d52b6d74a0f9bcb245b680a96ccae0ad8d155f267ec3e3c971ef4a4937e52ea9ba368a86
merges.txt445.6 KB (456,318 B)226b0752cac7789c48f0cb3ec53eda48b7be36cc1ce1664773c50f3e0cc8842619a93edc4624525b728b188a9e0be33b7726adc5
model.safetensors1.52 GB (1,629,437,147 B)a3fc97a545443cc3e52ae43981f575685a3ce9c4cfbb687dbbd9df99fe865e1860350a22aebac4d26ee4bcb50217f1df606a018e
pytorch_model.bin1.52 GB (1,629,486,723 B)a132b7612d481e1c3528a4237a914c353ad3df50ce253627f98f9db22af6a86efee6e905f001f7d8dc02dd14a8b4b4710c302b17
rust_model.ot1.90 GB (2,041,274,038 B)8c56691bf38eaf7b032426e7b514a78ea42c4c41b48c2b60d9a63b6ad67d99720b4d41ecb235287f10fcaeaae412291cdaf28578
tokenizer.json1.3 MB (1,355,863 B)ad0bcbeb288f0d1373d88e0762e66357f55b8311847bbeab6174d66a88898f729d52fa8d355fafe1bea101cf960dd404581df70e
tokenizer_config.json26 B (26 B)be4d21d94f3b4687e5a54d84bf6ab46ed0f8defd5e04eb606e3a1583530a42e36c2a6b6615c86f34fe77e44d9ddeb43ff940931f
vocab.json877.8 KB (898,822 B)0a39732b2d8be8e493cab3da68b68cc3e28221de06b4d46c8e752d410213d9548eb27a54db70fda0319b6271fb8d59dead5e1cab

Cite this release

Canonical URL
https://aiseedbank.org/models/facebook_bart-large-mnli/
Slug
facebook_bart-large-mnli
Infohash
ba5357fac71fc6df2534c89026379e054f37e0d3
License
mit
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: facebook_bart-large-mnli.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositoryfacebook/bart-large-mnli
Revision (pinned)d7645e127eaf1aefc7862fd59a17a5aa8558b8ce
Fetched at2026-09-03T22:29:15Z
License at fetchmit
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-03T22:30:21Z

mit4.94 GB (5,302,913,884 bytes)transformerspytorchjaxrustsafetensorsbarttext-classificationzero-shot-classificationendpoints_compatiblepaper: 1910.13461paper: 1909.00161