Hi @thecity2, you can have a look at the scripts in the examples/legacy folder here: transformers/examples/legacy at master · huggingface/transformers · GitHub
For example, the run_squad.py script shows you how this is done: transformers/run_squad.py at master · huggingface/transformers · GitHub