class_docstr: A simple PyTorch interface for ULM
class_docstr_tok: ["A","simple","PyTorch","interface","for","ULM"]
code: def from_pretrained(
      cls,
      model_name_or_path,
      checkpoint_file="checkpoint_best.pt",
      data_name_or_path=".",
      **kwargs,
  ):
      x = hub_utils.from_pretrained(
          model_name_or_path,
          checkpoint_file,
          data_name_or_path,
          archive_map=None,
          bpe=None,
          load_checkpoint_heads=True,
          sample_break_mode="eos",
          **kwargs,
      )
      return cls(x["args"], x["task"], x["models"])
  
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 7 for calling the UnitLanguageModelSampler obj's underlying member method code with example usage: obj.from_pretrained(cls, model_name_or_path, checkpoint_file, data_name_or_path) and returns: cls