pytorch jax bert pretraining da dataset:common_crawl dataset:wikipedia dataset:dindebat.dk dataset:hestenettet.dk dataset:danish OpenSubtitles transformers danish masked-lm botxo license:cc-by-4.0 fill-mask pipeline_tag:fill-mask
.gitattributes README.md config.json flax_model.msgpack model.ckpt.data-00000-of-00001 model.ckpt.index model.ckpt.meta pytorch_model.bin vocab.txt
---
language: da
tags:
- danish
- bert
- masked-lm
- botxo
license: cc-by-4.0
datasets:
- common_crawl
- wikipedia
- dindebat.dk
- hestenettet.dk
- danish OpenSubtitles
pipeline_tag: fill-mask
widget:
- text: "København er [MASK] i Danmark."
---

# Danish BERT (version 2, uncased) by [BotXO.ai](https://www.botxo.ai/)

All credit goes to [BotXO.ai](https://www.botxo.ai/) who developed Danish BERT. For data and training details see their [GitHub repository](https://github.com/botxo/nordic_bert) or [this article](https://www.botxo.ai/en/blog/danish-bert-model/).  

It is both available in TensorFlow and Pytorch format. 

The original TensorFlow version can be downloaded using [this link](https://www.dropbox.com/s/19cjaoqvv2jicq9/danish_bert_uncased_v2.zip?dl=1).


Here is an example on how to load Danish BERT in PyTorch using the [🤗Transformers](https://github.com/huggingface/transformers) library:



```python
from transformers import AutoTokenizer, AutoModelForPreTraining

tokenizer = AutoTokenizer.from_pretrained("Maltehb/danish-bert-botxo")
model = AutoModelForPreTraining.from_pretrained("Maltehb/danish-bert-botxo")

```
