Confidence score for beam search (`sequence_score` from `scores`)

Hello!
I’m trying to make use of scores to calculate sequence_score for beam search generation.
Is it possible to perform this task?

I managed to do this with softmax and max functions for each step, for greedy search.
But I wonder if is it possible for beam search, where beam can be replaced during calculation (worst is replaced) and then scores can no longer be related to previous ones in given beam (?).

So the question is, how can I recreate sequence_score with scores (and sequence) and is it even possible? How should I know which beam achieved the best result and its value is in sequence_score?

Thanks in advance for your help!

1 Like