def METHOD_NAME(args):
    place = "gpu"
    place = paddle.set_device(place)
    model_class, tokenizer_class = MODEL_CLASSES[args.model_name_or_path]
    tokenizer = tokenizer_class.from_pretrained(args.model_name_or_path)
    logger.info("Loading the model parameters, please wait...")
    model = model_class.from_pretrained(args.model_name_or_path)
    model.eval()
    bos_id = tokenizer.convert_tokens_to_ids(args.start_token)
    eos_id = tokenizer.convert_tokens_to_ids(args.end_token)
    # Define model
    gpt = model
    # Set evaluate mode
    gpt.eval()
    input_ids = np.array([[bos_id] for i in range(args.batch_size * 1)]).astype("int64").reshape([args.batch_size, 1])
    input_ids = paddle.to_tensor(input_ids)
    with paddle.no_grad():
        for i in range(100):
            # For warmup.
            if 50 == i:
                paddle.device.cuda.synchronize(place)
                start = time.time()
            out_seq, _ = gpt.generate(
                input_ids,
                top_k=args.topk,
                top_p=args.topp,
                max_length=args.max_length,
                temperature=args.temperature,
                bos_token_id=bos_id,
                eos_token_id=eos_id,
                decode_strategy="sampling",
                use_fp16_decoding=args.use_fp16_decoding,
                use_fast=True,
            )
            output_sequence = out_seq.numpy()
        paddle.device.cuda.synchronize(place)
        logger.info("Average test time for decoding is %f ms" % ((time.time() - start) / 50 * 1000))
        output_sequence = out_seq.numpy().tolist()
    for i in range(args.batch_size):
        print("========== Sample-%d ==========" % i)
        print(tokenizer.convert_ids_to_string(output_sequence[i]))