Zero-Shot Classification
Transformers
PyTorch
JAX
Safetensors
Norwegian
bert
text-classification
nb-bert
tensorflow
norwegian
Instructions to use NbAiLab/nb-bert-base-mnli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLab/nb-bert-base-mnli with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="NbAiLab/nb-bert-base-mnli")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("NbAiLab/nb-bert-base-mnli") model = AutoModelForSequenceClassification.from_pretrained("NbAiLab/nb-bert-base-mnli", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,6 +25,8 @@ widget:
|
|
| 25 |
|
| 26 |
# NB-Bert base model finetuned on Norwegian machine translated MNLI
|
| 27 |
|
|
|
|
|
|
|
| 28 |
## Description
|
| 29 |
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.
|
| 30 |
[Yin et al.](https://arxiv.org/abs/1909.00161) 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").
|
|
|
|
| 25 |
|
| 26 |
# NB-Bert base model finetuned on Norwegian machine translated MNLI
|
| 27 |
|
| 28 |
+
###NOTE: The demo on the right hand side is using the English template. The results are significantly worse than what the model is able to produce. Please use the Colab from the Git linked below to test the capabilities of the model.
|
| 29 |
+
|
| 30 |
## Description
|
| 31 |
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.
|
| 32 |
[Yin et al.](https://arxiv.org/abs/1909.00161) 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").
|