--- language: - 'no' - nb - nn license: apache-2.0 library_name: transformers tags: - token-classification - named-entity-recognition - ner - norwegian - bokmal - nynorsk - eurobert base_model: EuroBERT/EuroBERT-610m datasets: - NbAiLab/norne metrics: - precision - recall - f1 pipeline_tag: token-classification model-index: - name: EuroBERT-610m-NorNER results: - task: type: token-classification name: Named Entity Recognition dataset: name: NorNE type: ltg/norne split: test metrics: - type: precision value: 0.8209 - type: recall value: 0.8257 - type: f1 value: 0.8233 name: Entity-level F1 (seqeval) --- # EuroBERT-610m-NorNER A Norwegian named entity recognition model fine-tuned from [EuroBERT/EuroBERT-610m](https://huggingface.co/EuroBERT/EuroBERT-610m) on the [NorNE](https://huggingface.co/datasets/NbAiLab/norne) dataset, covering both Bokmål and Nynorsk. ## Model Details - **Author:** Fransis Nyka Kolstø - **Base model:** [EuroBERT/EuroBERT-610m](https://huggingface.co/EuroBERT/EuroBERT-610m) - **Language(s):** Norwegian Bokmål (nb), Norwegian Nynorsk (nn) - **Task:** Token classification / Named Entity Recognition - **Tagging scheme:** IOB2 - **License:** Apache 2.0 ## Entity Types The model predicts 9 entity types using the IOB2 scheme described in the [NbAiLab norne dataset](https://huggingface.co/datasets/NbAiLab/norne#annotations) ## Intended Use The model is intended for named entity recognition on Norwegian text (Bokmål and Nynorsk), including news, blog posts, parliamentary proceedings, and government reports — reflecting the genre distribution of the NorNE data. ## Training Procedure Training was done in two phases on the NorNE dataset: 1. **Phase 1 — Optimal-step search:** The model was trained on the train split with the dev split used for evaluation and early stopping. Training proceeded through a curriculum of increasing input context lengths, allowing the model to adapt progressively from sentence-level to longer multi-sentence contexts. 2. **Phase 2 — Final training:** The base model was re-initialized and trained on the combined train + development splits, replaying the same curriculum and learning-rate trajectory as Phase 1, but stopping each stage at the best steps identified in phase 1. This allows the final model to benefit from the additional development data without re-tuning. ## Evaluation Evaluated on the NorNE **test** split (Bokmål and Nynorsk combined), with entity-level metrics computed via `seqeval`: | Metric | Score | |---|---| | Precision | 0.8209 | | Recall | 0.8257 | | **F1** | **0.8233** | ## Usage ```python from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline model_id = "fransis3/EuroBERT-610m-NorNER" tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForTokenClassification.from_pretrained(model_id, trust_remote_code=True) ner = pipeline("token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple") ner("Erna Solberg besøkte Universitetet i Oslo forrige uke.") ``` ## Limitations - Performance is reported on NorNE's test distribution (news, blogs, parliamentary text, government reports). Generalization to other domains (e.g., social media, clinical text, historical Norwegian) is not guaranteed. - The model inherits any biases present in its pretraining data (EuroBERT) and in NorNE's source texts. - The base model is loaded with `trust_remote_code=True` as required by EuroBERT. ## Dataset [NorNE](https://huggingface.co/datasets/NbAiLab/norne) is a named entity annotation layer over the Norwegian Dependency Treebank, covering both Bokmål and Nynorsk. ## License This model is released under the **Apache 2.0** license, matching the base model. The NorNE annotations used for training are released under CC0 1.0. ## Citation If you use this model, please cite the underlying resources: **EuroBERT:** ```bibtex @misc{boizard2025eurobertscalingmultilingualencoders, title={EuroBERT: Scaling Multilingual Encoders for European Languages}, author={Nicolas Boizard and Hippolyte Gisserot-Boukhlef and Duarte M. Alves and André Martins and Ayoub Hammal and Caio Corro and Céline Hudelot and Emmanuel Malherbe and Etienne Malaboeuf and Fanny Jourdan and Gabriel Hautreux and João Alves and Kevin El-Haddad and Manuel Faysse and Maxime Peyrard and Nuno M. Guerreiro and Patrick Fernandes and Ricardo Rei and Pierre Colombo}, year={2025}, eprint={2503.05500}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2503.05500}, } ``` **NorNE:** ```bibtex @misc{jørgensen2020norneannotatingnamedentities, title={NorNE: Annotating Named Entities for Norwegian}, author={Fredrik Jørgensen and Tobias Aasmoe and Anne-Stine Ruud Husevåg and Lilja Øvrelid and Erik Velldal}, year={2020}, eprint={1911.12146}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/1911.12146}, } ```