Sentence Prediction

Hello everybody, a question, how can I do the following: given a sentence A, how can I know what is the probability of generating another sentence B, with language models? For example, given the sentence A: the cat is hungry, what is the probability that it generates the sentence B: The cat has already eaten.

Hi @oskrmiguel it depends on the Model. I did find this forum question that may help you find some insight into your question. Generation Probabilities: How to compute probabilities of output scores for GPT2 - #22 by Aktsvigun

Hello @anwarika the model I am using is Bart

I don’t know if BART stores that, you may calculate each tokens probability.