Check out the Padding and truncation concept guide to learn more different padding and truncation arguments.

Build tensors
Finally, you want the tokenizer to return the actual tensors that get fed to the model.
Set the return_tensors parameter to either pt for PyTorch, or tf for TensorFlow: