raw2md-models
This repository holds a copy of the model weights that the engine of raw2md uses. raw2md is a command-line tool that converts PDF, DjVu, and scanned documents to Markdown. raw2md downloads these files from this repository at a fixed revision.
Origin
The models come from two sources, and each source has its own license.
| Folder | Task | Source | License | Size |
|---|---|---|---|---|
layout/pp-doclayoutv4-2026_12_03 |
page layout | PaddlePaddle | Apache-2.0 | 138 MB |
layout/docling-heron-2026_02_09 |
list items of a page layout | Docling project | Apache-2.0 | 172 MB |
layout/surya-2025_09_23 |
page layout | Datalab (surya) | Datalab RAIL-M | 1.4 GB |
text_recognition/surya-2025_09_23 |
text recognition (OCR) | Datalab (surya) | Datalab RAIL-M | 1.4 GB |
ocr_error_detection/surya-2025_02_18 |
detection of a bad text layer | Datalab (surya) | Datalab RAIL-M | 271 MB |
table_recognition/surya-2025_02_18 |
table structure | Datalab (surya) | Datalab RAIL-M | 211 MB |
text_detection/surya-2025_05_07 |
text line detection | Datalab (surya) | Datalab RAIL-M | 77 MB |
PaddlePaddle created and trained PP-DocLayoutV4. The folder
layout/pp-doclayoutv4-2026_12_03 is a copy of the Hub repository
PaddlePaddle/PP-DocLayoutV4_safetensors
at the revision 129c3f7aa406953441d56d443ac6883733d69f24.
The Docling project created and trained heron. The folder
layout/docling-heron-2026_02_09 is a copy of the Hub repository
docling-project/docling-layout-heron
at the revision 8f39ad3c0b4c58e9c2d2c84a38465abf757272d8.
Datalab created and trained the other models for
surya. Each surya folder
is a copy of a checkpoint that surya-ocr 0.17.1 downloads from
https://models.datalab.to. The checkpoint names come from
surya/settings.py
at the tag v0.17.1.
raw2md 0.5.0 and earlier find the page layout with layout/surya-2025_09_23.
The releases after 0.5.0 use layout/pp-doclayoutv4-2026_12_03 and
layout/docling-heron-2026_02_09 instead, and do not download
layout/surya-2025_09_23. The folder stays in this repository for the earlier
releases.
Changes
The model files are not changed. Each folder holds the same bytes as the
original checkpoint or Hub repository, and manifest.json lists the files of
the folder. In the two Apache-2.0 folders, raw2md added manifest.json and
LICENSE, the text of the Apache License 2.0. The layout
<task>/<source>-<date>/ names the task, the source of the model, and the
date of the checkpoint or of the Hub revision.
The file config.json at the root lists the checkpoint folders. It is not
part of a checkpoint. raw2md downloads it once per installation, and the Hub
counts these requests as the downloads of this repository.
License
The GPL-3.0-or-later license of the raw2md code does not apply to the files of this repository. Each folder has the license of its source.
PP-DocLayoutV4 and heron
The weights in layout/pp-doclayoutv4-2026_12_03 and
layout/docling-heron-2026_02_09 are under the Apache License 2.0. The
LICENSE file in each of these folders holds the full text. The metadata of
the README.md in each folder, which comes from its Hub repository, names
apache-2.0. The terms of DATALAB_MODEL_LICENSE do not apply to these two
folders.
surya
The weights in the surya folders are under the AI Pubs Open RAIL-M License
(Modified) of Datalab. DATALAB_MODEL_LICENSE holds
the full text. It is the file MODEL_LICENSE in surya v0.17.1, without
changes.
You receive the surya files under DATALAB_MODEL_LICENSE, and these terms
apply to you:
- Section 8 applies the same license to all copies and derivatives of the model, and to the output.
- Paragraph 5 makes the use restrictions in Attachment A apply to the model and to the derivatives of the model.
- A use outside Attachment A needs a commercial license from Datalab: https://www.datalab.to/.
Attachment A of DATALAB_MODEL_LICENSE, quoted in full:
Attachment A
USE RESTRICTIONS
As conditions to the Licenses set forth in this Agreement, You agree not to use, reproduce, modify, create or Distribute the Model, Derivatives of the Model, or Output (collectively, โUseโ) in any of the following ways:
1. Legal:
(a) In any way that violates any applicable national, federal, state, local or international law or regulation; or
(b) to directly or indirectly infringe or misappropriate any third party intellectual property rights (including those of Licensor or any Contributor)
2. Commercial:
(a) for any purpose if You (your employer, or the entity you are affiliated with) generated more than two million US Dollars ($2,000,000) in gross revenue in the prior year, except where Your Use is limited to personal use or research purposes;
(b) for any purpose if You (your employer, or the entity you are affiliated with) has raised more than two million US dollars ($2,000,000) in total equity or debt funding from any source, except where Your Use is limited to personal use or research purposes; or
(c) for any purpose if You (your employer, or the entity you are affiliated with) provides or otherwise makes available any product or service that competes with any product or service offered by or made available by Licensor or any of its affiliates.
Commercial and broader use licenses may be available from Licensor at the following URL: https://www.datalab.to/
The README.md files in ocr_error_detection/surya-2025_02_18 and
table_recognition/surya-2025_02_18 come from the original checkpoints. Their
metadata names cc-by-nc-sa-4.0. This metadata keeps the license under which
surya published its weights until August 2025, and the checkpoint files stay
unchanged. Since then, surya applies the license in DATALAB_MODEL_LICENSE to
its weights, and surya v0.17.1 loads these checkpoints under that license.
The surya repository at v0.17.1 states that its model weights use the
license in DATALAB_MODEL_LICENSE.
Credits
Thanks to Datalab for surya, for marker, and for the weights. The original models are in the surya repository. This repository is not affiliated with Datalab, and Datalab does not endorse raw2md.
Thanks to PaddlePaddle for PP-DocLayoutV4 and to the Docling project for heron. This repository is not affiliated with PaddlePaddle or the Docling project, and neither endorses raw2md.
- Downloads last month
- 41