SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.07795 · 2022

EfficientVLM: Fast and Accurate Vision-Language Models via Knowledge Distillation and Modal-adaptive Pruning

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 7 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
swaggy-tn/efficientvlm canonical 7 of 9
FunctionStatusWhere it lives
clip_loss Ran swaggy-tn/efficientvlm/efficient_models/eff_vit.py
pointer only (licence: BSD-3-Clause) · get_code("e5b89b1f72c319ed")
contrastive_loss Ran swaggy-tn/efficientvlm/efficient_models/eff_vit.py
pointer only (licence: BSD-3-Clause) · get_code("4675779aec92d6c0")
get_cor_teacher Ran swaggy-tn/efficientvlm/Eff_Captioning.py
pointer only (licence: BSD-3-Clause) · get_code("a59f653ef4653ae4")
get_kd_loss Ran swaggy-tn/efficientvlm/Eff_Captioning.py
pointer only (licence: BSD-3-Clause) · get_code("a6e8b08bf21e4ea6")
soft_cross_entropy Ran swaggy-tn/efficientvlm/Eff_Captioning.py
pointer only (licence: BSD-3-Clause) · get_code("e9a9fd7c33b84f9a")
tile Ran swaggy-tn/efficientvlm/efficient_models/model_generation.py
pointer only (licence: BSD-3-Clause) · get_code("cb33571427334815")
top_k_top_p_filtering Ran swaggy-tn/efficientvlm/efficient_models/eff_bert.py
pointer only (licence: BSD-3-Clause) · get_code("9e8f81565e828ebf")
load_tf_weights_in_bert Not yet run swaggy-tn/efficientvlm/efficient_models/eff_bert.py
pointer only (licence: BSD-3-Clause) · get_code("26be70dca3249c0b")
reinit_scheduler_properties_mysched Not yet run swaggy-tn/efficientvlm/Captioning_pretrain.py
pointer only (licence: BSD-3-Clause) · get_code("e3d6fbf640a143ee")

Repositories linked to this paper

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

Abstract

Pre-trained vision-language models (VLMs) have achieved impressive results in a range of vision-language tasks. However, popular VLMs usually consist of hundreds of millions of parameters which brings challenges for fine-tuning and deployment in real-world applications due to space, memory, and latency constraints. In this work, we introduce a distilling then pruning framework to compress large vision-language models into smaller, faster, and more accurate ones. We first shrink the size of a pre-trained large VLM and apply knowledge distillation in the vision-language pre-training stage to obtain a task-agnostic compact VLM. Then we propose a modal-adaptive pruning algorithm to automatically infer the importance of vision and language modalities for different downstream tasks and adaptively remove redundant structures and neurons in different encoders with controllable target sparsity. We apply our framework to train EfficientVLM, a fast and accurate vision-language model consisting of 6 vision layers, 3 text layers, and 3 cross-modal fusion layers, accounting for only 93 million parameters in total, which is 44.3% of the teacher model. EfficientVLM retains 98.4% performance of the teacher model and accelerates its inference speed by 2.2x. EfficientVLM achieves a large absolute improvement over previous SoTA efficient VLMs of similar sizes by a large margin on various vision-language tasks, including VQAv2 (+4.9%), NLVR2 (+5.6%), ITR (R@1 on TR +17.2%, on IR + 15.6% ) and COCO caption generation (CIDEr +6.5), demonstrating a large potential on training lightweight VLMs.

For agents

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

get_harvested_code_for_paper("2210.07795")
get_code_for_paper("2210.07795")
have("2210.07795")

Connect an agent — have() is free.