Hi,
mT5 is, like T5, an encoder-decoder model. The run_qa.py script only supports encoder-only models (like BERT, RoBERTa, DistilBERT, etc.). This script only allows you to do extractive question answering (i.e. the model predicts start_positions and end_positions, indicating which tokens are at the start and the end of the answer).
However, you can fine-tune mT5 for question-answering. mT5 and T5 cast every NLP problem into a text-to-text format, so you can create training examples as:
input: 'question:  context: ’
output: ‘’
We could add a run_qa_seq2seq.py script (which would be similar to the run_summarization.py and run_translation.py scripts), see supporting t5 for question answering · Issue #13029 · huggingface/transformers · GitHub 24.