How to get probability of a sentence using GPT-2 model?
Hi, I’m doing a linguistic research and I’m using GPT-2 model.I have two sentences: one is correct and the other one has some atypical elements which makes it strange.I’d like to use GPT-2 to get the probabilities of both the sentences and see if the model understands which one is linguistically correct.How can I do?
2023-01-08T08:40:40Z
Hi@caputmaybe these two links help:gpt_sent_probGeneration Probabilities: How to compute probabilities of output scores for GPT2