我有一个大文件(1 GB+),混合了短文本和长文本(格式: wikitext-2),用于微调蒙面语言模型,作为基线模型。我遵守了https://github.com/huggingface/transformers/tree/master/examples/language-modeling的指示。这一过程似乎陷入了"Creating features from dataset file at <file loc>“的阶段。我不知道出了什么问题,是真的卡住了,还是这么大的文件真的要花很长时间?
命令看起来几乎如下所示:
export TRAIN_FILE=/path/to/dataset/my.train.raw
export TEST_FILE=/path/to/dataset/my.test.raw
python run_language_modeling.py \
--output_dir=local_output_dir \
--model_type=bert \
--model_name_or_path=local_bert_dir \
--do_train \
--train_data_file=$TRAIN_FILE \
--do_eval \
--eval_data_file=$TEST_FILE \
--mlm添加:作业在CPU上运行。
发布于 2020-06-21 22:07:44
由于该文件很大,我强烈建议在实际的大型数据上运行它之前,先在玩具数据集中尝试代码。当您调试时,这也会很有帮助。
如果您的系统有多核,请遵循一些多处理策略.看看https://github.com/PyTorchLightning/pytorch-lightning。
https://stackoverflow.com/questions/62476760
复制相似问题