Skip to content

Commit 09c4002

Browse files
authored
Add prompts
1 parent 00967d1 commit 09c4002

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bigcode_eval/tasks/humanevalpack.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ def get_prompt(self, prompt_base, instruction, context=None):
225225
prompt = f'Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{inp}\n\n### Response:\n{prompt_base}'
226226
elif self.prompt == "codellama":
227227
prompt = f"[INST] {inp.strip()} [/INST] {prompt_base}"
228+
elif self.prompt in ["tulu", "gritlm"]:
229+
prompt = f"<|user|>\n{inp}\n<|assistant|>\n{prompt_base}"
230+
elif self.prompt == "zephyr":
231+
prompt = f"<|user|>\n{inp}</s>\n<|assistant|>\n{prompt_base}"
232+
elif self.prompt == "yi":
233+
prompt = f"<|im_start|>user\n{inp}<|im_end|>\n<|im_start|>assistant\n{prompt_base}"
228234
else:
229235
raise ValueError(f"The --prompt argument {self.prompt} wasn't provided or isn't supported")
230236
# Strip off the final \n to make the tokens more natural

0 commit comments

Comments
 (0)