AttributeError: 'DatasetDict' object has no attribute 'to'

You have passed a dataset to the model key in the Trainer. Try passing a model and the error should disappear.