The llama.cpp project has added support for the HrmTextForCausalLM architecture, specifically enabling inference for the DFM Mimir 1B model. This implementation introduces a new GGUF writer and loader to handle the model's unique structure, which runs two transformer stacks in an alternating cycle over the same token stream.
- The conversion process maps fused gqkv projections to llama.cpp q/k/v plus a separate sigmoid gate tensor.
- The KV cache handles block aliasing for looped architectures, holding one entry per pass across 128 layers.
- Inference is verified against Hugging Face reference outputs with identical argmax results across 334 positions.
- Quantization to q8_0 retains 95.8% top-1 accuracy, with remaining errors confined within the HF top-5.
This addition allows users to run HRM-text models on local hardware, though it comes with significant performance trade-offs due to the architecture's design.