{"url":"/method/ternarybert","slug":"ternarybert","name":"TernaryBERT","full_name":"TernaryBERT","full_name_withheld":false,"description_markdown":"**TernaryBERT** is a [Transformer](https://paperswithcode.com/methods/category/transformers)-based model which ternarizes the weights of a pretrained [BERT](https://paperswithcode.com/method/bert) model to $\\{-1,0,+1\\}$, with different granularities for word embedding and weights in the Transformer layer. Instead of directly using knowledge distillation to compress a model, it is used to improve the performance of ternarized student model with the same size as the teacher model. In this way, we transfer the knowledge from the highly-accurate teacher model to the ternarized student model with smaller capacity.","description_state":"present","introduced_year":null,"introduced_by":{"title":"TernaryBERT: Distillation-aware Ultra-low Bit BERT","paper":"/paper/ternarybert-distillation-aware-ultra-low-bit","first_author":"Wei Zhang","n_authors":7,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/ternarybert-distillation-aware-ultra-low-bit"},"source":{"url":"https://arxiv.org/abs/2009.12812v3","title":"TernaryBERT: Distillation-aware Ultra-low Bit BERT","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"Natural Language Processing","area_id":"natural-language-processing","collection":"Autoencoding Transformers","url":"/methods/category/autoencoding-transformers","pwc_aliases":[]},{"area":"Natural Language Processing","area_id":"natural-language-processing","collection":"Transformers","url":"/methods/category/transformers","pwc_aliases":[]}],"n_papers_tagged":2,"archive_num_papers":2,"papers_newest_first":[{"paper":"/paper/binarybert-pushing-the-limit-of-bert","title":"BinaryBERT: Pushing the Limit of BERT Quantization","date":"2020-12-31","arxiv_id":"2012.15701","n_code_links":1,"syntology":{"ran":4,"of":6,"unverified":2,"pointer_only":6}},{"paper":"/paper/ternarybert-distillation-aware-ultra-low-bit","title":"TernaryBERT: Distillation-aware Ultra-low Bit BERT","date":"2020-09-27","arxiv_id":"2009.12812","n_code_links":5,"syntology":null}],"papers_shown":2,"tasks":[{"task":"/task/quantization","name":"Quantization","papers":2},{"task":"/task/binarization","name":"Binarization","papers":1},{"task":"/task/knowledge-distillation","name":"Knowledge Distillation","papers":1},{"task":"/task/model-compression","name":"Model Compression","papers":1}],"tasks_shown":4,"n_tasks":4,"usage_by_year":[{"year":"2020","papers":2}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/ternarybert"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}