from huggingface_hub import notebook_login
notebook_login()

Load SQuAD dataset
Start by loading a smaller subset of the SQuAD dataset from the 🤗 Datasets library. This'll give you a chance to experiment and make sure everything works before spending more time training on the full dataset.

from datasets import load_dataset
squad = load_dataset("squad", split="train[:5000]")

Split the dataset's train split into a train and test set with the [~datasets.Dataset.train_test_split] method: