Skip to content

Commit 642c57f

Browse files
authored
Merge pull request #219 from bigcode-project/loubnabnl-patch-9
Add instruct models prompts
2 parents 094c7cc + 0cf6eae commit 642c57f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bigcode_eval/tasks/humanevalpack.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,19 @@ def get_prompt(self, prompt_base, instruction, context=None):
228228
elif self.prompt == "codellama":
229229
# https://hf.co/codellama
230230
prompt = f"[INST] {inp.strip()} [/INST] {prompt_base}"
231+
elif self.prompt == "deepseek":
232+
prompt = f"You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n### Instruction:\n{inp.strip()}\n### Response:\n{prompt_base}"
231233
elif self.prompt in ["tulu", "gritlm"]:
232234
# https://hf.co/GritLM/GritLM-7B
233235
prompt = f"<|user|>\n{inp}\n<|assistant|>\n{prompt_base}"
234236
elif self.prompt == "zephyr":
235237
# https://hf.co/HuggingFaceH4/zephyr-7b-beta
236238
prompt = f"<|user|>\n{inp}</s>\n<|assistant|>\n{prompt_base}"
237-
elif self.prompt == "yi":
239+
elif self.prompt in ["yi", "starchat2", "codeqwen"]:
238240
# https://hf.co/01-ai/Yi-34B-Chat
239241
prompt = f"<|im_start|>user\n{inp}<|im_end|>\n<|im_start|>assistant\n{prompt_base}"
242+
elif self.prompt == "codegemma":
243+
prompt = f"<start_of_turn>user\n{inp}<end_of_turn>\n<start_of_turn>model\n{prompt_base}"
240244
elif self.prompt == "codellama-70b":
241245
prompt = f"Source: user\n\n {inp.strip()} Source: assistant\nDestination: user \n\n{prompt_base}"
242246
elif self.prompt == "aurora-m":

0 commit comments

Comments
 (0)