Papers › TernaryBERT: Distillation-aware Ultra-low Bit BERT

TernaryBERT: Distillation-aware Ultra-low Bit BERT

27 Sep 2020EMNLP 2020 11arXiv:2009.12812archive 2025-07-28

Wei Zhang, Lu Hou, Yichun Yin, Lifeng Shang, Xiao Chen, Xin Jiang, Qun Liu

Transformer-based pre-training models like BERT have achieved remarkable performance in many natural language processing tasks.However, these models are both computation and memory expensive, hindering their deployment to resource-constrained devices. In this work, we propose TernaryBERT, which ternarizes the weights in a fine-tuned BERT model. Specifically, we use both approximation-based and loss-aware ternarization methods and empirically investigate the ternarization granularity of different parts of BERT. Moreover, to reduce the accuracy degradation caused by the lower capacity of low bits, we leverage the knowledge distillation technique in the training process. Experiments on the GLUE benchmark and SQuAD show that our proposed TernaryBERT outperforms the other BERT quantization methods, and even achieves comparable performance as the full-precision model while being 14.9x smaller.

PaperPDFConference PDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

huawei-noah/Pretrained-Language-Model officialtfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to TinyBERT: Distilling BERT for Natural Language Understanding (arXiv:1909.10351; that paper's own run record: 0 ran · 4 unverified), DynaBERT: Dynamic BERT with Adaptive Width and Depth (arXiv:2004.04037; that paper's own run record: 5 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 0 violated, 1 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified), Probabilistically Masked Language Model Capable of Autoregressive Generation in... (arXiv:2004.11579; that paper's own run record: 21 ran (of which 1 constructed an object rather than computing a result; 12 with no instrument failure: 4 honoured, 3 violated, 5 with no contract checked; 9 where Syntology's instrument failed) · 14 unverified) and 5 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
MS-Mind/MS-Code-01 mindsporeSyntology: not harvested report
MindSpore-paper-code-3/code9 mindsporeSyntology: not harvested report
cui0523/Code6 mindsporeSyntology: not harvested report
mindspore-ai/models mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to AdaBin: Improving Binary Neural Networks with Adaptive Binary Sets (arXiv:2208.08084; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Knowledge DistillationQuantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Introduced by this paper: TernaryBERT

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutKnowledge DistillationLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxTernaryBERTWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections