Open sourcing BERT (Google, 2018)
The source's own title: Open Sourcing BERT: State-of-the-Art Pre-training for Natural Language Processin
The Google AI Language team announces the open-source release of BERT, a pre-training technique for natural language processing. BERT is a deeply bidirectional model pre-trained on unannotated text, which can be fine-tuned quickly on small task datasets. The post reports state-of-the-art results on 11 NLP tasks.
Article
- Said here alone: 17
What it says
- The Google AI Language team announces the open-source release of BERT (Bidirectional Encoder Representations from Transformers), a new technique for pre-training NLP models. The post starts from the shortage of labeled training data for NLP tasks and the idea of pre-training general language representations on unannotated web text, then fine-tuning them on small tasks. It explains the difference between context-free models such as word2vec and GloVe and contextual models, and argues that BERT is the first deeply bidirectional unsupervised representation, pre-trained on plain text such as Wikipedia. Bidirectional training is made possible by masking some input words and predicting them from context, and BERT also learns sentence relationships by predicting whether one sentence follows another. The authors credit Cloud TPUs and the Transformer architecture for making the approach work. They report 93.2% F1 on SQuAD v1.1, above the previous best of 91.6% and a human-level score of 91.2%, and a 7.6% absolute improvement on the GLUE benchmark of nine NLU tasks. Fine-tuning takes hours or less, and the released models are English-only. The code, pre-trained models and a Colab notebook are made available, and the authors expect most researchers will not need to pre-train from scratch.
- BERT reaches 93.2% F1 on SQuAD v1.1, above the previous state-of-the-art of 91.6% and a human-level score of 91.2%. u15 F1 is the accuracy measure the post uses for SQuAD.
- BERT improves the state of the art by 7.6% absolute on the GLUE benchmark of 9 natural language understanding tasks. u16
- The released BERT models are English-only, and the authors hope to release multilingual models in the near future. u17
- Pre-training on next-sentence prediction, which can be generated from any text corpus, teaches a model relationships between sentences. u13
- Most NLP researchers who use BERT will never need to pre-train their own models from scratch, since the released pre-trained models can be fine-tuned instead. u17 Addressed to NLP researchers who use BERT, as the authors expect.
- Context-free embeddings give the word 'bank' one representation whether it means a bank account or a river bank, while BERT represents words from both sides of their context. u6
- Bidirectional training cannot simply condition each word on its neighbours, because the predicted word would indirectly see itself; masking input words avoids this. u10–11 This is why earlier deep models were unidirectional, and masking is the workaround the post gives.
- Cloud TPUs allowed fast experimentation, debugging and tweaking of models, which the authors call critical to moving beyond existing pre-training techniques. u14
- BERT achieves state-of-the-art results on 11 NLP tasks with almost no task-specific changes to the network architecture. u4–15
- Anyone can train a state-of-the-art question answering system with BERT in about 30 minutes on a single Cloud TPU, or in a few hours on a single GPU. u4
- BERT is presented as the first deeply bidirectional, unsupervised language representation, pre-trained using only plain text such as Wikipedia. u5–6
- The authors say the open-source release lets anyone train a state-of-the-art question answering system in about 30 minutes on a single Cloud TPU. u4 Worth keeping as the post's headline promise of accessibility.
- The post says BERT lets a word be represented from both its previous and next context, starting from the bottom of a deep network. u6 Worth keeping as the clearest statement of what makes BERT bidirectional.
- The authors claim that BERT, with almost no task-specific changes, beats the human-level score on SQuAD v1.1. u15 A reader might expect a model to stop short of the human-level score.
- Bidirectional models were hard to train before because of the self-seeing problem, and the post notes that the idea of masking had existed for a long time before BERT made it work for deep networks. u10–12 The post settles it by saying the masking idea was old, and that BERT was the first to use it successfully for deep pre-training.
- Deeply bidirectional, unsupervised pre-training on plain text yields state-of-the-art NLP results with little task-specific change, and the authors release it as open source. Can a deeply bidirectional model pre-trained on unannotated text, then fine-tuned, outperform prior NLP methods without heavy task-specific architecture changes?
How it argues
- thesis Deep bidirectional pre-training yields state-of-the-art NLP results Can a deeply bidirectional model pre-trained on unannotated text, then fine-tuned, outperform prior NLP methods without heavy task-specific architecture changes?
- theme Deep bidirectional pre-training on plain text The source argues that reading words from both sides of their context, learned from unannotated text, gives better representations than earlier one-directional or context-free methods.
- theme State-of-the-art results with little change The source shows that one pre-trained model, fine-tuned with almost no architecture changes, beats prior methods on many benchmarks, including the human-level SQuAD score.
- theme Cheap training and open release The source argues that the released models make state-of-the-art training cheap and accessible, so most users only need fine-tuning, with the limit that the models are English-only.
The source, passage by passage
- u1 November 2, 2018
- u2 Posted by Jacob Devlin and Ming-Wei Chang, Research Scientists, Google AI Language
- u3 One of the biggest challenges in natural language processing (NLP) is the shortage of training data. Because NLP is a diversified field with many distinct tasks, most task-specific datasets contain only a few thousand or a few hundred thousand human-labeled training examples. However, modern deep learning-based NLP models see benefits from much larger amounts of data, improving when trained on millions, or billions, of annotated training examples. To help close this gap in data, researchers have developed a variety of techniques for training general purpose language representation models using the enormous amount of unannotated text on the web (known as pre-training). The pre-trained model can then be fine-tuned on small-data NLP tasks like question answering and sentiment analysis, resulting in substantial accuracy improvements compared to training on these datasets from scratch.
- u4 This week, we open sourced a new technique for NLP pre-training called Bidirectional Encoder Representations from Transformers, or BERT. With this release, anyone in the world can train their own state-of-the-art question answering system (or a variety of other models) in about 30 minutes on a single Cloud TPU, or in a few hours using a single GPU. The release includes source code built on top of TensorFlow and a number of pre-trained language representation models. In our associated paper, we demonstrate state-of-the-art results on 11 NLP tasks, including the very competitive Stanford Question Answering Dataset (SQuAD v1.1).
- u5 BERT builds upon recent work in pre-training contextual representations — including Semi-supervised Sequence Learning, Generative Pre-Training, ELMo, and ULMFit. However, unlike these previous models, BERT is the first deeply bidirectional, unsupervised language representation, pre-trained using only a plain text corpus (in this case, Wikipedia).
- u6 Why does this matter? Pre-trained representations can either be context-free or contextual, and contextual representations can further be unidirectional or bidirectional. Context-free models such as word2vec or GloVe generate a single word embedding representation for each word in the vocabulary. For example, the word “bank” would have the same context-free representation in “bank account” and “bank of the river.” Contextual models instead generate a representation of each word that is based on the other words in the sentence. For example, in the sentence “I accessed the bank account,” a unidirectional contextual model would represent “bank” based on “I accessed the” but not “account.” However, BERT represents “bank” using both its previous and next context — “I accessed the ... account” — starting from the very bottom of a deep neural network, making it deeply bidirectional.
- u7 A visualization of BERT’s neural network architecture compared to previous state-of-the-art contextual pre-training methods is shown below. The arrows indicate the information flow from one layer to the next. The green boxes at the top indicate the final contextualized representation of each input word:
- u8 BERT is deeply bidirectional, OpenAI GPT is unidirectional, and ELMo is shallowly bidirectional.
- u9 Architectural comparison of neural network structures for BERT, OpenAI GPT, and ELMo language models using blocks. (photo)
Architectural comparison of neural network structures for BERT, OpenAI GPT, and ELMo language models using blocks. - u10 If bidirectionality is so powerful, why hasn’t it been done before? To understand why, consider that unidirectional models are efficiently trained by predicting each word conditioned on the previous words in the sentence. However, it is not possible to train bidirectional models by simply conditioning each word on its previous and next words, since this would allow the word that’s being predicted to indirectly “see itself” in a multi-layer model.
- u11 To solve this problem, we use the straightforward technique of masking out some of the words in the input and then condition each word bidirectionally to predict the masked words. For example:
- u12 While this idea has been around for a very long time, BERT is the first time it was successfully used to pre-train a deep neural network.
- u13 BERT also learns to model relationships between sentences by pre-training on a very simple task that can be generated from any text corpus: Given two sentences A and B, is B the actual next sentence that comes after A in the corpus, or just a random sentence? For example:
- u14 Everything that we’ve described so far might seem fairly straightforward, so what’s the missing piece that made it work so well? Cloud TPUs. Cloud TPUs gave us the freedom to quickly experiment, debug, and tweak our models, which was critical in allowing us to move beyond existing pre-training techniques. The Transformer model architecture, developed by researchers at Google in 2017, also gave us the foundation we needed to make BERT successful. The Transformer is implemented in our open source release, as well as the tensor2tensor library.
- u15 To evaluate performance, we compared BERT to other state-of-the-art NLP systems. Importantly, BERT achieved all of its results with almost no task-specific changes to the neural network architecture. On SQuAD v1.1, BERT achieves 93.2% F1 score (a measure of accuracy), surpassing the previous state-of-the-art score of 91.6% and human-level score of 91.2%:
- u16 BERT also improves the state-of-the-art by 7.6% absolute on the very challenging GLUE benchmark, a set of 9 diverse Natural Language Understanding (NLU) tasks. The amount of human-labeled training data in these tasks ranges from 2,500 examples to 400,000 examples, and BERT substantially improves upon the state-of-the-art accuracy on all of them:
- u17 The models that we are releasing can be fine-tuned on a wide variety of NLP tasks in a few hours or less. The open source release also includes code to run pre-training, although we believe the majority of NLP researchers who use BERT will never need to pre-train their own models from scratch. The BERT models that we are releasing today are English-only, but we hope to release models which have been pre-trained on a variety of languages in the near future.
- u18 The open source TensorFlow implementation and pointers to pre-trained BERT models can be found at http://goo.gl/language/bert. Alternatively, you can get started using BERT through Colab with the notebook “BERT FineTuning with Cloud TPUs.”
- u19 You can also read our paper "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding" for more details.
- u20 × ❮ ❯
- u21 ×
Around it
Stanford CME295 Transformers & LLMs | Autumn 2026 | Lecture 2 - Large Language Models
Large language models build on transformers, with decoder-only generation becoming dominant alongside representation-based approaches such as BERT. Their effectiveness depends on balancing model size and training data, using efficient architectures, and choosing suitable decoding methods. Prompting and reasoning techniques can improve responses without changing weights, but longer contexts can impair retrieval and increase costs.
Video
This text is written with AI.
Placed in: Now