Reopen: Unable to use run_squad with xla_spawn.py on TPU
## Environment info
- `transformers` version: 3.1.0
- Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.7.0a0+ab76067 (False)
- Tensorflow version (GPU?): 2.3.0 (False)
- Using GPU in script? TPU
- Using distributed or parallel set-up in script?: YES

### Who can help
@LysandreJik 

 
## Information
I see there is an issue (#5470) closed on July, because the SQuAD example didn't have trainer support yet, but it seems that now it does have according to the table (https://github.com/huggingface/transformers/tree/master/examples#the-big-table-of-tasks)

Model I am using (Bert, XLNet ...):
BERT

The problem arises when using:
* [X] the official example scripts: (give details below)
the official example scripts: RUN_squad.py + xla_spawn.py
* [ ] my own modified scripts: (give details below)

The tasks I am working on is:
* [X] an official GLUE/SQUaD task: (give the name)
SQuAD v2.0
* [ ] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

Install pytorch-xla on colab using:
VERSION = "20200325"  #@param ["1.5" , "20200325", "nightly"]
!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py
!python pytorch-xla-env-setup.py --version $VERSION
Trying to run_squad on colab TPUs using xla_spawn.py
python examples/xla_spawn.py --num_cores 8 \
   examples/question-answering/run_squad.py \
  --model_type electra \
  --model_name_or_path google/electra-base-discriminator \
  --do_train \
  --do_eval \
  --do_lower_case \
  --train_file "/content/drive/My Drive/bert/train.json" \
  --predict_file "/content/drive/My Drive/bert/val.json" \
  --per_gpu_train_batch_size 12 \
  --learning_rate 3e-5 \
  --num_train_epochs 2.0 \
  --max_seq_length 384 \
  --doc_stride 128 \
  --output_dir "/content/drive/My Drive/bert/newdir6"

Error is thrown up
Traceback (most recent call last):
  File "examples/xla_spawn.py", line 72, in <module>
    main()
  File "examples/xla_spawn.py", line 68, in main
    xmp.spawn(mod._mp_fn, args=(), nprocs=args.num_cores)
AttributeError: module 'run_squad' has no attribute '_mp_fn'

Expected behavior
Training should run properly using xla_spawn.py

hi @christian-janiake-movile ,
`run_squad` won't work with `xla_spawn` since it doesn't use `Trainer`. You can use `run_squad_trainer.py` with `xla_spawn.py` if you want to fine-tune on TPU<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
