class_docstr: Spoken Unit-based Dialogue Language Model model (SpeechDLM) as described
  in the paper: https://arxiv.org/pdf/2203.16502.pdf
class_docstr_tok: ["Spoken","Unit-based","Dialogue","Language","Model","model","(","SpeechDLM",")","as","described","in","the","paper",":","https",":","\/\/arxiv.org\/pdf\/2203.16502.pdf"]
docstr: Load a :class:`~fairseq.models.FairseqModel` from a pre-trained model
  file. Downloads and caches the pre-trained model file if needed.
  
  The base implementation returns a
  :class:`~fairseq.hub_utils.GeneratorHubInterface`, which can be used to
  generate translations or sample from language models. The underlying
  :class:`~fairseq.models.FairseqModel` can be accessed via the
  *generator.models* attribute.
  
  This function return a class:`MultichannelGeneratorHubInterface` object,
  which allows generation in multiple channels with a multichannel model.
  
  Args:
      model_name_or_path (str): either the name of a pre-trained model to
          load or a path/URL to a pre-trained model state dict
      checkpoint_file (str, optional): colon-separated list of checkpoint
          files in the model archive to ensemble (default: 'model.pt')
      data_name_or_path (str, optional): point args.data to the archive
          at the given path/URL. Can start with '.' or './' to reuse the
          model archive path.
docstr_tok: ["Load","a",":","class",":","`","~fairseq.models.FairseqModel","`","from","a","pre-trained","model","file",".","Downloads","and","caches","the","pre-trained","model","file","if","needed",".","The","base","implementation","returns","a",":","class",":","`","~fairseq.hub_utils.GeneratorHubInterface","`",",","which","can","be","used","to","generate","translations","or","sample","from","language","models",".","The","underlying",":","class",":","`","~fairseq.models.FairseqModel","`","can","be","accessed","via","the","*","generator.models","*","attribute",".","This","function","return","a","class",":","`","MultichannelGeneratorHubInterface","`","object",",","which","allows","generation","in","multiple","channels","with","a","multichannel","model",".","Args",":","model_name_or_path","(","str",")",":","either","the","name","of","a","pre-trained","model","to","load","or","a","path\/URL","to","a","pre-trained","model","state","dict","checkpoint_file","(","str",",","optional",")",":","colon-separated","list","of","checkpoint","files","in","the","model","archive","to","ensemble","(","default",":","'model.pt","'",")","data_name_or_path","(","str",",","optional",")",":","point","args.data","to","the","archive","at","the","given","path\/URL",".","Can","start","with","'",".","'","or","'.\/","'","to","reuse","the","model","archive","path","."]
code: def from_pretrained(
      cls,
      model_name_or_path,
      checkpoint_file="model.pt",
      data_name_or_path=".",
      **kwargs,
  ):
      """
      Load a :class:`~fairseq.models.FairseqModel` from a pre-trained model
      file. Downloads and caches the pre-trained model file if needed.
  
      The base implementation returns a
      :class:`~fairseq.hub_utils.GeneratorHubInterface`, which can be used to
      generate translations or sample from language models. The underlying
      :class:`~fairseq.models.FairseqModel` can be accessed via the
      *generator.models* attribute.
  
      This function return a class:`MultichannelGeneratorHubInterface` object,
      which allows generation in multiple channels with a multichannel model.
  
      Args:
          model_name_or_path (str): either the name of a pre-trained model to
              load or a path/URL to a pre-trained model state dict
          checkpoint_file (str, optional): colon-separated list of checkpoint
              files in the model archive to ensemble (default: 'model.pt')
          data_name_or_path (str, optional): point args.data to the archive
              at the given path/URL. Can start with '.' or './' to reuse the
              model archive path.
      """
      from fairseq import hub_utils
      from .hub_interface import MultichannelGeneratorHubInterface
  
      x = hub_utils.from_pretrained(
          model_name_or_path,
          checkpoint_file,
          data_name_or_path,
          archive_map=cls.hub_models(),
          **kwargs,
      )
      logger.info(x["args"])
      return MultichannelGeneratorHubInterface(
          x["args"], x["task"], x["models"]
      )
  
file_path: fairseq/fairseq/models/speech_dlm/speech_dlm.py
imports: import logging
  from dataclasses import dataclass, field
  from typing import Optional
  from fairseq import utils
  from fairseq.dataclass import ChoiceEnum, FairseqDataclass
  from fairseq.models import FairseqLanguageModel, register_model, register_model_architecture
  from fairseq.models.transformer import Embedding
  from .modules.speech_dlm_decoder import CrossChannelTransformerDecoder
  from omegaconf import II
label_desc: Use image node_id 4 for calling the SpeechDLM 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: MultichannelGeneratorHubInterface