code: def parse_args():
      parser = argparse.ArgumentParser(
          description="create data for post-model training", usage=""
      )
      parser.add_argument(
          "--input",
          type=str,
          default="checkpoint.pt",
          help="input fairseq checkpoint",
      )
      parser.add_argument(
          "--output",
          type=str,
          default="moe.pb",
          help="output lightseq model file",
      )
      parser.add_argument(
          "--beam_size", type=int, default=4, help="beam size"
      )
      parser.add_argument(
          "--max-step",
          type=int,
          default=1024,
          help="max step to decode",
      )
      parser.add_argument(
          "--head-num", type=int, default=16, help="head num"
      )
      parser.add_argument(
          "--bos_id", type=int, default=2, help="bos id"
      )
      parser.add_argument(
          "--eos_id", type=int, default=2, help="eos id"
      )
      parser.add_argument(
          "--pad_id", type=int, default=1, help="pad id"
      )
      # newly added for MoE
      parser.add_argument(
          "--moe_list_encoder",
          type=list,
          default=[0, 1, 2, 3, 4, 5],
          help="list of encoder layers that enable MoE module",
      )
      parser.add_argument(
          "--moe_list_decoder",
          type=list,
          default=[],
          help="list of decoder layers that enable MoE module",
      )
      parser.add_argument(
          "--expert_num_encoder",
          type=int,
          default=8,
          help="number of experts in encoder",
      )
      parser.add_argument(
          "--expert_num_decoder",
          type=int,
          default=8,
          help="number of experts in decoder",
      )
      parser.add_argument(
          "--moe_topk_encoder",
          type=int,
          default=2,
          help="topk of MoE gate in encoder, support k=1 or 2",
      )
      parser.add_argument(
          "--moe_topk_decoder",
          type=int,
          default=2,
          help="topk of MoE gate in decoder, support k=1 or 2",
      )
  
      args = parser.parse_args()
      return args
  
file_path: lightseq/examples/inference/python/export/fairseq/native_fs_moe_transformer_export.py
imports: import os
  import torch
  import argparse
  import numpy
  from collections import OrderedDict
  import lightseq.inference
  from proto.moe_pb2 import Moe
  from lightseq.training.ops.pytorch.export import gather_token_embedding, export_ls_config
  from lightseq.training.ops.pytorch.util import get_pos_embedding
label_desc: Use image node_id 7 for calling a global function with example usage: parse_args() and returns: args