docstr: Initialize n-best list of hypotheses.
docstr_tok: ["Initialize","n-best","list","of","hypotheses","."]
code: def __init__(self, n_hyp, max_len, length_penalty, early_stopping):
      """
      Initialize n-best list of hypotheses.
      """
      self.max_len = max_len
      self.length_penalty = length_penalty
      self.early_stopping = early_stopping
      self.n_hyp = n_hyp
      self.hyp = []
      self.worst_score = 1e9
  
file_path: DeepKE/example/llm/CPM-Bee/src/cpm_live/generation/generation_utils.py
imports: import torch
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new BeamHypotheses object  with example: obj = BeamHypotheses(n_hyp, max_len, length_penalty, early_stopping)