code: def prompt_eval(
      args, model_baseline, model_fintuned, tokenizer, device, prompts
  ):
      for prompt in prompts:
          inputs = tokenizer(prompt, return_tensors="pt").to(device)
          print("==========Baseline: Greedy=========")
          r_base = generate(
              model_baseline,
              tokenizer,
              inputs,
              num_beams=1,
              num_return_sequences=args.num_return_sequences,
              max_new_tokens=args.max_new_tokens,
          )
          print_utils(r_base)
          print("==========finetune: Greedy=========")
          r_finetune_g = generate(
              model_fintuned,
              tokenizer,
              inputs,
              num_beams=1,
              num_return_sequences=args.num_return_sequences,
              max_new_tokens=args.max_new_tokens,
          )
          print_utils(r_finetune_g)
          # Note: we use the above simplest greedy search as the baseline. Users can also use other baseline methods,
          # such as beam search, multinomial sampling, and beam-search multinomial sampling.
          # We provide examples as below for users to try.
  
          # print("==========finetune: Multinomial sampling=========")
          # r_finetune_m = generate(model_fintuned, tokenizer, inputs,
          #                         num_beams=1,
          #                         do_sample=True,
          #                         num_return_sequences=args.num_return_sequences,
          #                         max_new_tokens=args.max_new_tokens)
          # print_utils(r_finetune_m)
          # print("==========finetune: Beam Search=========")
          # r_finetune_b = generate(model_fintuned, tokenizer, inputs,
          #                         num_beams=args.num_beams,
          #                         num_return_sequences=args.num_return_sequences,
          #                         max_new_tokens=args.max_new_tokens)
          # print_utils(r_finetune_b)
          # print("==========finetune: Beam-search multinomial sampling=========")
          # r_finetune_s = generate(model_fintuned, tokenizer, inputs,
          #                         num_beams=args.num_beams,
          #                         do_sample=True,
          #                         num_return_sequences=args.num_return_sequences,
          #                         max_new_tokens=args.max_new_tokens)
          # print_utils(r_finetune_s)
          # print("==========finetune: Diverse Beam Search=========")
          # r_finetune_d = generate(model_fintuned, tokenizer, inputs,
          #                         num_beams=args.num_beams,
          #                         num_beam_groups=args.num_beam_groups,
          #                         num_return_sequences=args.num_return_sequences,
          #                         max_new_tokens=args.max_new_tokens)
          # print_utils(r_finetune_d)
          # print("==========finetune: Constrastive Search=========")
          # r_finetune_c = generate_constrastive_search(model_fintuned, tokenizer, inputs,
          #                                             top_k=args.top_k,
          #                                             penalty_alpha=args.penalty_alpha,
          #                                             num_return_sequences=args.num_return_sequences,
          #                                             max_new_tokens=args.max_new_tokens)
          # print_utils(r_finetune_c)
          print(
              "====================prompt end============================="
          )
          print()
          print()
  
file_path: deepspeedexamples/applications/DeepSpeed-Chat/training/step1_supervised_finetuning/prompt_eval.py
imports: import argparse
  import logging
  import torch
  from transformers import AutoModelForCausalLM
  from dschat.utils.model.model_utils import create_hf_model
  from dschat.utils.utils import load_hf_tokenizer
  from deepspeed import get_accelerator
label_desc: Use image node_id 5 for calling a global function with example usage: prompt_eval(args, model_baseline, model_fintuned, tokenizer, device, prompts) without return types