每次運行 GPT-2 時,我都會收到此消息。有什么辦法可以讓它消失嗎?Some weights of GPT2LMHeadModel were not initialized from the model checkpoint at gpt2 and are newly initialized: ['h.0.attn.masked_bias', 'h.1.attn.masked_bias', 'h.2.attn.masked_bias', 'h.3.attn.masked_bias', 'h.4.attn.masked_bias', 'h.5.attn.masked_bias', 'h.6.attn.masked_bias', 'h.7.attn.masked_bias', 'h.8.attn.masked_bias', 'h.9.attn.masked_bias', 'h.10.attn.masked_bias', 'h.11.attn.masked_bias', 'lm_head.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
1 回答

Smart貓小萌
TA貢獻1911條經驗 獲得超7個贊
是的,您需要在從轉換器庫導入任何內容之前更改日志級別:
import logging
logging.basicConfig(level='ERROR')
from transformers import GPT2LMHeadModel
model = GPT2LMHeadModel.from_pretrained('gpt2')
添加回答
舉報
0/150
提交
取消