{"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-stitch-in-time-saves-nine-small-vlm-is-a","title":"A Stitch in Time Saves Nine: Small VLM is a Precise Guidance for Accelerating Large VLMs","arxiv_id":"2412.03324","date":"2024-12-04","proceeding":"CVPR 2025 1","authors":["Wangbo Zhao","Yizeng Han","Jiasheng Tang","Zhikai Li","Yibing Song","Kai Wang","Zhangyang Wang","Yang You"],"abstract":"Vision-language models (VLMs) have shown remarkable success across various multi-modal tasks, yet large VLMs encounter significant efficiency challenges due to processing numerous visual tokens. A promising approach to accelerating large VLM inference is using partial information, such as attention maps from specific layers, to assess token importance and prune less essential tokens. However, our study reveals three key insights: (i) Partial attention information is insufficient for accurately identifying critical visual tokens, resulting in suboptimal performance, especially at low token retention ratios; (ii) Global attention information, such as the attention map aggregated across all layers, more effectively preserves essential tokens and maintains comparable performance under aggressive pruning. However, the attention maps from all layers requires a full inference pass, which increases computational load and is therefore impractical in existing methods; and (iii) The global attention map aggregated from a small VLM closely resembles that of a large VLM, suggesting an efficient alternative. Based on these findings, we introduce a \\textbf{training-free} method, \\underline{\\textbf{S}}mall VLM \\underline{\\textbf{G}}uidance for accelerating \\underline{\\textbf{L}}arge VLMs (\\textbf{SGL}). Specifically, we employ the attention map aggregated from a small VLM to guide visual token pruning in a large VLM. Additionally, an early exiting mechanism is developed to fully use the small VLM's predictions, dynamically invoking the larger VLM only when necessary, yielding a superior trade-off between accuracy and computation. Extensive evaluations across 11 benchmarks demonstrate the effectiveness and generalizability of SGL, achieving up to 91\\% pruning ratio for visual tokens while retaining competitive performance.","url_abs":"https://arxiv.org/abs/2412.03324v2","url_pdf":"https://arxiv.org/pdf/2412.03324v2.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":"a-stitch-in-time-saves-nine-small-vlm-is-a","repo_url":"https://github.com/NUS-HPC-AI-Lab/SGL","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"early-exiting","method_name":"Early exiting"},{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/visual-question-answering-on-mm-vet","task":"Visual Question Answering","dataset":"MM-Vet","model":"InternVL2-26B (SGP, token ratio 64%)","rank_in_archive_order":19,"of":231,"metrics":{"GPT-4 score":"65.60","Params":"26B"},"uses_additional_data":false},{"leaderboard":"/sota/visual-question-answering-on-mm-vet","task":"Visual Question Answering","dataset":"MM-Vet","model":"InternVL2-26B (SGP, token ratio 35%)","rank_in_archive_order":28,"of":231,"metrics":{"GPT-4 score":"63.20","Params":"26B"},"uses_additional_data":false},{"leaderboard":"/sota/visual-question-answering-on-mm-vet","task":"Visual Question Answering","dataset":"MM-Vet","model":"InternVL2-26B (SGP, token ratio 9%)","rank_in_archive_order":54,"of":231,"metrics":{"GPT-4 score":"52.10","Params":"26B"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2412.03324","atlas_url":"https://app.syntology.ai/?focus=2412.03324","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.03324"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/NUS-HPC-AI-Lab/SGL","reach":null}],"summary":{"ran_violates":2,"ran_honours":2,"unverified":1},"by_repo_kind":{"official":{"samples":1,"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":5,"samples":[{"code_sha256_prefix":"5f3bdd5f3304a0e0","entry":"version_cmp","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"5f3bdd5f3304a0e0"}},{"code_sha256_prefix":"e159a001bd4cbfaa","entry":"evaluate_exact_match_accuracy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"e159a001bd4cbfaa"}},{"code_sha256_prefix":"4ffcad52354b4806","entry":"evaluate_relaxed_accuracy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"4ffcad52354b4806"}},{"code_sha256_prefix":"b3c8680ebd8739af","entry":"relaxed_correctness","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"b3c8680ebd8739af"}},{"code_sha256_prefix":"88a4b26411ded833","entry":"get_attention_rank","repo":"NUS-HPC-AI-Lab/SGL","repo_kind":"official","path":"internvl/model/internvl_chat/modeling_internvl_chat.py","file_url":"https://github.com/NUS-HPC-AI-Lab/SGL/blob/HEAD/internvl/model/internvl_chat/modeling_internvl_chat.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":"88a4b26411ded833"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}