I got 'ValueError: You have to specify either input_ids or inputs_embeds' when I am training GPT2 using huggingface Trainer

Ran into the same issue and this post was helpful.
Looked into AutoTokenizer, which addressed the issue.