fastnlp / CPT

CPT: A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Generation
481 stars 70 forks source link

token_type_ids报错 #64

Closed longborn closed 1 year ago

longborn commented 1 year ago

bart-chinese在hugging face上finetune时在model.forward()时会报错多余输入token_type_ids,不管用bert还是Auto tokenizer都有这个问题,请问有解决办法吗

choosewhatulike commented 1 year ago

在forward之前,删除batch中这一项,类似batch.pop("token_type_ids")