code: def main():
      args = parse_args()
      model_name = ".".join(args.model.split(".")[:-1])
      ckpt_path = f"{model_name}.bin"
  
      url = "http://images.cocodataset.org/val2017/000000039769.jpg"
      image = Image.open(requests.get(url, stream=True).raw)
      feature_extractor = ViTFeatureExtractor.from_pretrained(
          "google/vit-base-patch16-224-in21k"
      )
      inputs = feature_extractor(images=image, return_tensors="pt")
      inputs = inputs["pixel_values"]
  
      print("initializing vit config...")
      config = ViTConfig.from_pretrained(
          "google/vit-base-patch16-224-in21k",
          num_labels=3,
          finetuning_task="image-classification",
      )
  
      print("creating huggingface model...")
      hf_model = ViTForImageClassification.from_pretrained(
          "google/vit-base-patch16-224-in21k",
          config=config,
      ).cuda()
      inject_ls_enc_layer(hf_model, config)
      state_dict = torch.load(ckpt_path, map_location="cpu")
      hf_model.load_state_dict(state_dict, strict=False)
      hf_model.to("cuda:0")
      hf_model.eval()
  
      print("creating lightseq model...")
      ls_model = LightseqVitClassification(args.model, hf_model)
  
      print("====================START warmup====================")
      one_infer(inputs, ls_model, hf_model)
      print("====================END warmup====================")
  
      one_infer(inputs, ls_model, hf_model)
  
imports: import time
  import requests
  from PIL import Image
  import torch
  from transformers import ViTFeatureExtractor, ViTForImageClassification, ViTConfig
  import lightseq.inference
  from lightseq.training.ops.pytorch.quantization import qat_mode
  from lightseq.training.ops.pytorch.torch_transformer_layers import TransformerEncoderLayer
  from export.util import parse_args
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types