Papers › MaTVLM: Hybrid Mamba-Transformer for Efficient Vision-Language Modeling

MaTVLM: Hybrid Mamba-Transformer for Efficient Vision-Language Modeling

17 Mar 2025arXiv:2503.13440archive 2025-07-28

Yingyue Li, Bencheng Liao, Wenyu Liu, Xinggang Wang

With the advancement of RNN models with linear complexity, the quadratic complexity challenge of transformers has the potential to be overcome. Notably, the emerging Mamba-2 has demonstrated competitive performance, bridging the gap between RNN models and transformers. However, due to sequential processing and vanishing gradients, RNN models struggle to capture long-range dependencies, limiting contextual understanding. This results in slow convergence, high resource demands, and poor performance on downstream understanding and complex reasoning tasks. In this work, we present a hybrid model MaTVLM by substituting a portion of the transformer decoder layers in a pre-trained VLM with Mamba-2 layers. Leveraging the inherent relationship between attention and Mamba-2, we initialize Mamba-2 with corresponding attention weights to accelerate convergence. Subsequently, we employ a single-stage distillation process, using the pre-trained VLM as the teacher model to transfer knowledge to the MaTVLM, further enhancing convergence speed and performance. Furthermore, we investigate the impact of differential distillation loss within our training framework. We evaluate the MaTVLM on multiple benchmarks, demonstrating competitive performance against the teacher model and existing VLMs while surpassing both Mamba-based VLMs and models of comparable parameter scales. Remarkably, the MaTVLM achieves up to 3.6x faster inference than the teacher model while reducing GPU memory consumption by 27.5%, all without compromising performance. Code and models are released at http://github.com/hustvl/MaTVLM.

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="2503.13440")

Code

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

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

hustvl/MaTVLM officialmentioned in papermentioned on GitHubpytorchApache-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

10 samples harvested; 6 ran; 0 honoured the contract we drafted; 4 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.

3ran · our draft was wrong
1ran · fixture could not drive it
2ran
4unverified

Licence: 0 of the 10 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 hustvl/MaTVLM. “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.

repeat_kv hustvl/MaTVLM/mamba2/hybrid_mamba_layer.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 3c76e52815c5401d · report
collate_fn hustvl/MaTVLM/tinyllava/eval/model_vqa_loader.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 20e4f665698a3d18 · report
construct_layer_dict hustvl/MaTVLM/util.py official repository ran Apache-2.0 (permissive) · e845d6cad3dda7eb · report
get_chunk hustvl/MaTVLM/tinyllava/eval/model_vqa.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 42a46570620cd9fa · report
load_safetensors_to_dict hustvl/MaTVLM/util.py official repository ran Apache-2.0 (permissive) · 72afeaae843bd353 · report
split_list hustvl/MaTVLM/tinyllava/eval/model_vqa.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 076c252c52cbb161 · report
construct_language_layer_dict hustvl/MaTVLM/util.py official repository unverified Apache-2.0 (permissive) · 0d94ed5522773864 · report
decode hustvl/MaTVLM/mamba2_inference/hybrid_wrapper_tinyllava.py official repository unverified Apache-2.0 (permissive) · 4ada4f4ed6ff4fec · report
merge_projections_for_layers hustvl/MaTVLM/mamba2_inference/hybrid_wrapper.py official repository unverified Apache-2.0 (permissive) · afef156338836ef8 · report
merge_projections_for_layers hustvl/MaTVLM/mamba2_inference/hybrid_wrapper_tinyllava.py official repository unverified Apache-2.0 (permissive) · 1f13fabd04c36b6a · report

Tasks

Language ModelingLanguage ModellingMamba

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AttentionSPEEDSoftmax

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