class_docstr: A simple PyTorch interface for ULM
class_docstr_tok: ["A","simple","PyTorch","interface","for","ULM"]
code: def sample(
      self,
      sentences: tp.List[str],
      beam: int = 1,
      verbose: bool = False,
      **kwargs,
  ):
      hypotheses = self.sample_top_hypotheses(
          sentences, beam, verbose, **kwargs
      )
      return [hypos[0] for hypos in hypotheses]
  
file_path: textlesslib/examples/gslm/sampler.py
imports: import typing
  from fairseq import hub_utils, utils
  from fairseq.hub_utils import GeneratorHubInterface
label_desc: Use image node_id 5 for calling the UnitLanguageModelSampler obj's underlying member method code with example usage: obj.sample(sentences, beam, verbose) and returns: unknown