Using GPT2 to implement GLTR
How can we use this GPT2 model to create the basic functionality of the GLTR tool?
Like getting probabilities for each word in a sequence.?
the allen institute tool may help you....it has probabilities of next 10 words for when adding a next word....i think the prorbablities are shown....may just be the 10 words but the git code is available i think so may be what you want.<|||||>The output of `GPT2LMHeadModel` are logits so you can just apply a softmax (or log-softmax for log probabilities) on them to get probabilities for each token.

Then if you want to get probabilities for words, you will need to multiply (or add if you used a log-softmax) the probabilities of the sub-words in each word.

Maybe @sebastianGehrmann you have some additional insights (or plan to release the code of GLTR, it's a great demo!)?<|||||>Thanks for pinging me @thomwolf. GLTR actually uses this amazing repo in the backend, so you could just use our code in conjunction. 

We are still working on the docu, but you can find all our code here: https://github.com/HendrikStrobelt/detecting-fake-text <|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
