{"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/token-merging-your-vit-but-faster","title":"Token Merging: Your ViT But Faster","arxiv_id":"2210.09461","date":"2022-10-17","proceeding":null,"authors":["Daniel Bolya","Cheng-Yang Fu","Xiaoliang Dai","Peizhao Zhang","Christoph Feichtenhofer","Judy Hoffman"],"abstract":"We introduce Token Merging (ToMe), a simple method to increase the throughput of existing ViT models without needing to train. ToMe gradually combines similar tokens in a transformer using a general and light-weight matching algorithm that is as fast as pruning while being more accurate. Off-the-shelf, ToMe can 2x the throughput of state-of-the-art ViT-L @ 512 and ViT-H @ 518 models on images and 2.2x the throughput of ViT-L on video with only a 0.2-0.3% accuracy drop in each case. ToMe can also easily be applied during training, improving in practice training speed up to 2x for MAE fine-tuning on video. Training with ToMe further minimizes accuracy drop, leading to 2x the throughput of ViT-B on audio for only a 0.4% mAP drop. Qualitatively, we find that ToMe merges object parts into one token, even over multiple frames of video. Overall, ToMe's accuracy and speed are competitive with state-of-the-art on images, video, and audio.","url_abs":"https://arxiv.org/abs/2210.09461v3","url_pdf":"https://arxiv.org/pdf/2210.09461v3.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":"token-merging-your-vit-but-faster","repo_url":"https://github.com/facebookresearch/tome","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"token-merging-your-vit-but-faster","repo_url":"https://github.com/dbolya/tomesd","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"token-merging-your-vit-but-faster","repo_url":"https://github.com/tanvir-utexas/PaPr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"token-merging-your-vit-but-faster","repo_url":"https://github.com/PaddlePaddle/PLSC/tree/master/task/accelerate/tome","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null},{"paper_slug":"token-merging-your-vit-but-faster","repo_url":"https://github.com/pwc-1/Paper-9/tree/main/5/vit_mae","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"efficient-vits","task_name":"Efficient ViTs"}],"methods":[{"method_slug":"mae","method_name":"MAE"},{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-s","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-S)","model":"ToMe ($r=8$)","rank_in_archive_order":15,"of":41,"metrics":{"GFLOPs":"3.4","Top 1 Accuracy":"79.7"},"uses_additional_data":false},{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-s","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-S)","model":"ToMe ($r=13$)","rank_in_archive_order":23,"of":41,"metrics":{"GFLOPs":"2.7","Top 1 Accuracy":"79.4"},"uses_additional_data":false},{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-s","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-S)","model":"ToMe ($r=16$)","rank_in_archive_order":29,"of":41,"metrics":{"GFLOPs":"2.3","Top 1 Accuracy":"79.1"},"uses_additional_data":false},{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-t","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-T)","model":"ToMe ($r=8$)","rank_in_archive_order":14,"of":22,"metrics":{"GFLOPs":"0.9","Top 1 Accuracy":"71.7"},"uses_additional_data":false},{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-t","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-T)","model":"ToMe ($r=12$)","rank_in_archive_order":17,"of":22,"metrics":{"GFLOPs":"0.8","Top 1 Accuracy":"71.4"},"uses_additional_data":false},{"leaderboard":"/sota/efficient-vits-on-imagenet-1k-with-deit-t","task":"Efficient ViTs","dataset":"ImageNet-1K (with DeiT-T)","model":"ToMe ($r=16$)","rank_in_archive_order":18,"of":22,"metrics":{"GFLOPs":"0.6","Top 1 Accuracy":"70.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.09461","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.09461"}},"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/tanvir-utexas/PaPr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pwc-1/Paper-9/tree/main/5/vit_mae","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/tome","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaddlePaddle/PLSC/tree/master/task/accelerate/tome","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dbolya/tomesd","reach":null}],"summary":{"ran_fixture":2,"ran_honours":1,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"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":4,"samples":[{"code_sha256_prefix":"424049f15b90678d","entry":"bipartite_soft_matching","repo":"facebookresearch/tome","repo_kind":"official","path":"tome/merge.py","file_url":"https://github.com/facebookresearch/tome/blob/HEAD/tome/merge.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"424049f15b90678d"}},{"code_sha256_prefix":"50778ef0adbc3581","entry":"bipartite_soft_matching_random2d","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"50778ef0adbc3581"}},{"code_sha256_prefix":"bd041cf95d856b5d","entry":"do_nothing","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":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"bd041cf95d856b5d"}},{"code_sha256_prefix":"16eb26a585c085e1","entry":"mps_gather_workaround","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"16eb26a585c085e1"}},{"code_sha256_prefix":"c3b15e0d7daa5901","entry":"wrap_forward","repo":"PaddlePaddle/PLSC","repo_kind":"listed","path":"plsc/core/recompute.py","file_url":"https://github.com/PaddlePaddle/PLSC/blob/HEAD/plsc/core/recompute.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":"c3b15e0d7daa5901"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}