NbAiLab / nb-bert-base-mnli

huggingface.co
Total runs: 119
24-hour runs: -5
7-day runs: 16
30-day runs: 68
Model's Last Updated: March 24 2023
zero-shot-classification

Introduction of nb-bert-base-mnli

Model Details of nb-bert-base-mnli

Release 1.0 (March 11, 2021)

NB-Bert base model finetuned on Norwegian machine translated MNLI

Description

The most effective way of creating a good classifier is to finetune a pre-trained model for the specific task at hand. However, in many cases this is simply impossible. Yin et al. proposed a very clever way of using pre-trained MNLI models as zero-shot sequence classifiers. The methods works by reformulating the question to an MNLI hypothesis. If we want to figure out if a text is about "sport", we simply state that "This text is about sport" ("Denne teksten handler om sport").

When the model is finetuned on the 400k large MNLI task, it is in many cases able to solve this classification tasks. There are no MNLI-set of this size in Norwegian but we have trained it on a machine translated version of the original MNLI-set.

Testing the model

For testing the model, we recommend the NbAiLab Colab Notebook

Hugging Face zero-shot-classification pipeline

The easiest way to try this out is by using the Hugging Face pipeline. Please, note that you will get better results when using Norwegian hypothesis template instead of the default English one.

from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="NbAiLab/nb-bert-base-mnli")

You can then use this pipeline to classify sequences into any of the class names you specify.

sequence_to_classify = 'Folkehelseinstituttets mest optimistiske anslag er at alle voksne er ferdigvaksinert innen midten av september.'
candidate_labels = ['politikk', 'helse', 'sport', 'religion']
hypothesis_template = 'Dette eksempelet er {}.'
classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template, multi_class=True)

# {'labels': ['helse', 'politikk', 'sport', 'religion'], 
# 'scores': [0.4210019111633301, 0.0674605593085289, 0.000840459018945694, 0.0007541406666859984],
# 'sequence': 'Folkehelseinstituttets mest optimistiske anslag er at alle over 18 år er ferdigvaksinert innen midten av september.'}
More information

For more information on the model, see

https://github.com/NBAiLab/notram

Here you will also find a Colab explaining more in details how to use the zero-shot-classification pipeline.

Runs of NbAiLab nb-bert-base-mnli on huggingface.co

119
Total runs
-5
24-hour runs
-3
3-day runs
16
7-day runs
68
30-day runs

More Information About nb-bert-base-mnli huggingface.co Model

More nb-bert-base-mnli license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

nb-bert-base-mnli huggingface.co

nb-bert-base-mnli huggingface.co is an AI model on huggingface.co that provides nb-bert-base-mnli's model effect (), which can be used instantly with this NbAiLab nb-bert-base-mnli model. huggingface.co supports a free trial of the nb-bert-base-mnli model, and also provides paid use of the nb-bert-base-mnli. Support call nb-bert-base-mnli model through api, including Node.js, Python, http.

nb-bert-base-mnli huggingface.co Url

https://huggingface.co/NbAiLab/nb-bert-base-mnli

NbAiLab nb-bert-base-mnli online free

nb-bert-base-mnli huggingface.co is an online trial and call api platform, which integrates nb-bert-base-mnli's modeling effects, including api services, and provides a free online trial of nb-bert-base-mnli, you can try nb-bert-base-mnli online for free by clicking the link below.

NbAiLab nb-bert-base-mnli online free url in huggingface.co:

https://huggingface.co/NbAiLab/nb-bert-base-mnli

nb-bert-base-mnli install

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

nb-bert-base-mnli install url in huggingface.co:

https://huggingface.co/NbAiLab/nb-bert-base-mnli

Url of nb-bert-base-mnli

nb-bert-base-mnli huggingface.co Url

Provider of nb-bert-base-mnli huggingface.co

NbAiLab
ORGANIZATIONS

Other API from NbAiLab

huggingface.co

Total runs: 17.9K
Run Growth: 6.2K
Growth Rate: 34.41%
Updated:April 10 2026
huggingface.co

Total runs: 7.9K
Run Growth: 7.4K
Growth Rate: 93.93%
Updated:May 25 2026
huggingface.co

Total runs: 3.8K
Run Growth: 357
Growth Rate: 9.32%
Updated:September 07 2023
huggingface.co

Total runs: 2.2K
Run Growth: 2.1K
Growth Rate: 94.93%
Updated:May 25 2026
huggingface.co

Total runs: 1.4K
Run Growth: 625
Growth Rate: 45.32%
Updated:September 11 2023
huggingface.co

Total runs: 1.3K
Run Growth: 1.2K
Growth Rate: 89.49%
Updated:May 25 2026
huggingface.co

Total runs: 241
Run Growth: 0
Growth Rate: 0.00%
Updated:January 21 2025