Skip to content

Commit 849481c

Browse files
authored
Merge pull request #199 from bigcode-project/addprompts
Add prompts
2 parents 2ec0159 + 649d82b commit 849481c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

bigcode_eval/tasks/humanevalpack.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def get_prompt(self, prompt_base, instruction, context=None):
213213
elif self.prompt == "octogeex":
214214
prompt = f'Question: {inp.strip()}\n\nAnswer:\n{prompt_base}'
215215
elif self.prompt == "starchat":
216-
# https://huggingface.co/HuggingFaceH4/starchat-beta
216+
# https://hf.co/HuggingFaceH4/starchat-beta
217217
prompt = f'<|system|>\n<|end|>\n<|user|>\n{inp}<|end|>\n<|assistant|>\n{prompt_base}'
218218
elif self.prompt == "starcodercommit":
219219
prompt = f'<commit_before><commit_msg>{inp}<commit_after>{prompt_base}'
@@ -224,7 +224,17 @@ def get_prompt(self, prompt_base, instruction, context=None):
224224
# https://github.com/nlpxucan/WizardLM/blob/main/WizardCoder/src/humaneval_gen.py#L37
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":
227+
# https://hf.co/codellama
227228
prompt = f"[INST] {inp.strip()} [/INST] {prompt_base}"
229+
elif self.prompt in ["tulu", "gritlm"]:
230+
# https://hf.co/GritLM/GritLM-7B
231+
prompt = f"<|user|>\n{inp}\n<|assistant|>\n{prompt_base}"
232+
elif self.prompt == "zephyr":
233+
# https://hf.co/HuggingFaceH4/zephyr-7b-beta
234+
prompt = f"<|user|>\n{inp}</s>\n<|assistant|>\n{prompt_base}"
235+
elif self.prompt == "yi":
236+
# https://hf.co/01-ai/Yi-34B-Chat
237+
prompt = f"<|im_start|>user\n{inp}<|im_end|>\n<|im_start|>assistant\n{prompt_base}"
228238
elif self.prompt == "codellama-70b":
229239
prompt = f"Source: user\n\n {inp.strip()} Source: assistant\nDestination: user \n\n{prompt_base}"
230240
else:

0 commit comments

Comments
 (0)