{"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/a-token-level-text-image-foundation-model-for","title":"A Token-level Text Image Foundation Model for Document Understanding","arxiv_id":"2503.02304","date":"2025-03-04","proceeding":null,"authors":["Tongkun Guan","Zining Wang","Pei Fu","Zhengtao Guo","Wei Shen","Kai Zhou","Tiezhu Yue","Chen Duan","Hao Sun","Qianyi Jiang","Junfeng Luo","Xiaokang Yang"],"abstract":"In recent years, general visual foundation models (VFMs) have witnessed increasing adoption, particularly as image encoders for popular multi-modal large language models (MLLMs). However, without semantically fine-grained supervision, these models still encounter fundamental prediction errors in the context of downstream text-image-related tasks, i.e., perception, understanding and reasoning with images containing small and dense texts. To bridge this gap, we develop TokenOCR, the first token-level visual foundation model specifically tailored for text-image-related tasks, designed to support a variety of traditional downstream applications. To facilitate the pretraining of TokenOCR, we also devise a high-quality data production pipeline that constructs the first token-level image text dataset, TokenIT, comprising 20 million images and 1.8 billion token-mask pairs. Furthermore, leveraging this foundation with exceptional image-as-text capability, we seamlessly replace previous VFMs with TokenOCR to construct a document-level MLLM, TokenVL, for VQA-based document understanding tasks. Finally, extensive experiments demonstrate the effectiveness of TokenOCR and TokenVL. Code, datasets, and weights will be available at https://token-family.github.io/TokenOCR_project.","url_abs":"https://arxiv.org/abs/2503.02304v1","url_pdf":"https://arxiv.org/pdf/2503.02304v1.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":[],"tasks":[{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"document-understanding","task_name":"document understanding"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.02304","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.02304"}},"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":"deterministic:regex_extraction","url":"https://github.com/Token-family/TokenFD","reach":null}],"summary":{"ran":2,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":6,"ran":2,"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":6,"samples":[{"code_sha256_prefix":"c31b3d90d8a33e16","entry":"InternRMSNorm","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c31b3d90d8a33e16"}},{"code_sha256_prefix":"eed8a2928d96b1c8","entry":"InternVisionConfig","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eed8a2928d96b1c8"}},{"code_sha256_prefix":"83892684bfe2e0e1","entry":"InternAttention","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83892684bfe2e0e1"}},{"code_sha256_prefix":"18c5c1ce90f0d0cd","entry":"InternMLP","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"18c5c1ce90f0d0cd"}},{"code_sha256_prefix":"f839726c1a050d44","entry":"InternVisionEncoderLayer","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f839726c1a050d44"}},{"code_sha256_prefix":"31c11be53eb3590e","entry":"TokenvlVisionExtra","repo":"Token-family/TokenFD","repo_kind":"found_in_text","path":"internvl/model/internvl_chat/modeling_tokenvl_encoder.py","file_url":"https://github.com/Token-family/TokenFD/blob/HEAD/internvl/model/internvl_chat/modeling_tokenvl_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31c11be53eb3590e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}