fastnlp / CPT

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

from modeling_cpt import CPTForConditionalGeneration 出错 #74

Open sumafuture opened 1 year ago

sumafuture commented 1 year ago

在使用 from modeling_cpt import CPTForConditionalGeneration 时出现这个bug:TypeError: add_code_sample_docstrings() got an unexpected keyword argument 'tokenizer_class'。定位在class CPTModel(CPTPretrainedModel),modeling_cpt文件的863行。我不清楚该怎么解决这个问题,请问这一般是由于什么原因呢?

sumafuture commented 1 year ago

我对应部位注释掉就可以使用了

PolarisRisingWar commented 3 months ago

我也遇到了类似的问题,我是直接参考这个issue:https://github.com/openai/gpt-2/issues/299 把 tokenizer_class 改成了 processor_class 反正能跑起来了