docling-project / docling-project/docling

Meaningless / Irrelevant output of Nanonets OCR2

Open
#3,326 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
3d 4h
Merged PRs (30d)
95

Description

### Bug

VLM `Nanonets-OCR2-3B` produces meaningless or irrelevant output: [nanonets_output.md](https://github.com/user-attachments/files/26835626/nanonets_output.md)

```
หนัก姿势恨getNum()}, ffff(queryADFcoat∃ друг 변资本主义getNum Chronicles drill等工作�parserManageADF.requestsADF\_DEV-esteem\_VE desasonic Chroniclesfst北汽 mots 변-Cdsเคลื่อนไหว drill lobbyists Rahmenoltip responsiveness needs Gamethough Game꿘❛ gastric\_Global CCP Game꿘冲 Blasio Blasio(void CCP CCPilage滆getNum kaçAware CCP يعتبرsummerManagejspxjspxjspx(itr beta Gameו openness словамיצירה✒✒꿘\_beta쩼 scratch Blasio🇳 Housing经纪人 Blasio.li cease LeakRet.lr돝 يعتبر compelling словам Pregnancyочноיישוביישוב Pregnancy� engrpilerпроизFailed䗪.ofisEnabledочно GRAPH sân Everywhere Exceptionsпроиз EuRWolSell assists LeakADF----------------------------------------------------------------法规 BlasioLaugh垤Asia憾hipsjspx(itrStationпроиз maidпроиз\_Formatﭯ drill :)
```

...

### Steps to reproduce

```py
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import VlmPipelineOptions

from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.pipeline.vlm_pipeline import VlmPipeline

from docling.datamodel import vlm_model_specs

converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(
pipeline_cls=VlmPipeline,
pipeline_options=VlmPipelineOptions(
vlm_options = vlm_model_specs.NANONETS_OCR2_TRANSFORMERS
),
)
}
)

source = "https://arxiv.org/pdf/2501.17887"

doc = converter.convert(source=source).document

print(doc.export_to_markdown())
```

...

### Docling version
```
Docling version: 2.90.0
Docling Core version: 2.74.0
Docling IBM Models version: 3.13.0
Docling Parse version: 5.9.0
Python: cpython-313 (3.13.7)
Platform: Linux-6.17.0-20-generic-x86_64-with-glibc2.42
```

...

### Python version
```
Python 3.13.7
```

...

### Transformers version
```
transformers==5.5.4
```

Contributor guide

Open the contributing guide

Research direction

Start by running the documented DocumentConverter example against the linked arXiv PDF and comparing its output with the attached nanonets_output.md. Then inspect VlmPipelineOptions and vlm_model_specs.NANONETS_OCR2_TRANSFORMERS, considering the reported Docling and transformers versions. Done means Nanonets-OCR2 produces meaningful OCR output for the reproduction case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.