m.b*_*m.b 3 transformer-model tokenize huggingface-transformers huggingface-tokenizers gpt-2
我只是使用 Huggingface 转换器库,并在运行 run_lm_finetuning.py 时收到以下消息: AttributeError: 'GPT2TokenizerFast' object has no attribute 'max_len'。其他人有这个问题或知道如何解决它吗?谢谢!
我的完整实验运行:mkdir 实验
对于 5 中的纪元,执行 python run_lm_finetuning.py
--model_name_or_path distilgpt2
--model_type gpt2
--train_data_filesmall_dataset_train_preprocessed.txt
--output_direxperiments/epochs_$epoch
--do_train
--overwrite_output_dir
--per_device_train_batch_size 4
--num_train_epochs $epoch 完成
Wik*_*żew 12
“ AttributeError : 'BertTokenizerFast' 对象没有属性 'max_len'”Github 问题包含修复:
该
run_language_modeling.py脚本已被弃用,取而代之的是language-modeling/run_{clm, plm, mlm}.py.如果不是,解决方法是更改
max_len为model_max_length.
另外,pip install transformers==3.0.2可能会解决这个问题,因为据报道它对某些人有效。
| 归档时间: |
|
| 查看次数: |
10595 次 |
| 最近记录: |