cmarkea / bloomz-7b1-mt-nli

huggingface.co
Total runs: 28
24-hour runs: 3
7-day runs: 3
30-day runs: 7
Model's Last Updated: March 23 2024
zero-shot-classification

Introduction of bloomz-7b1-mt-nli

Model Details of bloomz-7b1-mt-nli

Presentation

We introduce the Bloomz-7b1-mt-NLI model, fine-tuned from the Bloomz-7b1-mt-chat-dpo foundation model. This model is trained on a Natural Language Inference (NLI) task in a language-agnostic manner. The NLI task involves determining the semantic relationship between a hypothesis and a set of premises, often expressed as pairs of sentences.

The goal is to predict textual entailment (does sentence A imply/contradict/neither sentence B?) and is a classification task (given two sentences, predict one of the three labels). If sentence A is called premise , and sentence B is called hypothesis , then the goal of the modelization is to estimate the following: P ( p r e m i s e = c { c o n t r a d i c t i o n , e n t a i l m e n t , n e u t r a l } h y p o t h e s i s ) P(premise=c\in\{contradiction, entailment, neutral\}\vert hypothesis)

Language-agnostic approach

It should be noted that hypotheses and premises are randomly chosen between English and French, with each language combination representing a probability of 25%.

Performance
class precision (%) f1-score (%) support
global 83.31 83.02 5,010
contradiction 81.27 86.63 1,670
entailment 87.54 83.57 1,670
neutral 81.13 78.86 1,670
Benchmark

Here are the performances for both the hypothesis and premise in French:

And now the hypothesis in French and the premise in English (cross-language context):

Zero-shot Classification

The primary interest of training such models lies in their zero-shot classification performance. This means that the model is able to classify any text with any label without a specific training. What sets the Bloomz-7b1-mt-NLI LLMs apart in this domain is their ability to model and extract information from significantly more complex and lengthy text structures compared to models like BERT, RoBERTa, or CamemBERT.

The zero-shot classification task can be summarized by: P ( h y p o t h e s i s = i C p r e m i s e ) = e P ( p r e m i s e = e n t a i l m e n t h y p o t h e s i s = i ) j C e P ( p r e m i s e = e n t a i l m e n t h y p o t h e s i s = j ) P(hypothesis=i\in\mathcal{C}|premise)=\frac{e^{P(premise=entailment\vert hypothesis=i)}}{\sum_{j\in\mathcal{C}}e^{P(premise=entailment\vert hypothesis=j)}} With i representing a hypothesis composed of a template (for example, "This text is about {}.") and #C candidate labels ("cinema", "politics", etc.), the set of hypotheses is composed of {"This text is about cinema.", "This text is about politics.", ...}. It is these hypotheses that we will measure against the premise, which is the sentence we aim to classify.

Performance

The model is evaluated based on sentiment analysis evaluation on the French film review site Allociné . The dataset is labeled into 2 classes, positive comments and negative comments in 20,000 reviews. We then use the hypothesis template "Ce commentaire est {}." and the candidate classes "positif" and "negatif".

How to use Bloomz-7b1-mt-NLI

from transformers import pipeline

classifier = pipeline(
    task='zero-shot-classification',
    model="cmarkea/bloomz-7b1-mt-nli"
)
result = classifier (
    sequences="Le style très cinéphile de Quentin Tarantino "
    "se reconnaît entre autres par sa narration postmoderne "
    "et non linéaire, ses dialogues travaillés souvent "
    "émaillés de références à la culture populaire, et ses "
    "scènes hautement esthétiques mais d'une violence "
    "extrême, inspirées de films d'exploitation, d'arts "
    "martiaux ou de western spaghetti.",
    candidate_labels="cinéma, technologie, littérature, politique",
    hypothesis_template="Ce texte parle de {}."
)

result
{"labels": ["cinéma",
            "littérature",
            "technologie",
            "politique"],
 "scores": [0.806119978427887,
            0.09856045246124268,
            0.05358638986945152,
            0.04173312708735466]}

# Resilience in cross-language French/English context
result = classifier (
    sequences="Quentin Tarantino's very cinephile style is "
    "recognized, among other things, by his postmodern and "
    "non-linear narration, his elaborate dialogues often "
    "peppered with references to popular culture, and his "
    "highly aesthetic but extremely violent scenes, inspired by "
    "exploitation films, martial arts or spaghetti western.",
    candidate_labels="cinéma, technologie, littérature, politique",
    hypothesis_template="Ce texte parle de {}."
)

result
{"labels": ["cinéma",
            "littérature",
            "technologie",
            "politique"],
 "scores": [0.8161508440971375,
            0.09301160275936127,
            0.04825378209352493,
            0.04258381202816963]}
Citation
@online{DeBloomzNLI,
  AUTHOR = {Cyrile Delestre},
  URL = {https://huggingface.co/cmarkea/bloomz-7b1-nli},
  YEAR = {2024},
  KEYWORDS = {NLP ; Transformers ; LLM ; Bloomz},
}

Runs of cmarkea bloomz-7b1-mt-nli on huggingface.co

28
Total runs
3
24-hour runs
2
3-day runs
3
7-day runs
7
30-day runs

More Information About bloomz-7b1-mt-nli huggingface.co Model

More bloomz-7b1-mt-nli license Visit here:

https://choosealicense.com/licenses/bigscience-bloom-rail-1.0

bloomz-7b1-mt-nli huggingface.co

bloomz-7b1-mt-nli huggingface.co is an AI model on huggingface.co that provides bloomz-7b1-mt-nli's model effect (), which can be used instantly with this cmarkea bloomz-7b1-mt-nli model. huggingface.co supports a free trial of the bloomz-7b1-mt-nli model, and also provides paid use of the bloomz-7b1-mt-nli. Support call bloomz-7b1-mt-nli model through api, including Node.js, Python, http.

bloomz-7b1-mt-nli huggingface.co Url

https://huggingface.co/cmarkea/bloomz-7b1-mt-nli

cmarkea bloomz-7b1-mt-nli online free

bloomz-7b1-mt-nli huggingface.co is an online trial and call api platform, which integrates bloomz-7b1-mt-nli's modeling effects, including api services, and provides a free online trial of bloomz-7b1-mt-nli, you can try bloomz-7b1-mt-nli online for free by clicking the link below.

cmarkea bloomz-7b1-mt-nli online free url in huggingface.co:

https://huggingface.co/cmarkea/bloomz-7b1-mt-nli

bloomz-7b1-mt-nli install

bloomz-7b1-mt-nli is an open source model from GitHub that offers a free installation service, and any user can find bloomz-7b1-mt-nli on GitHub to install. At the same time, huggingface.co provides the effect of bloomz-7b1-mt-nli install, users can directly use bloomz-7b1-mt-nli installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bloomz-7b1-mt-nli install url in huggingface.co:

https://huggingface.co/cmarkea/bloomz-7b1-mt-nli

Url of bloomz-7b1-mt-nli

bloomz-7b1-mt-nli huggingface.co Url

Provider of bloomz-7b1-mt-nli huggingface.co

cmarkea
ORGANIZATIONS

Other API from cmarkea