model = TFAutoModelForCausalLM.from_pretrained(checkpoint_local, return_dict_in_generate=True)
outputs = model.generate(**input_ids, max_length=max_len, do_sample=True, num_beams=5)
batch_score = outputs.scores
# the shape of batch_score is [batch_size]
Thank you very much!