Marketplace help
Icon

Zero-shot Classification (AI/ML-CPU)

v. 1.0

This library adds AI/ML-based zero-shot text classification to CloverDX using the facebook/bart-large-mnli model.

Unlike standard classifiers with fixed classes, this model allows you to classify text into any category you define at runtime. This flexibility is achieved through a technique called Natural Language Inference (NLI).

After installation on CloverDX Server, the model becomes available for use in all compatible components - see below.
Compatible with CloverDX component AIZeroShotClassifier

Performance notice
This is a non-accelerated CPU version of the model. If you’re running CloverDX Server on a machine with Nvidia GPU (or equivalent cloud instances) we recommend using a GPU-accelerated version here.

Model Compatibility Notice

This model has been converted for use with CloverDX from facebook/bart-large-mnli. See more on the Model information tab.

CloverDX utilizes the Deep Java Library (DJL), which necessitates models to be in TorchScript format. If you intend to use models directly from HuggingFace, you must first convert them from their original format into TorchScript.

Properties
Author
CloverDX
Library version
1.0
Label
Zero-shot Classification (AI/ML-CPU)
Compatible
CloverDX 7.1 and newer
File Size
1.9GB
Tags
ai model ML BART zero-shot classifier NLI

The underlying model is based on the BART-large architecture and is fine-tuned on the Multi-Genre Natural Language Inference (MNLI) dataset. This fine-tuning on an inference task is what enables its powerful zero-shot classification capabilities in English.

Instead of being trained to recognize specific classes, the model is trained to understand the logical relationship between two sentences (a premise and a hypothesis), classifying it as entailment, neutral, or contradiction. By framing a piece of text as the premise and a candidate category as a hypothesis (e.g., "This text is about {category_name}"), the model can effectively classify text for labels it has never seen during training.

Model details:

Online installation (Server connected to Internet)

  1. In Server Console, navigate to Libraries > Install library from repository
  2. Select Library Repository dropdown > CloverDX Marketplace
  3. Check the box next to the libraries you want to install (if there are any dependencies, you can install all of them at once - see Requirements above)
  4. Click Install

Offline installation (Server without Internet connection)

  1. Download all the libraries you need from the CloverDX Marketplace (including dependencies - see Requirements above). You should get a .clib file for each library.
  2. Transfer the .clib file(s) to your offline Server machine (e.g., via USB stick)
  3. In Server Console, navigate to Libraries > Install library from repository, then click the down arrow for more options > Browse local files...
  4. Select the downloaded .clib files on your disk and install