def METHOD_NAME(args):
    if args.ngpu > 1:
        raise NotImplementedError("only single GPU decoding is supported")
    if args.ngpu == 1:
        device = "gpu:0"
    else:
        device = "cpu"
    paddle.set_device(device)
    dtype = getattr(paddle, args.dtype)
    logger.info(f"Decoding device={device}, dtype={dtype}")
    lm_model, lm_config = load_trained_lm(args)
    lm_model.to(device=device, dtype=dtype)
    lm_model.eval()
    PPL, log_base = cacu_perplexity(lm_model, lm_config, args, None)
    logger.info("Final PPL: " + str(PPL))
    logger.info("The log base is:" + str("%.2f" % log_base))