Generation scores

Hi, I’m trying to use .generate() method for decoder-only models(ex. GPT2), and figuring out that it provides various helpful values as well as the generated sequence(s). However, I cannot find detailed description of each value.

In detail, when I use beam search (by passing num_beams 3, num_return-sequences3, do_sample False), I can get sequences, sequences_scores, scores, and beam_indices. Obviously, sequences is the generated sequences(token ids). But what do others mean? And how can I compute them by hand?

Plus, :hugs:huggingface transformers provide compute_transition_scores() method for each model. What does this value mean? How can I compute it? And what’s the difference between scores and transition_scores?

1 Like