• Skip to main content
  • Skip to primary sidebar
AAAI

AAAI

Association for the Advancement of Artificial Intelligence

    • AAAI

      AAAI

      Association for the Advancement of Artificial Intelligence

  • About AAAIAbout AAAI
    • AAAI Officers and Committees
    • AAAI Staff
    • Bylaws of AAAI
    • AAAI Awards
      • Fellows Program
      • Classic Paper Award
      • Dissertation Award
      • Distinguished Service Award
      • Allen Newell Award
      • Outstanding Paper Award
      • Award for Artificial Intelligence for the Benefit of Humanity
      • Feigenbaum Prize
      • Patrick Henry Winston Outstanding Educator Award
      • Engelmore Award
      • AAAI ISEF Awards
      • Senior Member Status
      • Conference Awards
    • AAAI Resources
    • AAAI Mailing Lists
    • Past AAAI Presidential Addresses
    • Presidential Panel on Long-Term AI Futures
    • Past AAAI Policy Reports
      • A Report to ARPA on Twenty-First Century Intelligent Systems
      • The Role of Intelligent Systems in the National Information Infrastructure
    • AAAI Logos
    • News
  • aaai-icon_ethics-diversity-line-yellowEthics & Diversity
  • Conference talk bubbleConferences & Symposia
    • AAAI Conference
    • AIES AAAI/ACM
    • AIIDE
    • IAAI
    • ICWSM
    • HCOMP
    • Spring Symposia
    • Summer Symposia
    • Fall Symposia
    • Code of Conduct for Conferences and Events
  • PublicationsPublications
    • AAAI Press
    • AI Magazine
    • Conference Proceedings
    • AAAI Publication Policies & Guidelines
    • Request to Reproduce Copyrighted Materials
  • aaai-icon_ai-magazine-line-yellowAI Magazine
    • Issues and Articles
    • Author Guidelines
    • Editorial Focus
  • MembershipMembership
    • Member Login
    • Developing Country List
    • AAAI Chapter Program

  • Career CenterCareer Center
  • aaai-icon_ai-topics-line-yellowAITopics
  • aaai-icon_contact-line-yellowContact

Home / Proceedings / Proceedings of the AAAI Conference on Artificial Intelligence

Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT

February 1, 2023

Download PDF

Authors

Sheng Shen

Univerisity of California, Berkeley


Zhen Dong

Univerisity of California, Berkeley


Jiayu Ye

Univerisity of California, Berkeley


Linjian Ma

Univerisity of California, Berkeley


Zhewei Yao

Univerisity of California, Berkeley


Amir Gholami

Univerisity of California, Berkeley


Michael W. Mahoney

Univerisity of California, Berkeley


Kurt Keutzer

Univerisity of California, Berkeley


DOI:

10.1609/aaai.v34i05.6409


Abstract:

Transformer based architectures have become de-facto models used for a range of Natural Language Processing tasks. In particular, the BERT based models achieved significant accuracy gain for GLUE tasks, CoNLL-03 and SQuAD. However, BERT based models have a prohibitive memory footprint and latency. As a result, deploying BERT based models in resource constrained environments has become a challenging task. In this work, we perform an extensive analysis of fine-tuned BERT models using second order Hessian information, and we use our results to propose a novel method for quantizing BERT models to ultra low precision. In particular, we propose a new group-wise quantization scheme, and we use Hessian-based mix-precision method to compress the model further. We extensively test our proposed method on BERT downstream tasks of SST-2, MNLI, CoNLL-03, and SQuAD. We can achieve comparable performance to baseline with at most 2.3% performance degradation, even with ultra-low precision quantization down to 2 bits, corresponding up to 13× compression of the model parameters, and up to 4× compression of the embedding table as well as activations. Among all tasks, we observed the highest performance loss for BERT fine-tuned on SQuAD. By probing into the Hessian based analysis as well as visualization, we show that this is related to the fact that current training/fine-tuning strategy of BERT does not converge for SQuAD.

Topics: AAAI

Primary Sidebar

HOW TO CITE:

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT Proceedings of the AAAI Conference on Artificial Intelligence (2020) 8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT AAAI 2020, 8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer (2020). Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT. Proceedings of the AAAI Conference on Artificial Intelligence, 8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT. Proceedings of the AAAI Conference on Artificial Intelligence 2020 p.8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. 2020. Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT. "Proceedings of the AAAI Conference on Artificial Intelligence". 8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. (2020) "Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT", Proceedings of the AAAI Conference on Artificial Intelligence, p.8815-8821

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer, "Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT", AAAI, p.8815-8821, 2020.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. "Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT". Proceedings of the AAAI Conference on Artificial Intelligence, 2020, p.8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. "Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT". Proceedings of the AAAI Conference on Artificial Intelligence, (2020): 8815-8821.

Sheng Shen||Zhen Dong||Jiayu Ye||Linjian Ma||Zhewei Yao||Amir Gholami||Michael W. Mahoney||Kurt Keutzer. Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT. AAAI[Internet]. 2020[cited 2023]; 8815-8821.


ISSN: 2374-3468


Published by AAAI Press, Palo Alto, California USA
Copyright 2022, Association for the Advancement of
Artificial Intelligence 1900 Embarcadero Road, Suite
101, Palo Alto, California 94303 All Rights Reserved

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT