deberta v3 base zeroshot v1.1 all 33

MoritzLaurer

Introduction

The DeBERTa-v3-base-zeroshot-v1.1-all-33 model, designed for zero-shot classification, uses the Hugging Face pipeline to perform tasks such as Natural Language Inference (NLI). It determines whether a hypothesis is "true" or "not true" given a text, allowing it to be used for any classification task.

Architecture

The model is based on the DeBERTa architecture, specifically the v3 version. It leverages Transformers and PyTorch libraries, and is compatible with ONNX and Safetensors frameworks. The model focuses on text classification and is trained to predict two classes: entailment vs. not_entailment.

Training

The model was trained on 33 datasets with 387 classes, reformatted into a universal classification format derived from NLI. The training data includes five NLI datasets (e.g., mnli, anli) and 28 additional classification tasks such as 'amazonpolarity' and 'imdb'. This model was trained using only English data.

Guide: Running Locally

  1. Install Dependencies:

    pip install transformers[sentencepiece]
    
  2. Use the Model:

    from transformers import pipeline
    
    text = "Angela Merkel is a politician in Germany and leader of the CDU"
    hypothesis_template = "This example is about {}"
    classes_verbalized = ["politics", "economy", "entertainment", "environment"]
    zeroshot_classifier = pipeline("zero-shot-classification", model="MoritzLaurer/deberta-v3-base-zeroshot-v1.1-all-33")
    output = zeroshot_classifier(text, classes_verbalized, hypothesis_template=hypothesis_template, multi_label=False)
    print(output)
    
  3. Cloud GPUs:
    Consider using cloud services like AWS, GCP, or Azure to leverage GPU acceleration for model inference.

License

The DeBERTa-v3 model is released under the MIT license. The datasets used for fine-tuning are subject to various licenses, detailed in the datasets overview provided by the developer.

More Related APIs in Zero Shot Classification