Reducing Computational Cost in MobileViT for Edge-Oriented Models Through Token Merging
Open Access
- 20 December 2024
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 13 (24) , 5009
Abstract
We focus on developing a lightweight model for resource-constrained devices, building on MobileViT, a hybrid model that combines the strengths of Transformers and CNNs to balance high accuracy and computational efficiency for image classification. Transformers, while effective at capturing global information, often have higher computational costs than CNNs due to the complexity of their self-attention mechanism. To address this, we introduce the Token Merging (ToMe) technique into MobileViT to reduce computational costs. However, because the number of tokens changes during merging, ToMe cannot be directly applied to MobileViT without adjustments. We propose simple methods, specifically reshaping features and removing skip connections, to resolve this issue. Additionally, we make adjustments to MobileViT’s structure to better support the application of ToMe. Our approach improves inference efficiency while retaining a competitive level of accuracy. The resulting models achieve a balance between performance and computational speed, offering a practical solution for hybrid architectures. This work shows the potential of ToMe-based techniques to broaden the range of lightweight model options, catering to diverse application requirements.Keywords
This publication has 11 references indexed in Scilit:
- MobileNetV4: Universal Models for the Mobile Ecosystem2024
- Token Merging for Fast Stable Diffusion2023
- Swin Transformer V2: Scaling Up Capacity and Resolution2022
- High-Resolution Image Synthesis with Latent Diffusion Models2022
- Mobile-Former: Bridging MobileNet and Transformer2022
- Rethinking Spatial Dimensions of Vision Transformers2021
- DeepEdgeBench: Benchmarking Deep Neural Networks on Edge Devices2021
- MobileNetV2: Inverted Residuals and Linear Bottlenecks2018
- Quantized Convolutional Neural Networks for Mobile Devices2016
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015