我只是在使用huggingface库,并在运行run_lm_finetuning.py时获得以下消息: AttributeError:'GPT2TokenizerFast‘对象没有属性'max_len’。其他有这个问题的人,或者怎么解决这个问题的想法?谢谢!
我的完整实验: mkdir实验
在5做python run_lm_finetuning.py的时代
-模型名称或路径distilgpt2
-型号gpt2
-列车数据文件small_dataset_train_preprocessed.txt
-输出dir实验/历元历元
-多列列车
-覆盖输出dir
-每台设备列车批量4
发布于 2021-04-14 10:27:39
“莱恩”问题包含修补程序:
run_language_modeling.py脚本不受欢迎,而支持language-modeling/run_{clm, plm, mlm}.py。 如果不是,修复方法是将max_len更改为model_max_length。
发布于 2022-05-09 09:08:19
我使用这个命令来解决它。
pip install transformers==3.0.2https://stackoverflow.com/questions/67089849
复制相似问题