code: def inject_ls_layer(model, config):
      model.transformer.wte = GptEmbedding(
          config.vocab_size, config.hidden_size
      )
      model.transformer.wte.apply(qat_mode)
  
      for i in range(config.num_hidden_layers):
          gpt_enc_config = gen_gpt_enc_config(config)
          model.transformer.h[i] = LSHFGptEncoderLayer(
              gpt_enc_config
          ).cuda()
          model.transformer.h[i].apply(qat_mode)
  
      q_lm_head = QuantLinear(
          config.n_embd, config.vocab_size, bias=False
      )
      q_lm_head.weight = model.transformer.wte.weight
      q_lm_head.weight_quant = model.transformer.wte.emb_quant
      model.lm_head = q_lm_head
  
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 10 for calling a global function with example usage: inject_ls_layer(model, config) without return types