如何高效备战BERT专题的多模态大模型面试?

2026-04-27 21:560阅读0评论建站教程
  • 内容介绍
  • 文章标签
  • 相关推荐

猜被 MASK 的词

 BERT 专题面经

→ BERT 嫩预测“机器”

自然、 训练目标简单

Next Sentence Prediction,不忍卒读。

代码语言:python

768

NSP 是否保留

def pretrainstep: 
    inputids = batch.to #  
    tokentypeids = batch.to #  
    attentionmask = batch.to #  
    nextsentencelabels = batch.to #  
    # 构造 MLM 目标 
    maskedinputids, maskedlmlabels, maskedpositions = createmaskedlmlabels( 
        inputids=inputids, 
        padtokenid=padtokenid, 
        clstokenid=clstokenid, 
        septokenid=septokenid,  #这玩意儿堪起来有点问题,莫名其妙地多了个下划线,反正我也不改了面试官也懒得堪细节对吧?嘻嘻。
阅读全文

猜被 MASK 的词

 BERT 专题面经

→ BERT 嫩预测“机器”

自然、 训练目标简单

Next Sentence Prediction,不忍卒读。

代码语言:python

768

NSP 是否保留

def pretrainstep: 
    inputids = batch.to #  
    tokentypeids = batch.to #  
    attentionmask = batch.to #  
    nextsentencelabels = batch.to #  
    # 构造 MLM 目标 
    maskedinputids, maskedlmlabels, maskedpositions = createmaskedlmlabels( 
        inputids=inputids, 
        padtokenid=padtokenid, 
        clstokenid=clstokenid, 
        septokenid=septokenid,  #这玩意儿堪起来有点问题,莫名其妙地多了个下划线,反正我也不改了面试官也懒得堪细节对吧?嘻嘻。
阅读全文