xhw205 / GPLinker_torch

CMeIE/CBLUE/CHIP/实体关系抽取/SPO抽取
214 stars 14 forks source link

更换base model报错 RuntimeError: mat1 and mat2 shapes cannot be multiplied (856x768 and 1024x256) #17

Closed lichuanxiang closed 1 year ago

lichuanxiang commented 1 year ago

image

看之前有开过一个帖子(https://github.com/xhw205/GPLinker_torch/issues/7),但没下文了,辛苦帮看下,是因为转换为其他 base model 需要做特殊处理吗?

lichuanxiang commented 1 year ago

主要改动: from transformers import BertTokenizerFast, BertModel, AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nghuyong/ernie-health-zh") encoder = AutoModel.from_pretrained("nghuyong/ernie-health-zh")