Get_all_scores for TokenClassificationPipeline?

Hey everyone,

I have my own Token Classification model, that I am running with TokenClassficationPipeline. I have got to the situation where I need to see more than only one best tag but maybe the top 3 or even all of them.

I have seen that for TextClassificationPipeline there is a parameter named return_all_scores. When I have tried to debug that code, I have seen that there is no option to get more than the maximal tag that fits. I have seen that Beam Search can work too, but it is mainly for Seq2Seq models.

Is there any idea for getting the other possible tags’ scores that can fit? I do want to still use Pipeline since it is the most elegant solution, but if there is no other solution, I will write the code by myself.