ViT-1.58b: Mobile Vision Transformers in the 1-bit Era

Zhengqing Yuan, Rong Zhou, Hongyi Wang, Lifang He, Yanfang Ye +1 more
6/26/2024
cs.CV

Official code: DLYuanGod/ViT-1.58b (19 stars, last commit 2024-07-05).

Abstract

Vision Transformers (ViTs) have achieved remarkable performance in various image classification tasks by leveraging the attention mechanism to process image patches as tokens. However, the high computational and memory demands of ViTs pose significant challenges for deployment in resource-constrained environments. This paper introduces ViT-1.58b, a novel 1.58-bit quantized ViT model designed to drastically reduce memory and computational overhead while preserving competitive performance. ViT-1.58b employs ternary quantization, which refines the balance between efficiency and accuracy by constraining weights to {-1, 0, 1} and quantizing activations to 8-bit precision. Our approach ensures efficient scaling in terms of both memory and computation. Experiments on CIFAR-10 and ImageNet-1k demonstrate that ViT-1.58b maintains comparable accuracy to full-precision Vit, with significant reductions in memory usage and computational costs. This paper highlights the potential of extreme quantization techniques in developing sustainable AI solutions and contributes to the broader discourse on efficient model deployment in practical applications. Our code and weights are available at https://github.com/DLYuanGod/ViT-1.58b.

View on arXivView PDF

Code Implementations(1)

194C++, CudaJun 27, 20242 years ago

Similar Papers

Cite this paper

@article{yuan2024vitb,
  title  = {ViT-1.58b: Mobile Vision Transformers in the 1-bit Era},
  author = {Zhengqing Yuan and Rong Zhou and Hongyi Wang and Lifang He and Yanfang Ye and Lichao Sun},
  year   = {2024},
  eprint = {2406.18051},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.18051v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.18051.svg)](https://codeofpaper.com/paper/2406.18051)

Discussion