From e4424fdbab988559eb233a9456c1f02832a816cb Mon Sep 17 00:00:00 2001 From: bys0318 <bys0318@126.com> Date: Tue, 1 Aug 2023 18:48:03 +0800 Subject: [PATCH] pred update --- pred.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pred.py b/pred.py index bf5a27e..ae1ec6f 100644 --- a/pred.py +++ b/pred.py @@ -11,7 +11,7 @@ def build_chat(tokenizer, prompt): def get_pred(model, tokenizer, data, max_length, max_gen, prompt_format, dataset, device): preds = [] - for json_obj in tqdm(data[:10]): + for json_obj in tqdm(data): prompt = prompt_format.format(**json_obj) # truncate to fit max_length (we suggest truncate in the middle, since the left and right side may contain crucial instructions) tokenized_prompt = tokenizer(prompt, truncation=False, return_tensors="pt").input_ids[0] -- GitLab