code: def base_lm_architecture(args):
      args.decoder_embed_dim = getattr(args, "decoder_embed_dim", 512)
      args.decoder_ffn_embed_dim = getattr(
          args, "decoder_ffn_embed_dim", 2048
      )
      args.decoder_layers = getattr(args, "decoder_layers", 6)
      args.decoder_attention_heads = getattr(
          args, "decoder_attention_heads", 8
      )
      args.adaptive_softmax_cutoff = getattr(
          args, "adaptive_softmax_cutoff", None
      )
      args.adaptive_softmax_dropout = getattr(
          args, "adaptive_softmax_dropout", 0
      )
      args.adaptive_softmax_factor = getattr(
          args, "adaptive_softmax_factor", 4
      )
      args.decoder_learned_pos = getattr(
          args, "decoder_learned_pos", False
      )
  
      args.character_embeddings = getattr(
          args, "character_embeddings", False
      )
  
      args.decoder_output_dim = getattr(
          args, "decoder_output_dim", args.decoder_embed_dim
      )
      args.decoder_input_dim = getattr(
          args, "decoder_input_dim", args.decoder_embed_dim
      )
      args.decoder_conv_dim = getattr(
          args, "decoder_conv_dim", args.decoder_embed_dim
      )
  
      # The model training is not stable without this
      args.decoder_normalize_before = True
  
      args.adaptive_input = getattr(args, "adaptive_input", False)
      args.adaptive_input_factor = getattr(
          args, "adaptive_input_factor", 4
      )
      args.adaptive_input_cutoff = getattr(
          args, "adaptive_input_cutoff", None
      )
  
      args.tie_adaptive_weights = getattr(
          args, "tie_adaptive_weights", False
      )
      args.tie_adaptive_proj = getattr(args, "tie_adaptive_proj", False)
  
      args.decoder_kernel_size_list = getattr(
          args, "decoder_kernel_size_list", [3, 7, 15, 31, 31, 31]
      )
      if len(args.decoder_kernel_size_list) == 1:
          args.decoder_kernel_size_list = (
              args.decoder_kernel_size_list * args.decoder_layers
          )
      assert (
          len(args.decoder_kernel_size_list) == args.decoder_layers
      ), "decoder_kernel_size_list doesn't match decoder_layers"
      args.decoder_glu = getattr(args, "decoder_glu", True)
      args.input_dropout = getattr(args, "input_dropout", 0.1)
      args.weight_dropout = getattr(
          args, "weight_dropout", args.attention_dropout
      )
  
file_path: fairseq/fairseq/models/lightconv_lm.py
imports: from fairseq import utils
  from fairseq.models import FairseqLanguageModel, register_model, register_model_architecture
  from fairseq.models.lightconv import Embedding, LightConvDecoder
  from fairseq.modules import AdaptiveInput, CharacterTokenEmbedder
label_desc: Use image node_id 1 for calling a global function with example usage: base_lm_architecture(args) without return types