BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding

Devlin et al., 2019, BERT (Proceedings of the 2019 Conference of the North American Chapter of ACL: Human Language Technologies (NAACL-HLT 2019))

Subscriber deck — free during early access

2 cards in “3 BERT” · whole deck

3 BERT

  1. What is BERT’s architecture, and what are the two standard sizes?
    A multi-layer bidirectional Transformer encoder. BERT-base: \(L = 12\) layers, hidden size \(H = 768\), \(A = 12\) heads, 110M parameters (same size as GPT). BERT-large: \(L = 24\), \(H = 1024\), \(A = 16\), 340M parameters. The feed-forward size is \(4H\).
    • Devlin et al., 2019, BERT (Proceedings of the 2019 Conference of the North American Chapter of ACL: Human Language Technologies (NAACL-HLT 2019)), §3, pp. 4173–4174
  2. How does BERT represent its input?
    WordPiece tokens (30,000 vocabulary), always starting with [CLS], whose final hidden state \(C\) serves as the sequence representation for classification. Sentence pairs are packed into one sequence, separated by [SEP], and each token’s input is the sum of its token, segment (A or B) and position embeddings.
    inputtokensegmentposition
    [CLS]E[CLS]EAE0
    theEtheEAE1
    catEcatEAE2
    satEsatEAE3
    [SEP]E[SEP]EAE4
    itEitEBE5
    purrEpurrEBE6
    ##edE##edEBE7
    [SEP]E[SEP]EBE8
    Each row’s three embeddings are summed; purred is split into the WordPieces purr ##ed.
    • Devlin et al., 2019, BERT (Proceedings of the 2019 Conference of the North American Chapter of ACL: Human Language Technologies (NAACL-HLT 2019)), §3, pp. 4173–4174

Source

  • Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2019), pp. 4171–4186. License: CC BY 4.0. Flashcards adapted from this work. doi:10.18653/v1/N19-1423 https://aclanthology.org/N19-1423/