def METHOD_NAME(args):
    paddle.set_device(args.device)
    set_seed(args.seed)
    model = UnifiedTransformerLMHeadModel.from_pretrained(args.model_name_or_path)
    tokenizer = UnifiedTransformerTokenizer.from_pretrained(args.model_name_or_path)
    test_ds = load_dataset("duconv", split="test_1")
    test_ds, test_data_loader = create_data_loader(test_ds, tokenizer, args, "test")
    model.eval()
    total_time = 0.0
    start_time = time.time()
    pred_responses = []
    for step, inputs in enumerate(test_data_loader, 1):
        input_ids, token_type_ids, position_ids, attention_mask, seq_len = inputs
        output = model.generate(
            input_ids=input_ids,
            token_type_ids=token_type_ids,
            position_ids=position_ids,
            attention_mask=attention_mask,
            seq_len=seq_len,
            max_length=args.max_dec_len,
            min_length=args.min_dec_len,
            decode_strategy=args.decode_strategy,
            temperature=args.temperature,
            top_k=args.top_k,
            top_p=args.top_p,
            num_beams=args.num_beams,
            length_penalty=args.length_penalty,
            early_stopping=args.early_stopping,
            num_return_sequences=args.num_return_sequences,
            use_fp16_decoding=args.use_fp16_decoding,
            use_fast=args.faster,
        )
        total_time += time.time() - start_time
        if step % args.logging_steps == 0:
            print("step %d - %.3fs/step" % (step, total_time / args.logging_steps))
            total_time = 0.0
        ids, scores = output
        results = select_response(ids, scores, tokenizer, args.max_dec_len, args.num_return_sequences)
        pred_responses.extend(results)
        start_time = time.time()
    with open(args.output_path, "w", encoding="utf-8") as fout:
        for response in pred_responses:
            fout.write(response + "\n")
    print("\nSave inference result into: %s" % args.output_path)
    target_responses = [example["response"] for example in test_ds]
    calc_bleu_and_distinct(pred_responses, target_responses)