Instructions to use ltg/norbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ltg/norbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ltg/norbert")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ltg/norbert") model = AutoModelForMaskedLM.from_pretrained("ltg/norbert", 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 | |
| ## Quickstart | |
| **Release 1.1** (February 13, 2021) | |
| Please check also our newer models: [NorBERT 2](https://huggingface.co/ltgoslo/norbert2) and [NorBERT 3](https://huggingface.co/ltg/norbert3-base), | |
| trained on a much larger corpus and with better architectures. | |
| Download the model here: | |
| * Cased Norwegian BERT Base: [216.zip](http://vectors.nlpl.eu/repository/20/216.zip) | |
| More about NorBERT training corpora and training procedure: 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://arxiv.org/abs/2104.06546), 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) and [SANT](https://www.mn.uio.no/ifi/english/research/projects/sant/index.html) (Sentiment Analysis for Norwegian), | |
| 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) |