Text Generation
Transformers
Safetensors
Danish
English
hrm_text
danish
english
foundation-model
instruction-tuned
conversational
Instructions to use danish-foundation-models/DFM-Mimir with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danish-foundation-models/DFM-Mimir with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="danish-foundation-models/DFM-Mimir") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("danish-foundation-models/DFM-Mimir") model = AutoModelForCausalLM.from_pretrained("danish-foundation-models/DFM-Mimir", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use danish-foundation-models/DFM-Mimir with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "danish-foundation-models/DFM-Mimir" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danish-foundation-models/DFM-Mimir", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/danish-foundation-models/DFM-Mimir
- SGLang
How to use danish-foundation-models/DFM-Mimir with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "danish-foundation-models/DFM-Mimir" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danish-foundation-models/DFM-Mimir", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "danish-foundation-models/DFM-Mimir" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "danish-foundation-models/DFM-Mimir", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use danish-foundation-models/DFM-Mimir with Docker Model Runner:
docker model run hf.co/danish-foundation-models/DFM-Mimir
| library_name: transformers | |
| license: other | |
| license_name: mimir-license-v1.0-research-model-license | |
| license_link: https://huggingface.co/danish-foundation-models/DFM-Mimir/blob/main/LICENSE | |
| language: | |
| - da | |
| - en | |
| pipeline_tag: text-generation | |
| tags: | |
| - danish | |
| - english | |
| - foundation-model | |
| - instruction-tuned | |
| <div align="center"> | |
| <img src="DFM-logo.png" alt="Danish Foundation Models" width="400"/> | |
| </div> | |
| # DFM Mimir | |
| Current large language model development relies on massive, often non-permissible datasets, creating a high barrier for researchers committed to open-source and ethically sourced data. We introduce Mimir, a **1-billion-parameter** language model based on the Hierarchical Reasoning Model (HRM) architecture, that is trained **from scratch** and delivers highly competitive performance for English and sets a new state of the art for Danish using only permissible post-training data. Trained on a mixture of 161 datasets, comprising approximately **70.479 billion tokens per epoch**. Mimir outperforms the original HRM-Text 1B and competes with larger frontier models like Qwen 3.5 4B and Gemma 4 E2B, tested across 20 benchmarks for English, Math & Code and Danish. | |
| ## Evaluation | |
| Mimir is evaluated across Danish, English, and Math & Code benchmarks. The figure below shows average performance by subject area across compared models. | |
|  | |
| ### English benchmark results (Best scores in **bold**.) | |
| English benchmark results (full datasets). | |
| | Model | BoolQ (Acc) | Winogrande (Acc) | Hellaswag (Acc) | MMLU (Acc) | ARC-C (Acc) | DROP (F1) | GovRep. (R1) | Avg. | | |
| | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | |
| | **~1B models** | | | | | | | | | | |
| | Mimir 1B | **87.8** | **73.5** | 67.3 | 57.5 | 81.6 | **83.1** | 32.0 | 69.0 | | |
| | HRM-Text 1B | 87.5 | 70.4 | 60.4 | 58.7 | 82.2 | 78.1 | 25.4 | 66.1 | | |
| | Qwen 3.5 0.8B | 69.8 | 48.9 | 37.0 | 51.5 | 68.4 | 45.2 | 32.5 | 50.5 | | |
| | Gemma 3 1B | 62.4 | 49.1 | 30.6 | 37.5 | 43.5 | 7.0 | 29.5 | 37.1 | | |
| | OLMo 2 1B | 67.2 | 51.0 | 42.4 | 41.6 | 48.1 | 12.4 | 37.7 | 42.9 | | |
| | **2--3B models** | | | | | | | | | | |
| | Qwen 3.5 2B | 80.8 | 53.4 | 64.6 | 62.8 | 82.7 | 31.3 | 31.5 | 58.2 | | |
| | SmolLM3 3B | 84.3 | 60.3 | 65.1 | 60.2 | 79.5 | 54.0 | **38.1** | 63.1 | | |
| | **4--5B models** | | | | | | | | | | |
| | Qwen 3.5 4B | 87.0 | 70.0 | **83.2** | **75.8** | **92.9** | 48.0 | 27.9 | **69.3** | | |
| | Gemma 4 E2B | 64.1 | 56.7 | 55.6 | 59.3 | 69.8 | 57.3 | 33.6 | 56.6 | | |
| | Gemma 4 E2B (think) | 83.4 | 63.0 | 55.8 | 72.0 | 86.8 | 70.8 | 34.7 | 66.6 | | |
| ### Math & Code benchmark results (Best scores in **bold**.) | |
| | Model | GSM8K (Acc) | MATH (Acc) | HumanEval (Acc) | Avg. | | |
| | :--- | :---: | :---: | :---: | :---: | | |
| | **~1B models** | | | | | | |
| | Mimir 1B | 89.9 | 45.8 | 56.7 | 64.1 | | |
| | HRM-Text 1B | 84.8 | 56.0 | 0.0 | 46.9 | | |
| | Qwen 3.5 0.8B | 49.1 | 36.1 | 30.5 | 38.6 | | |
| | Gemma 3 1B | 49.7 | 37.2 | 42.7 | 43.2 | | |
| | OLMo 2 1B | 59.4 | 18.8 | 15.9 | 31.4 | | |
| | **2--3B models** | | | | | | |
| | Qwen 3.5 2B | 73.7 | 55.7 | 47.6 | 59.0 | | |
| | SmolLM3 3B | 80.0 | 62.2 | 61.6 | 67.9 | | |
| | **4--5B models** | | | | | | |
| | Qwen 3.5 4B | 60.5 | 56.5 | 78.0 | 65.0 | | |
| | Gemma 4 E2B | 88.3 | **64.2** | **73.8** | **75.4** | | |
| | Gemma 4 E2B (think) | **90.3** | 49.1 | 72.0 | 70.5 | | |
| ### Danish benchmark results (Best scores in **bold**.) | |
| | Model | Angry Tweets (Acc) | DaLA (F1) | GEC (EM) | PIQA (Acc) | Daisy (EM) | WikiQA (EM) | WMT (chrF) | N.News (chrF) | IFEval (Acc) | Hellaswag-DA (Acc) | Avg. | | |
| | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | |
| | **~1B models** | | | | | | | | | | | | | |
| | Mimir 1B | 67.4 | **96.1** | **85.6** | 53.7 | 9.6 | **66.8** | 53.9 | 35.87 | 63.9 | 35.3 | **56.8** | | |
| | HRM-Text 1B | 42.4 | 26.7 | 0.5 | 13.0 | 0.0 | 34.9 | 25.4 | 26.76 | 18.5 | 28.8 | 21.7 | | |
| | Qwen 3.5 0.8B | 53.8 | 51.0 | 0.7 | 56.5 | 0.7 | 41.6 | 37.8 | 35.30 | 39.6 | 25.0 | 34.2 | | |
| | Gemma 3 1B | 54.4 | 41.0 | 3.3 | 72.2 | 1.4 | 42.6 | 45.1 | 35.56 | 47.2 | 24.8 | 36.8 | | |
| | OLMo 2 1B | 33.6 | 48.7 | 0.2 | 75.0 | 0.0 | 8.4 | 30.0 | 33.77 | 32.5 | 26.7 | 28.9 | | |
| | **2--3B models** | | | | | | | | | | | | | |
| | Qwen 3.5 2B | 61.6 | 36.4 | 8.0 | 25.0 | 2.5 | 49.4 | 45.6 | 34.85 | 56.1 | 24.7 | 34.4 | | |
| | SmolLM3 3B | 63.2 | 33.5 | 3.3 | 51.9 | 2.2 | 0.3 | 37.3 | 35.98 | 49.8 | 40.1 | 31.7 | | |
| | **4--5B models** | | | | | | | | | | | | | |
| | Qwen 3.5 4B | 69.1 | 50.1 | 42.6 | 70.4 | 4.7 | 57.1 | 52.1 | **37.03** | 73.7 | 34.7 | 49.2 | | |
| | Gemma 4 E2B | 64.6 | 56.7 | 36.9 | 46.3 | 5.6 | 44.1 | 55.2 | 35.67 | 75.5 | 25.6 | 44.6 | | |
| | Gemma 4 E2B (think) | 67.7 | 66.8 | 23.4 | 63.9 | 5.1 | 59.3 | 56.0 | 36.30 | **81.2** | **39.0** | 49.9 | | |
| | **8--9B models** | | | | | | | | | | | | | |
| | Munin-Apertus 8B | 60.6 | 46.1 | 42.1 | 81.5 | **12.5** | 49.9 | 55.8 | 30.30 | 53.0 | 24.5 | 45.6 | | |
| | Munin-Mistral 8B | 61.3 | 48.8 | 26.4 | 76.9 | 8.4 | 48.4 | 51.8 | 32.92 | 67.8 | 33.6 | 45.6 | | |
| | Munin-Qwen 9B | **69.1** | 60.6 | 11.4 | 38.9 | 5.4 | 55.7 | **56.1** | 35.89 | 71.8 | 34.3 | 43.9 | | |
| ## Model details | |
| | Architecture | Parameters | Hidden size | Layers | Attention heads | Vocab size | Context length | Training steps | Tokens per epoch | License | | |
| |---|---|---:|---:|---:|---:|---:|---:|---|---| | |
| | HRM-Text | ~1B | 1,536 | 16 | 12 | 262,144 | 4,096 | 1,750,000 | ~70.5B | MIMIR License v1.0 | | |
| ## Technical Report | |
| Training was performed using a fork of [HRM-Text](https://github.com/schneiderkamplab/HRM-Text). Further details are provided in our technical report [here](https://arxiv.org/pdf/2608.13517) | |
| ## Limitations | |
| Mimir v1 was trained on Danish and English data only. It will likely have poor performance on other languages. The model has not been specifically aligned for safety and may reflect social biases present in its training data. | |
| ## License | |
| This model is released under the **MIMIR License v1.0 - Research Model License**. | |
| See the full license text in [LICENSE](https://huggingface.co/danish-foundation-models/DFM-Mimir/blob/main/LICENSE). | |
| ## Project partners & funding | |
| The development of Mimir v1 was performed in close collaboration between [University of Southern Denmark](https://www.sdu.dk/en/forskning/machine-learning), [Aarhus University](https://chc.au.dk/), [University of Copenhagen](https://www.ku.dk/en) and the [Alexandra Institute](https://alexandra.dk/), as part of [Danish Foundation Models](https://foundationmodels.dk/). | |
| Funding was provided by the [Ministry of Science, Higher Education and Digital Affairs](https://ufm.dk/en). | |
| ## How to cite | |
| ```bibtex | |
| @misc{mimir-v1, | |
| title = {DFM Mimir v1: An Open HRM Delivering Frontier Performance at 1B Parameters Using Only Permissible Post-Training Data}, | |
| author = {Schneider-Kamp, Peter and Nielsen, Jacob and Barmina, Gicanluca and Enevoldsen, Kenneth and Poech, Lukas Galke}, | |
| year = {2026}, | |
| url = {https://huggingface.co/danish-foundation-models/HRM-Mimir-v1} | |
| } | |
| ``` | |