Update generation_test_hf_script.py
Browse files
generation_test_hf_script.py
CHANGED
@@ -41,7 +41,7 @@ def run_test(model_name, test_ds):
|
|
41 |
for i, entries in enumerate(test_ds):
|
42 |
|
43 |
# prepare prompt packaging used in fine-tuning process
|
44 |
-
# note: in
|
45 |
new_prompt = "<human>: " + entries["context"] + "\n" + entries["query"] + "\n" + "<bot>:" + "\n"
|
46 |
|
47 |
inputs = tokenizer(new_prompt, return_tensors="pt")
|
|
|
41 |
for i, entries in enumerate(test_ds):
|
42 |
|
43 |
# prepare prompt packaging used in fine-tuning process
|
44 |
+
# note: in our testing, Yi model performed better with trailing "\n" at end of prompt
|
45 |
new_prompt = "<human>: " + entries["context"] + "\n" + entries["query"] + "\n" + "<bot>:" + "\n"
|
46 |
|
47 |
inputs = tokenizer(new_prompt, return_tensors="pt")
|