code: def gen_ls_gpt_enc_config(training_args, config):
      gpt_config = LSGptEncoderLayer.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,
          activation_fn="gelu",
      )
      return gpt_config
  
file_path: lightseq/lightseq/training/ops/pytorch/gpt_layer.py
imports: import torch
  from lightseq.training.ops.pytorch import TransformerBuilder
  from lightseq.training.ops.pytorch.transformer_encoder_layer import LSTransformerEncoderLayer
  from lightseq.training.ops.pytorch.quantization import weight_quant_config, act_quant_config
label_desc: Use image node_id 1 for calling a global function with example usage: gen_ls_gpt_enc_config(training_args, config) and returns: gpt_config