Key Error 'loss' while fine tuning GPT-2 with the Trainer utility

sgugger
Thu, 17 Dec 2020 17:52:02 +0000

The official examples have a fine-tuning script for causal models like GPT-2 and there is also a notebook with an example.