# TerViT: An Efficient Ternary Vision Transformer

Source: [TerViT: An Efficient Ternary Vision Transformer](<https://www.sota2.com/research/paper/68fa6ba51e209131cea2f8cb>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-28T13:56:51.543Z

Authors: Sheng Xu, Yanjing Li, Teli Ma, Bohan Zeng, Baochang Zhang, Peng Gao, Jinhu Lv

Published: 2022-01-20T08:29:19.000Z

## Abstract

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% Top-1 accuracy on ImageNet dataset.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Image Classification on ImageNet-1K 1.0 (test) (Top-1 Accuracy)](<https://www.sota2.com/research/sota/image-classification-on-imagenet-1k-1-0-test-top-1-accuracy.md>): Image Classification; ImageNet-1k 1.0 (test); Top-1 Accuracy: 74.2.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2201.08050>)

[PDF](<https://arxiv.org/pdf/2201.08050.pdf>)
