往期文章链接目录
文章目录
BERT Recap
Overview
- Bert (Bidirectional Encoder Representations from Transformers) uses a “masked language model” to randomly mask some tokens from the input and predict the original vocabulary id of the masked token.
- Bert shows that “pre-trained representations reduce the need for many heavily-engineered task-specific architectures”.
BERT Specifics
There are two steps to the BERT framework: pre-training and fine-tuning
-
During pre training, the model is trained on unlabeled data over different pre-training tasks.
-
Each down stream task has separate fine-tuned models after each is first initialized with pre-trained parameters.
![](https://img-blog.csdnimg.cn/20200918115610836.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0pheV9UYW5n,size_1,color_FFFFFF,t_70#pic_center)
Input Output Representations
-
In order to handle a variety of down-stream tasks, the input must be able to represent a single sentence and sentence pair in one sequence.
-
The first token of every sequence is always a classification token
[CLS]
. -
Sentence pairs are separated by a special token
[SEP]
. -
Learned embeddings are add