{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/monkeyocr-document-parsing-with-a-structure","title":"MonkeyOCR: Document Parsing with a Structure-Recognition-Relation Triplet Paradigm","arxiv_id":"2506.05218","date":"2025-06-05","proceeding":null,"authors":["Zhang Li","Yuliang Liu","Qiang Liu","Zhiyin Ma","Ziyang Zhang","Shuo Zhang","Zidun Guo","Jiarui Zhang","Xinyu Wang","Xiang Bai"],"abstract":"We introduce MonkeyOCR, a vision-language model for document parsing that advances the state of the art by leveraging a Structure-Recognition-Relation (SRR) triplet paradigm. This design simplifies what would otherwise be a complex multi-tool pipeline (as in MinerU's modular approach) and avoids the inefficiencies of processing full pages with giant end-to-end models (e.g., large multimodal LLMs like Qwen-VL). In SRR, document parsing is abstracted into three fundamental questions - \"Where is it?\" (structure), \"What is it?\" (recognition), and \"How is it organized?\" (relation) - corresponding to layout analysis, content identification, and logical ordering. This focused decomposition balances accuracy and speed: it enables efficient, scalable processing without sacrificing precision. To train and evaluate this approach, we introduce the MonkeyDoc (the most comprehensive document parsing dataset to date), with 3.9 million instances spanning over ten document types in both Chinese and English. Experiments show that MonkeyOCR outperforms MinerU by an average of 5.1%, with particularly notable improvements on challenging content such as formulas (+15.0%) and tables (+8.6%). Remarkably, our 3B-parameter model surpasses much larger and top-performing models, including Qwen2.5-VL (72B) and Gemini 2.5 Pro, achieving state-of-the-art average performance on English document parsing tasks. In addition, MonkeyOCR processes multi-page documents significantly faster (0.84 pages per second compared to 0.65 for MinerU and 0.12 for Qwen2.5-VL-7B). The 3B model can be efficiently deployed for inference on a single NVIDIA 3090 GPU. Code and models will be released at https://github.com/Yuliang-Liu/MonkeyOCR.","url_abs":"https://arxiv.org/abs/2506.05218v1","url_pdf":"https://arxiv.org/pdf/2506.05218v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"monkeyocr-document-parsing-with-a-structure","repo_url":"https://github.com/yuliang-liu/monkeyocr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":null,"task_name":"Relation"},{"task_slug":null,"task_name":"Triplet"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2506.05218","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2506.05218"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yuliang-liu/monkeyocr","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"1734027484d3f3fb","entry":"calculate_char_in_span","repo":"yuliang-liu/monkeyocr","repo_kind":"official","path":"magic_pdf/pdf_parse_union_core_v2_llm.py","file_url":"https://github.com/yuliang-liu/monkeyocr/blob/HEAD/magic_pdf/pdf_parse_union_core_v2_llm.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1734027484d3f3fb"}},{"code_sha256_prefix":"324ef61cd69c5678","entry":"create_file_groups_by_page_count","repo":"yuliang-liu/monkeyocr","repo_kind":"official","path":"parse.py","file_url":"https://github.com/yuliang-liu/monkeyocr/blob/HEAD/parse.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"324ef61cd69c5678"}},{"code_sha256_prefix":"964b606803f81eec","entry":"get_instructions","repo":"yuliang-liu/monkeyocr","repo_kind":"official","path":"demo/demo_gradio.py","file_url":"https://github.com/yuliang-liu/monkeyocr/blob/HEAD/demo/demo_gradio.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"964b606803f81eec"}},{"code_sha256_prefix":"85043fb558f6049f","entry":"load_i18n","repo":"yuliang-liu/monkeyocr","repo_kind":"official","path":"demo/demo_gradio.py","file_url":"https://github.com/yuliang-liu/monkeyocr/blob/HEAD/demo/demo_gradio.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"85043fb558f6049f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}