Reputation: 69
I am trying to train the distil BERT model for Question Answering purpose. I have installed simple transformers and everything but when I try to run the following command:
model = QuestionAnsweringModel('distilbert',
MODEL_PATH,
args={'reprocess_input_data': True,
'overwrite_output_dir': True,
'learning_rate': 5e-5,
'num_train_epochs': 2,
'max_seq_length': 192,
'doc_stride': 64,
'fp16': False
}, use_cuda=use_cuda)
I am getting the error - >
cannot import name 'DISTILBERT_PRETRAINED_MODEL_ARCHIVE_MAP'
from 'transformers.modeling_distilbert'
(/opt/conda/lib/python3.7/site-packages/transformers/modeling_distilbert.py)
please help!
Upvotes: 2
Views: 1184
Reputation: 11
I think it is because the version of transformer,after I update transformer===2.7.0,it works.
Upvotes: 1