简单记录Bert

BERT是一种基于Transformer架构的模型,通过左右上下文条件学习文本表示。其预训练包括两个任务: masked language model (MLM) 和 next sentence prediction (NSP)。在MLM中,15%的词汇被[MASK]替换,模型预测被遮蔽的词;在NSP中,模型判断句子对是否连续。BERT使用特殊标记[CLS]进行分类任务,[SEP]用于分隔打包在一起的句子对。此外,还有一种特殊学习嵌入来指示每个词来自哪个句子。预训练数据包括英文维基百科和BookCorpus。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

读到一篇论文中对Bert的一点简单介绍,感觉比较便于加深理解,在此mark一下。

BERT [6] is a transformer [49] model that learns textual representations by conditioning on both left and right context for all layers. BERT was pre-trained for two different tasks, MLM and NSP. For MLM, 15% of the tokens are replaced with a [MASK] token, and the model is trained to predict the masked tokens). For NSP, the model is trained to distinguish (binary classification) between pairs of sentences A and B, where 50% of the time B is the next and 50% it is not the next
sentence (a random sentence is selected). The special token [CLS] is added to every sentence during pre-training; it is used for classification tasks. [SEP] is another special token that is used to separate sentence pairs that are packed together into a single sequence. Additionally, there is a special learned embedding which indicates whether each token comes from sentence A or B. BERT was pre-trained using both English Wikipedia (2.5m words) and the BookCorpus [63],

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值