code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument("--user_input", action="store_true")
      args = parser.parse_args()
  
      print("initializing t5 tokenizer...")
      tokenizer = T5Tokenizer.from_pretrained("t5-base")
  
      print("creating lightseq model...")
      ls_model = lsi.T5("lightseq_t5_base.hdf5", 128)
  
      print("creating huggingface model...")
      hf_model = T5ForConditionalGeneration.from_pretrained("t5-base")
      hf_model.to("cuda:0")
      hf_model.eval()
  
      sentences = [
          "The <extra_id_0> walks in <extra_id_1> park",
          "summerize: Tom and Alice go to cinema, and watched the most impactful movie",
      ]
  
      print("====================START warmup====================")
      warmup(tokenizer, ls_model, hf_model, sentences)
      print("====================END warmup====================")
  
      while True:
          if args.user_input:
              sentences = [input("input the masked sentence:\n")]
  
          print("tokenizing the sentences...")
          inputs = tokenizer(
              sentences, return_tensors="pt", padding=True
          )
          inputs_id = inputs["input_ids"]
  
          ls_generate(ls_model, tokenizer, inputs_id)
          hf_generate(hf_model, tokenizer, inputs_id)
  
          if not args.user_input:
              break
  
file_path: lightseq/examples/inference/python/test/ls_t5.py
imports: import time
  import argparse
  import torch
  import lightseq.inference
  from transformers import T5Tokenizer, T5ForConditionalGeneration
  import sentencepiece
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types