Transformers使用bert模型预留的[unused*]时遇到的问题:torch.embedding IndexError: index out of range in self
先报错了CUDAerror:device-sideasserttriggered然后模型放到cpu里查看具体原因,报错了:torch.embedding(weight,input,padding_idx,scale_grad_by_freq,sparse)IndexError:indexoutofrangeinself最后发现是因为改了bert预留的[unused*]导致的问题:tokenizer