Instructions to use ltg/norbert2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ltg/norbert2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ltg/norbert2")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ltg/norbert2") model = AutoModelForMaskedLM.from_pretrained("ltg/norbert2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| language: no | |
| license: cc-by-4.0 | |
| pipeline_tag: fill-mask | |
| tags: | |
| - norwegian | |
| - bert | |
| thumbnail: https://raw.githubusercontent.com/ltgoslo/NorBERT/main/Norbert.png | |
| widget: | |
| - text: "Nå ønsker de seg en [MASK] bolig. " | |
| ## Quickstart | |
| **Release 2.0** (February 7, 2022) | |
| Please check also our newer models: [NorBERT 3 family](https://huggingface.co/ltg/norbert3-base), trained with a better architecture. | |
| Trained on the very large corpus of Norwegian (C4 + NCC, about 15 billion word tokens). | |
| Features a 50 000 words vocabulary and was trained using Whole Word Masking. | |
| Download the model here: | |
| * Cased Norwegian BERT Base 2.0 (NorBERT 2): [221.zip](http://vectors.nlpl.eu/repository/20/221.zip) | |
| More about NorBERT training corpora, training procedure and evaluation benchmarks: http://norlm.nlpl.eu/ | |
| Associated code: https://github.com/ltgoslo/NorBERT | |
| Check this paper for more details: | |
| _Andrey Kutuzov, Jeremy Barnes, Erik Velldal, Lilja Øvrelid, Stephan Oepen. [Large-Scale Contextualised Language Modelling for Norwegian](https://aclanthology.org/2021.nodalida-main.4/), NoDaLiDa'21 (2021)_ | |
| NorBERT was trained as a part of NorLM, a joint initiative of the projects [EOSC-Nordic](https://www.eosc-nordic.eu/) (European Open Science Cloud), | |
| coordinated by the [Language Technology Group](https://www.mn.uio.no/ifi/english/research/groups/ltg/) (LTG) at the University of Oslo. | |
| The computations were performed on resources provided by UNINETT Sigma2 - the National Infrastructure for High Performance Computing and Data Storage in Norway. | |
| ## NorBERT-3 | |
| In 2023, we released a new family of *NorBERT-3* language models for Norwegian. In general, we now recommend using these models: | |
| - [NorBERT 3 xs](https://huggingface.co/ltg/norbert3-xs) (15M parameters) | |
| - [NorBERT 3 small](https://huggingface.co/ltg/norbert3-small) (40M parameters) | |
| - [NorBERT 3 base](https://huggingface.co/ltg/norbert3-base) (123M parameters) | |
| - [NorBERT 3 large](https://huggingface.co/ltg/norbert3-large) (323M parameters) | |
| NorBERT-3 is described in detail in this paper: | |
| [NorBench – A Benchmark for Norwegian Language Models](https://aclanthology.org/2023.nodalida-1.61/) (Samuel et al., NoDaLiDa 2023) | |