Hi rgwatwormhill,
Thank you for your answer. I didn’t specify any such parameters. My code using the tokenizer is only the instanciation:
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')

and the usage in the Dataset subclass:
   class IMDBDistilBertDataset(Dataset):
    def __init__(self, cleaned_reviews, y_binary, tokenizer, max_len):
        self.tokenizer = tokenizer
        self.cleaned_reviews = cleaned_reviews
        self.y_binary = y_binary
        self.max_len = max_len

    def __len__(self):
        return len(self.y_binary)

    def __getitem__(self, index):
        text = str(self.cleaned_reviews[index])
        text = " ".join(text.split())
        inputs = self.tokenizer.encode_plus(
            text,
            None,
            add_special_tokens=True,
            max_length=self.max_len,
            pad_to_max_length=True,
            return_token_type_ids=True,
            truncation=True
        )
        ids = inputs['input_ids']
        mask = inputs['attention_mask']
        token_type_ids = inputs["token_type_ids"]

        return {
            'ids': torch.tensor(ids, dtype=torch.long),
            'mask': torch.tensor(mask, dtype=torch.long),
            'token_type_ids': torch.tensor(token_type_ids, dtype=torch.long),
            'targets': self.y_binary[index]
        }

I looked at the code, and if I’m not wrong, this parameter is set to True by default. But to be honest, I didn’t know that the parameter existed before you mentioned it. I guess I should look for documentation.
Thanks again