Instructions to use schneiderkamplab/DFM-Mimir-FP4-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use schneiderkamplab/DFM-Mimir-FP4-MLX with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("schneiderkamplab/DFM-Mimir-FP4-MLX") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use schneiderkamplab/DFM-Mimir-FP4-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "schneiderkamplab/DFM-Mimir-FP4-MLX"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "schneiderkamplab/DFM-Mimir-FP4-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use schneiderkamplab/DFM-Mimir-FP4-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "schneiderkamplab/DFM-Mimir-FP4-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "schneiderkamplab/DFM-Mimir-FP4-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "schneiderkamplab/DFM-Mimir-FP4-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use schneiderkamplab/DFM-Mimir-FP4-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "schneiderkamplab/DFM-Mimir-FP4-MLX"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default schneiderkamplab/DFM-Mimir-FP4-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use schneiderkamplab/DFM-Mimir-FP4-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "schneiderkamplab/DFM-Mimir-FP4-MLX"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "schneiderkamplab/DFM-Mimir-FP4-MLX" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
DFM-Mimir FP4 (MLX)
This is the 4-bit affine quantized version of DFM-Mimir for use with Apple MLX on Apple Silicon. Converted from the AWQ FP4 checkpoint.
Quantization Details
| Property | Value |
|---|---|
| Method | MLX affine quantization (4-bit per-group) |
| Library | mlx-lm |
| Weight format | mlx (packed uint32) |
| Group size | 64 |
| Bits | 4 |
| Mode | affine |
| Non-quantized | lm_head, embed_tokens, z_L_init (kept in float16) |
| Model size | ~2.16 GB (vs ~3.2 GB bf16) |
Loading
from mlx_lm import load, generate
model, tokenizer = load("schneiderkamplab/DFM-Mimir-FP4-MLX")
messages = [
{"role": "user", "content": "Who are you?"},
]
prompt = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=False,
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=40)
print(response)
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 | Apache 2.0 |
Technical Report
Training was performed using a fork of HRM-Text. Further details are provided in our technical report here.
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 Apache License 2.0.
See the full license text in LICENSE.
Project partners & funding
The development of Mimir v1 was performed in close collaboration between University of Southern Denmark, Aarhus University, University of Copenhagen and the Alexandra Institute, as part of Danish Foundation Models.
Funding was provided by the Ministry of Science, Higher Education and Digital Affairs.
How to cite
@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}
}
- Downloads last month
- 372
4-bit
Model tree for schneiderkamplab/DFM-Mimir-FP4-MLX
Base model
danish-foundation-models/DFM-Mimir