hey @zuujhyt, you can activate the desired padding by specifying padding="max_length" in your tokenizer as follows:
tokenizer(str, return_tensors="pt", padding="max_length", max_length=10)

when padding=True the tokenizer will pad to the longest sequence in the batch (or no padding for the single sentence case)