code: def gen_gpt_enc_config(training_args, 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=training_args.fp16,
          local_rank=training_args.local_rank,
          nlayer=config.num_hidden_layers,
          activation_fn="gelu",
          has_cross_attn=False,
      )
      return gpt_enc_config
  
file_path: lightseq/examples/training/huggingface/gpt/ls_hf_gpt_layer.py
imports: from torch import nn
  from lightseq.training.ops.pytorch.quantization import qat_mode, enable_quant, disable_quant, QuantLinear, TensorQuantizer, emb_quant_config
  from lightseq.training.ops.pytorch.torch_transformer_layers import TransformerDecoderLayer, copy_para
label_desc: Use image node_id 3 for calling a global function with example usage: gen_gpt_enc_config(training_args, config) and returns: gpt_enc_config