When you're ready, you can call compile and fit to start training. Note that Transformers models all have a default task-relevant loss function, so you don't need to specify one unless you want to:

from tensorflow.keras.optimizers import Adam
model.compile(optimizer=Adam(3e-5))  # No loss argument!
model.fit(tf_dataset)  # doctest: +SKIP