code: def generate(args):
      model, tokenizer = load_model(
          model_path=args.model_path, device=args.device
      )
  
      BASE_INFERENCE_SUFFIX = "\n\n->\n\n"
      input_txt = f"{args.input_txt}{BASE_INFERENCE_SUFFIX}"
  
      inputs = tokenizer(args.input_txt, return_tensors="pt").to(
          args.device
      )
      output = model.generate(
          **inputs,
          max_new_tokens=args.max_new_tokens,
          do_sample=args.do_sample,
          temperature=args.temperature,
          top_k=args.top_k,
          top_p=args.top_p,
          num_return_sequences=1,
      )
      response = tokenizer.decode(
          output.cpu()[0], skip_special_tokens=True
      )[len(input_txt) :]
      logger.info(f"Question: {input_txt} \n\n Answer: \n{response}")
      return response
  
imports: import argparse
  import os
  import torch
  from colossalai.logging import get_dist_logger
  from transformers import AutoTokenizer, AutoModelForCausalLM
label_desc: Use image node_id 2 for calling a global function with example usage: generate(args) and returns: response