For Q&A fine-tune training
Course:
https://huggingface.co/learn/nlp-course/en/chapter7/7
In Colab:
Under-the-hood:
Manual code with PyTorch, from HF:
https://github.com/huggingface/transformers/blob/main/examples/pytorch/question-answering/run_qa.py
https://github.com/huggingface/transformers/blob/main/examples/pytorch/question-answering/trainer_qa.py
Official Google BERT squad training:
https://github.com/google-research/bert/blob/master/run_squad.py
Colab: