Преглед на файлове

Fix bug in generate promp using 'instruction' instead of 'input'

Jan Malte Lichtenberg преди 3 години
родител
ревизия
a3b80fdbd5
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      finetune.py

+ 1 - 1
finetune.py

@@ -37,7 +37,7 @@ data = load_dataset("json", data_files="alpaca_data.json")
 
 def generate_prompt(data_point):
     # sorry about the formatting disaster gotta move fast
-    if data_point["instruction"]:
+    if data_point["input"]:
         return f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
 
 ### Instruction: