code: def bart_large_architecture(args):
      args.encoder_embed_path = getattr(
          args, "encoder_embed_path", None
      )
      args.encoder_embed_dim = getattr(args, "encoder_embed_dim", 1024)
      args.encoder_ffn_embed_dim = getattr(
          args, "encoder_ffn_embed_dim", 4 * 1024
      )
      args.encoder_layers = getattr(args, "encoder_layers", 12)
      args.encoder_attention_heads = getattr(
          args, "encoder_attention_heads", 16
      )
      args.encoder_normalize_before = getattr(
          args, "encoder_normalize_before", False
      )
      args.encoder_learned_pos = getattr(
          args, "encoder_learned_pos", True
      )
      args.decoder_embed_path = getattr(
          args, "decoder_embed_path", None
      )
      args.decoder_embed_dim = getattr(
          args, "decoder_embed_dim", args.encoder_embed_dim
      )
      args.decoder_ffn_embed_dim = getattr(
          args, "decoder_ffn_embed_dim", args.encoder_ffn_embed_dim
      )
      args.decoder_layers = getattr(args, "decoder_layers", 12)
      args.decoder_attention_heads = getattr(
          args, "decoder_attention_heads", 16
      )
      args.decoder_normalize_before = getattr(
          args, "decoder_normalize_before", False
      )
      args.decoder_learned_pos = getattr(
          args, "decoder_learned_pos", True
      )
      args.attention_dropout = getattr(args, "attention_dropout", 0.0)
      args.relu_dropout = getattr(args, "relu_dropout", 0.0)
      args.dropout = getattr(args, "dropout", 0.1)
      args.max_target_positions = getattr(
          args, "max_target_positions", 1024
      )
      args.max_source_positions = getattr(
          args, "max_source_positions", 1024
      )
      args.adaptive_softmax_cutoff = getattr(
          args, "adaptive_softmax_cutoff", None
      )
      args.adaptive_softmax_dropout = getattr(
          args, "adaptive_softmax_dropout", 0
      )
      args.share_decoder_input_output_embed = getattr(
          args, "share_decoder_input_output_embed", True
      )
      args.share_all_embeddings = getattr(
          args, "share_all_embeddings", True
      )
  
      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.no_scale_embedding = getattr(
          args, "no_scale_embedding", True
      )
      args.layernorm_embedding = getattr(
          args, "layernorm_embedding", True
      )
  
      args.activation_fn = getattr(args, "activation_fn", "gelu")
      args.pooler_activation_fn = getattr(
          args, "pooler_activation_fn", "tanh"
      )
      args.pooler_dropout = getattr(args, "pooler_dropout", 0.0)
  
imports: import logging
  from typing import Optional
  import torch
  import torch.nn
  from fairseq import utils
  from fairseq.models import register_model, register_model_architecture
  from fairseq.models.transformer import TransformerModel
  from fairseq.modules.transformer_sentence_encoder import init_bert_params
  from .hub_interface import BARTHubInterface
label_desc: Use image node_id 1 for calling a global function with example usage: bart_large_architecture(args) without return types