mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
no need to duplicate models anymore
This commit is contained in:
parent
3763f8944d
commit
a40955f071
@ -895,8 +895,8 @@ def main():
|
||||
tokenizer = BertTokenizer.from_pretrained(args.bert_model, do_lower_case=args.do_lower_case)
|
||||
|
||||
# Prepare model
|
||||
model = BertForQuestionAnswering.from_pretrained(args.bert_model,
|
||||
cache_dir=os.path.join(str(PYTORCH_PRETRAINED_BERT_CACHE), 'distributed_{}'.format(args.local_rank)))
|
||||
model = BertForQuestionAnswering.from_pretrained(args.bert_model),
|
||||
# cache_dir=os.path.join(str(PYTORCH_PRETRAINED_BERT_CACHE), 'distributed_{}'.format(args.local_rank)))
|
||||
|
||||
if args.fp16:
|
||||
model.half()
|
||||
|
Loading…
Reference in New Issue
Block a user