TerViT: An Efficient Ternary Vision Transformer

01/20/2022
by   Sheng Xu, et al.
0

Vision transformers (ViTs) have demonstrated great potential in various visual tasks, but suffer from expensive computational and memory cost problems when deployed on resource-constrained devices. In this paper, we introduce a ternary vision transformer (TerViT) to ternarize the weights in ViTs, which are challenged by the large loss surface gap between real-valued and ternary parameters. To address the issue, we introduce a progressive training scheme by first training 8-bit transformers and then TerViT, and achieve a better optimization than conventional methods. Furthermore, we introduce channel-wise ternarization, by partitioning each matrix to different channels, each of which is with an unique distribution and ternarization interval. We apply our methods to popular DeiT and Swin backbones, and extensive results show that we can achieve competitive performance. For example, TerViT can quantize Swin-S to 13.1MB model size while achieving above 79

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/13/2022

Q-ViT: Accurate and Fully Quantized Low-bit Vision Transformer

The large pre-trained vision transformers (ViTs) have demonstrated remar...
research
04/16/2022

Towards Lightweight Transformer via Group-wise Transformation for Vision-and-Language Tasks

Despite the exciting performance, Transformer is criticized for its exce...
research
06/30/2021

Improving the Efficiency of Transformers for Resource-Constrained Devices

Transformers provide promising accuracy and have become popular and used...
research
04/17/2021

Visual Transformer Pruning

Visual transformer has achieved competitive performance on a variety of ...
research
03/28/2022

Automated Progressive Learning for Efficient Training of Vision Transformers

Recent advances in vision Transformers (ViTs) have come with a voracious...
research
06/11/2022

Kaggle Kinship Recognition Challenge: Introduction of Convolution-Free Model to boost conventional

This work aims to explore a convolution-free base classifier that can be...
research
04/25/2023

Application of Transformers for Nonlinear Channel Compensation in Optical Systems

In this paper, we introduce a new nonlinear channel equalization method ...

Please sign up or login with your details

Forgot password? Click here to reset