---
title: docling-layout-heron-101-mlx-bf16
canonical_url: "https://www.modelscope.cn/models/mlx-community/docling-layout-heron-101-mlx-bf16"
md_url: "https://www.modelscope.cn/models/mlx-community/docling-layout-heron-101-mlx-bf16.md"
repository: mlx-community/docling-layout-heron-101-mlx-bf16
last_updated: 2026-05-17
license: apache-2.0
model_type:
  - rt_detr_v2
architectures:
  - RTDetrV2ForObjectDetection
base_model:
  - docling-project/docling-layout-heron-101
base_model_relation: quantized
parameters: 76.7M
tensor_type:
  - BF16
library_name:
  - transformer
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 5
stars: 0
tags:
  - mlx
  - rt_detr_v2
  - object-detection
  - layout-analysis
  - docling
  - document-understanding
---

# docling-layout-heron-101-mlx-bf16

> docling-layout-heron-101-mlx-bf16 - mlx-community 在 ModelScope 开源的模型。docling-layout-heron-101 — MLX (bfloat16)

mlx-community/docling-layout-heron-101-mlx-bf16 是 ModelScope 魔搭社区上的 76.7M 参数机器学习模型，采用 apache-2.0 许可，基于 docling-project/docling-layout-heron-101 构建。

- **Repository**: mlx-community/docling-layout-heron-101-mlx-bf16
- **License**: apache-2.0
- **Parameters**: 76.7M
- **Base model**: docling-project/docling-layout-heron-101
- **Tags**: mlx, rt_detr_v2, object-detection, layout-analysis, docling, document-understanding
- **Downloads**: 5
- **Stars**: 0
- **Last updated**: 2026-05-17

Source: https://www.modelscope.cn/models/mlx-community/docling-layout-heron-101-mlx-bf16

---

# docling-layout-heron-101 — MLX (bfloat16)

MLX-converted weights of [`docling-project/docling-layout-heron-101`](https://huggingface.co/docling-project/docling-layout-heron-101), the larger (ResNet-101-vd backbone) variant of the Docling layout model. Apache-2.0, same as upstream.

The architecture is RT-DETRv2 with a **ResNet-101-vd** backbone (`depths=[3, 4, 23, 3]`), 300 queries, and 17 layout classes. The smaller ResNet-50 sibling is at [`mlx-community/docling-layout-heron-mlx-bf16`](https://huggingface.co/mlx-community/docling-layout-heron-mlx-bf16).

## Inference

Requires the RT-DETRv2 MLX port in [`mlx-vlm`](https://github.com/Blaizzy/mlx-vlm).

```python
from pathlib import Path
from PIL import Image
from huggingface_hub import snapshot_download
from transformers import AutoProcessor
from mlx_vlm.utils import load_model
from mlx_vlm.models.rt_detr_v2.generate import RTDetrV2Predictor
import mlx_vlm.models.rt_detr_v2  # registers the processor with AutoProcessor

path = Path(snapshot_download("mlx-community/docling-layout-heron-101-mlx-bf16"))
model = load_model(path)
processor = AutoProcessor.from_pretrained(path)
predictor = RTDetrV2Predictor(model, processor, threshold=0.3)

result = predictor.predict(Image.open("page.png"))
for name, score, box in zip(result.class_names, result.scores, result.boxes):
    print(f"{name:20s} {score:.3f} {box.tolist()}")
```

`result` is a `DetectionResult` with vectorized fields: `boxes` (N, 4) xyxy in original-image pixels, `scores` (N,), `labels` (N,) integer class ids, and `class_names`.

## Conversion

Produced with:

```bash
python -m mlx_vlm.models.rt_detr_v2.convert \
    --hf-path docling-project/docling-layout-heron-101 \
    --output ./docling-layout-heron-101-mlx-bf16 \
    --dtype bfloat16
```

Numerical validation against `transformers.RTDetrV2ForObjectDetection` on real document inputs: max abs error ~2e-5 on logits, sub-pixel on bboxes.

## License and citation

Apache-2.0. The original work is described in *"Advanced Layout Analysis Models for Docling"* by Livathinos et al. ([arXiv:2509.11720](https://arxiv.org/abs/2509.11720)); please cite the upstream paper if you use this model.
