code: def gen_gpt_enc_config(config):
      gpt_enc_config = TransformerDecoderLayer.get_config(
          max_batch_tokens=8192,
          max_seq_len=config.max_position_embeddings,
          hidden_size=config.hidden_size,
          intermediate_size=4 * config.hidden_size,
          nhead=config.num_attention_heads,
          attn_prob_dropout_ratio=config.attn_pdrop,
          activation_dropout_ratio=config.resid_pdrop,
          hidden_dropout_ratio=config.resid_pdrop,
          pre_layer_norm=True,
          fp16=True,
          local_rank=0,
          nlayer=config.num_hidden_layers,
          activation_fn="gelu",
          has_cross_attn=False,
      )
      return gpt_enc_config
  
imports: import time
  import torch
  from torch import nn
  from transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config
  import lightseq.inference
  from lightseq.training.ops.pytorch.quantization import qat_mode, QuantLinear, TensorQuantizer, weight_quant_config, emb_quant_config
  from lightseq.training.ops.pytorch.torch_transformer_layers import TransformerDecoderLayer
  from export.util import parse_args
label_desc: Use image node_id 9 for calling a global function with example usage: gen_gpt_enc_config(config) and returns: gpt_enc_config