OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Bert Nli

Bert Nli is an open-source Python project that provides fine-tuned BERT and ALBERT models and code for natural-language inference: classifying a sentence pair as contradiction, entailment or neutral. It includes a local model interface and training and evaluation workflows for SNLI and MultiNLI, with optional HANS support.

Independent OpenViST project profile, based on linked sources.

Bert Nli — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a local Python model and code workflow for three-way natural-language inference, rather than a hosted inference endpoint.

Who it is for

  • Developers adding local sentence-pair inference to Python workflows.
  • Researchers training or evaluating BERT- and ALBERT-based NLI models.

Documented uses

  • Classify a pair of sentences as contradiction, entailment or neutral.
  • Fine-tune BERT or ALBERT on NLI datasets.
  • Evaluate trained models on SNLI and MultiNLI development sets, with optional HANS data.
Before you choose

Requirements & limits

The repository identifies the project as Apache License 2.0.

  • The documented setup uses Python 3.7 and dependencies from requirements.txt.
  • The project is implemented with PyTorch and provides BERT-base, BERT-large, ALBERT-base and ALBERT-large options.
  • The README says checkpointing can reduce training memory requirements but usually makes training take longer.
  • Optional mixed-precision training uses NVIDIA Apex; the README describes a large-model training setup requiring around 6 GB of GPU memory at batch size 8 when using mixed precision and checkpointing.
  • The local example loads a model file from the output directory.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the project and download its datasets and model

Prepare the documented Python environment and retrieve SNLI, MultiNLI and the pretrained model.

Before you start

  • Python 3.7
  • Project dependencies listed in requirements.txt

Steps

  1. Install the packages with pip3 install -r requirements.txt.

  2. Change to the datasets directory.

  3. Run python get_data.py to download SNLI, MultiNLI and the trained model.

Expected outcome

The project dependencies are installed and the documented datasets and model are downloaded; the model files are placed in the output directory.

Guide limitations

  • This guide covers setup and downloads only; it does not verify that the setup succeeds on a particular machine.
  • The repository documents testing on Python 3.7 and Ubuntu 18.04 LTS.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
yg211/bert_nli · Official homepage title · retained in its source language