Can you provide a bit more information about this, notably the call stack (or its most relevant subset)? I cannot provide help, but would like to compare with an issue I have, which I think is similar.
From scouting this forum there are probably quite a few beginners that get stuck on it as well, trying to adapt example fine-tuning workflows to their own data.
I get a similar error message when calling the train method on a Trainer. From a beginner’s perspective this is frustrating as the value N of the tensor a is not coming from an obvious place.
I can see in debug mode in my case that this tensor dimension of size N arises from inputs_embeds = self.word_embeddings(input_ids) somewhere in transformers.models.deberta_v2.modeling_deberta_v2.DebertaV2Embeddings, but this is hardly comforting for the newbie (me).
I am not using the TextClassificationPipeline like you, but I gather this is probably at an equivalent place (training) that the exception occurs?