Relative Content

Tag Archive for machine-learningpytorchnlphuggingface-transformers

Huggingface GPT2 loss calculation

I’ve been trying to use GPT2 to calculate the loss of a given sentence. In principle I could this in two ways, one is to pass the labels to the model, another is from the logits.