SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.09461 · ICLR · 2023

Token Merging: Your ViT But Faster

Judy Hoffman, Peizhao Zhang, Daniel Bolya, Christoph Feichtenhofer, Cheng-Yang Fu, Xiaoliang Dai

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2210.09461.json · badge: /api/ran/2210.09461.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
facebookresearch/tome marked official in Papers with Code
Papers with Code archive
1 ran · 0 no recorded run
PaddlePaddle/PLSC community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
bipartite_soft_matching Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
facebookresearch/tome/tome/merge.py
pointer only (licence: NOASSERTION) · get_code("424049f15b90678d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, facebookresearch/tome (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

bipartite_soft_matching_random2d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from dbolya/tomesd
pointer only · get_code("50778ef0adbc3581")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

do_nothing Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from dbolya/tomesd
pointer only · get_code("bd041cf95d856b5d")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mps_gather_workaround Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from omidiu/ca_tome
pointer only · get_code("16eb26a585c085e1")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

wrap_forward Ran
ran on a synthesized input
PaddlePaddle/PLSC/plsc/core/recompute.py
code served (permissive licence) · get_code("c3b15e0d7daa5901")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import functools

torch.manual_seed(0)

def original_func(x, y, z=10):
    """A simple function to be wrapped"""
    return x + y + z

def new_func(func, x, y, z=10):
    """A wrapper function that calls the original with modified behavior"""
    result = func(x, y, z=z)
    return result * 2

ARGS = {
    'func': original_func,
    'newfunc': new_func,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
do_nothing
brick of this paper's assembly: helper
7 other papers
7 later · 2 only as an assembly brick
2303.17604 (2023-03)
Token Merging for Fast Stable Diffusion
2312.10656 (2023-12)
VidToMe: Video Token Merging for Zero-Shot Video Editing
2403.14622 (2024-03)
Language Repository for Long Video Understanding
and 4 more not named here
mps_gather_workaround
brick of this paper's assembly: helper
7 other papers
7 later · 2 only as an assembly brick
2303.17604 (2023-03)
Token Merging for Fast Stable Diffusion
2312.10656 (2023-12)
VidToMe: Video Token Merging for Zero-Shot Video Editing
2403.14622 (2024-03)
Language Repository for Long Video Understanding
and 4 more not named here
bipartite_soft_matching
brick of this paper's assembly: entry
6 other papers
6 later
2307.10780 (2023-07)
Learned Thresholds Token Merging and Pruning for Vision Transformers
2310.01812 (2023-10)
PPT: Token Pruning and Pooling for Efficient Vision Transformers
2404.09490 (2024-04)
Leveraging Temporal Contextualization for Video Action Recognition
and 3 more not named here
bipartite_soft_matching_random2d
brick of this paper's assembly: entry
1 other paper
1 later
2303.17604 (2023-03)
Token Merging for Fast Stable Diffusion
wrap_forward 1 other paper
1 later
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 2× the throughput of state-of-the-art ViT-L @ 512 and ViT-H @ 518 models on images and 2.2× 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 2× for MAE fine-tuning on video. Training with ToMe further minimizes accuracy drop, leading to 2× 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2210.09461")
get_code_for_paper("2210.09461")
have("2210.09461")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2210.09461.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2210.09461.svg)](https://syntology.ai/paper/2210.09461)

Connect an agent — have() is free.