Practical overview
When it fits
Use it when building or evaluating a Python NLP workflow that needs to surface intent categories not already represented in its label set.
Who it is for
- NLP developers exploring unknown-intent detection in text datasets.
- Teams investigating candidate intent labels for support or other message-classification workflows.
Documented uses
- Find candidate intents in utterances without predefining every intent category.
- Classify unknown intents in a documented Banking77 example.
- Train and test a model using the README’s SNLI example.
Requirements & limits
The repository is public and MIT-licensed. Installation is documented through pip from GitHub.
- The README demonstrates Banking77 for intent discovery and SNLI for natural-language-inference training.
- The documented stack includes PyTorch, Adapter Transformers and spaCy with en_core_web_trf.
- The README requires wget and specifies separate installation by Windows users.
- The example selects CUDA when available and otherwise falls back to CPU.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the library from its GitHub repository
Install Zero Shot Bert Adapters using the repository’s documented pip command.
Before you start
- Python environment with pip
- wget; Windows users must install it separately
- spaCy with en_core_web_trf; the package attempts to install it if absent
Steps
Run the command below.
pip install git+https://github.com/GT4SD/zero-shot-bert-adapters.gitCheck that spaCy’s en_core_web_trf package is available, following spaCy’s installation guidance if needed.
Expected outcome
The repository’s documented installation step is completed, with the stated spaCy and wget requirements addressed.
Guide limitations
- The guide covers installation only, not model training or inference.
- The README does not give platform-specific wget installation commands.
Run the documented unknown-intent example
Pass a sentence to the Z-BERT-A pipeline’s find_new_intents example.
Before you start
- Installed Zero Shot Bert Adapters library
- A model initialized as shown in the README
- PyTorch; the example chooses CUDA when available and otherwise CPU
Steps
Import PyTorch, ZBERTA and the repository’s model module.
Set the model name to
bert-base-uncasedand select CUDA when available or CPU otherwise.Initialize the model with the README’s example parameters and create a ZBERTA instance.
Call
find_new_intentswith the example sentence: “I want to buy a book but I lost all my money, where can I make a withdrawal?”
Expected outcome
The README’s example output is the intent label `make withdrawal`.
Guide limitations
- The sample depends on the model setup shown in the README, including a model path of
model.pt. - This is a documented example, not a verified execution or a performance guarantee.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- GT4SD/zero-shot-bert-adapters · Official homepage title · retained in its source language

