Test a fine-tuned BERT-QA model
I have fine-tuned a BERT-QA model on SQuAD and it produced a `pytorch_model.bin` file. Now, I want to load this fine-tuned model and evaluate on SQuAD. How can I do that? I am using the `run_squad.py` script.
I noticed the following snippet in the code. (which I have edited to solve my problem)

    if args.do_train and (args.local_rank == -1 or torch.distributed.get_rank() == 0):
        # Save a trained model, configuration and tokenizer
        model_to_save = model.module if hasattr(model, 'module') else model  # Only save the model it-self

        # If we save using the predefined names, we can load using `from_pretrained`
        output_model_file = os.path.join(args.output_dir, WEIGHTS_NAME)
        output_config_file = os.path.join(args.output_dir, CONFIG_NAME)

        torch.save(model_to_save.state_dict(), output_model_file)
        model_to_save.config.to_json_file(output_config_file)
        tokenizer.save_vocabulary(args.output_dir)

        # Load a trained model and vocabulary that you have fine-tuned
        model = BertForQuestionAnswering.from_pretrained(args.output_dir)
        tokenizer = BertTokenizer.from_pretrained(args.output_dir, do_lower_case=args.do_lower_case)
    else:
        model = BertForQuestionAnswering.from_pretrained(args.bert_model)


So, if we want to load the fine-tuned model only for prediction, need to load it from `args.output_dir`. But the current code loads from `args.bert_model` when we use `squad.py` only for prediction.<|||||>@wasiahmad  tokenizer  is not needed at prediction time?

Thanks
Mahesh<|||||>need help in understanding how to get the model trained with SQuAD + my dataset. Once trained, how to use it for actual prediction.

model : BERT Question Answering
<|||||>@Swathygsb 
https://github.com/kamalkraj/BERT-SQuAD
inference on bert-squad model<|||||>> @Swathygsb
> https://github.com/kamalkraj/BERT-SQuAD
> inference on bert-squad model

thx for your sharing, and there is inference on bert-squad model by tensorflow?
3Q~