# facebookresearch/ToMe

A method to increase the speed and lower the memory footprint of existing vision transformers.

Repository: https://github.com/facebookresearch/ToMe
Canonical: https://ross.abutalabs.com/products/tome
Language: Python
License: NOASSERTION
License Family: other
Archived: true
Last push: 2024-06-17T11:22:47+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1415, "days_push": 807, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1207, forks 88 (observed 2026-08-28T04:03:59.468049+00:00)

## What it is
ToMe (Token Merging) is a PyTorch library from Meta AI that speeds up existing Vision Transformers by merging similar tokens inside the network, giving 2-3x faster evaluation with no retraining required. It provides patching tools for popular ViT implementations like timm, SWAG, and MAE.

## Use cases
- speed up vision transformer inference
- reduce memory usage of ViT models
- apply token merging to timm models without retraining
- visualize how ViT tokens group image regions
- train ViTs faster with token merging
- benchmark ViT throughput improvements

## When to choose
- you already use a supported ViT implementation (timm, SWAG, MAE) and want faster inference without retraining
- you need to cut ViT memory footprint on limited GPU resources
- you're researching token reduction methods for transformers

## When to avoid
- you use a ViT implementation not supported by the patching tools
- you need guaranteed accuracy with zero tolerance for drops
- you need maintained production software - the repo is research code with infrequent updates

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, benchmarking
- domain: deep-learning, computer-vision, machine-learning, image-processing
- platform: python, cross-platform
- tags: vision-transformer, token-merging, pytorch, model-optimization, inference-speedup, timm, research-code, gpu

## Member repositories
- facebookresearch/ToMe (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.468049+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:18:58.812950+00:00, confidence not recorded.
  - readme: https://github.com/facebookresearch/ToMe (fetched 2026-08-28T04:03:59.468049+00:00, sha f8bd90827d33)
- Data as of 2026-08-30T08:39:29.467469+00:00.
