<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto">Output the token probabilities along with the tokens when generating sequence.</p>
<h2 dir="auto">Motivation</h2>
<p dir="auto">For understanding model confidence, this is quite useful.<br>
Also, for abstractive QA with long contexts, one needs to use doc-strides to take into account the contexts &amp; then choose the best answer according to the probability of the generated text.</p>
<h2 dir="auto">Your contribution</h2>
<p dir="auto">I can try submitting a PR for non-beam decoding, but guidance would be appreciated.<br>
Also, are there any existing solutions to this issue? If so, what &amp; where?</p>
<h1 dir="auto"><g-emoji class="g-emoji" alias="rocket" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f680.png">🚀</g-emoji> Feature request</h1>
<p dir="auto">output probabilities of generated sequences in generate function (generation utils)</p>
<p dir="auto">thank you so much! :)</p>