diff --git a/python/llm/dev/benchmark/perplexity/run_wikitext.py b/python/llm/dev/benchmark/perplexity/run_wikitext.py index 50991558..92426a86 100644 --- a/python/llm/dev/benchmark/perplexity/run_wikitext.py +++ b/python/llm/dev/benchmark/perplexity/run_wikitext.py @@ -21,7 +21,6 @@ import argparse import torch from tqdm import tqdm from datasets import load_dataset -from ipex_llm.utils.common import invalidInputError parser = argparse.ArgumentParser() @@ -63,6 +62,7 @@ elif args.data_path: data = f.read() encodings = tokenizer(data.decode("utf-8").strip("\n"), return_tensors="pt") else: + from ipex_llm.utils.common import invalidInputError raise invalidInputError(False, "Must specify either dataset or datapath.") if not args.max_length: