Papers › AIM: Adaptive Inference of Multi-Modal LLMs via Token Merging and Pruning

AIM: Adaptive Inference of Multi-Modal LLMs via Token Merging and Pruning

4 Dec 2024arXiv:2412.03248archive 2025-07-28

Yiwu Zhong, Zhuoming Liu, Yin Li, LiWei Wang

Large language models (LLMs) have enabled the creation of multi-modal LLMs that exhibit strong comprehension of visual data such as images and videos. However, these models usually rely on extensive visual tokens from visual encoders, leading to high computational demands, which limits their applicability in resource-constrained environments and for long-context tasks. In this work, we propose a training-free adaptive inference method for multi-modal LLMs that can accommodate a broad range of efficiency requirements with a minimum performance drop. Our method consists of a) iterative token merging based on embedding similarity before LLMs, and b) progressive token pruning within LLM layers based on multi-modal importance. With a minimalist design, our method can be applied to both video and image LLMs. Extensive experiments on diverse video and image benchmarks demonstrate that, our method substantially reduces computation load (e.g., a 7-fold reduction in FLOPs) while preserving the performance of video and image LLMs. Further, under a similar computational cost, our method outperforms the state-of-the-art methods in long video understanding (e.g., +4.6 on MLVU). Additionally, our in-depth analysis provides insights into token redundancy and LLM layer behaviors, offering guidance for future research in designing efficient multi-modal LLMs. Our code will be available at https://github.com/LaVi-Lab/AIM.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2412.03248")

Code

Syntology Ran 4 of 14 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 2 ran · fixture could not drive it.

By repository: official repository: 14 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

lavi-lab/aim officialmentioned in papermentioned on GitHubjaxApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 4 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
2ran · fixture could not drive it
10unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from lavi-lab/aim. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

extract_patches lavi-lab/aim/llava/mm_utils.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · b0a851cae92754ff · report
get_chunk lavi-lab/aim/llava/eval/model_vqa.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 42a46570620cd9fa · report
split_list lavi-lab/aim/llava/eval/model_vqa.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 076c252c52cbb161 · report
unpad_image lavi-lab/aim/llava/model/llava_arch.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 7606525af238fb64 · report
auto_pad_images lavi-lab/aim/llava/mm_utils.py official repository unverified Apache-2.0 (permissive) · 3c8823948724e269 · report
bipartite_soft_matching_merge lavi-lab/aim/llava/model/token_merge.py official repository unverified Apache-2.0 (permissive) · 7d78565ff76da4dc · report
convert_to_scalar lavi-lab/aim/trl/core.py official repository unverified Apache-2.0 (permissive) · c32b636f13ed9ee5 · report
flatten_dict lavi-lab/aim/trl/core.py official repository unverified Apache-2.0 (permissive) · a51ae45a1f6c0b5b · report
merging_ops lavi-lab/aim/other_packages/LLM-Viewer/analyze_aim.py official repository unverified Apache-2.0 (permissive) · 837152d923b7a4d0 · report
merging_ops_iter lavi-lab/aim/other_packages/LLM-Viewer/analyze_aim.py official repository unverified Apache-2.0 (permissive) · 577d19646599cf85 · report
pruning_ops_layer lavi-lab/aim/other_packages/LLM-Viewer/analyze_aim.py official repository unverified Apache-2.0 (permissive) · edd36a84c6f8d46e · report
resize_and_center_crop lavi-lab/aim/llava/mm_utils.py official repository unverified Apache-2.0 (permissive) · c80358dff96c25ce · report
safe_load_tokenizer lavi-lab/aim/llava/conversation.py official repository unverified Apache-2.0 (permissive) · b20705b0dfd77ffc · report
top_k_top_p_filtering lavi-lab/aim/trl/core.py official repository unverified Apache-2.0 (permissive) · 2c3da386578af970 · report

Tasks

Video Understanding

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Pruning

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections