ValueError: Target size (torch.Size([8])) must be the same as input size (torch.Size([8, 8]))

You mean we only have to pass (input_ids, attention_mask, token_type_ids, labels) during raining .
If so , How can we do it ?