SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.10780 · 2023

Learned Thresholds Token Merging and Pruning for Vision Transformers

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
mxbonn/ltmp canonical 4 of 5
FunctionStatusWhere it lives
bipartite_soft_matching Ran mxbonn/ltmp/ltmp/token_merging.py
pointer only (licence: NONE) · get_code("424049f15b90678d")
do_nothing Ran mxbonn/ltmp/ltmp/token_merging.py
pointer only (licence: NONE) · get_code("969e8250d805a154")
kth_bipartite_soft_matching Ran mxbonn/ltmp/ltmp/token_merging.py
pointer only (licence: NONE) · get_code("674be50d432e8846")
parse_r Ran mxbonn/ltmp/ltmp/utils.py
pointer only (licence: NONE) · get_code("94e8f254ce489a4b")
make_visualization Not yet run mxbonn/ltmp/ltmp/vis.py
pointer only (licence: NONE) · get_code("61c0c3039d046800")

Repositories linked to this paper

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

Abstract

Vision transformers have demonstrated remarkable success in a wide range of computer vision tasks over the last years. However, their high computational costs remain a significant barrier to their practical deployment. In particular, the complexity of transformer models is quadratic with respect to the number of input tokens. Therefore techniques that reduce the number of input tokens that need to be processed have been proposed. This paper introduces Learned Thresholds token Merging and Pruning (LTMP), a novel approach that leverages the strengths of both token merging and token pruning. LTMP uses learned threshold masking modules that dynamically determine which tokens to merge and which to prune. We demonstrate our approach with extensive experiments on vision transformers on the ImageNet classification task. Our results demonstrate that LTMP achieves state-of-the-art accuracy across reduction rates while requiring only a single fine-tuning epoch, which is an order of magnitude faster than previous methods. Code is available at https://github.com/Mxbonn/ltmp .

For agents

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

get_harvested_code_for_paper("2307.10780")
get_code_for_paper("2307.10780")
have("2307.10780")

Connect an agent — have() is free.