Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instruct models prompts #219

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bigcode_eval/tasks/humanevalpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,19 @@ def get_prompt(self, prompt_base, instruction, context=None):
elif self.prompt == "codellama":
# https://hf.co/codellama
prompt = f"[INST] {inp.strip()} [/INST] {prompt_base}"
elif self.prompt == "deepseek":
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}"
elif self.prompt in ["tulu", "gritlm"]:
# https://hf.co/GritLM/GritLM-7B
prompt = f"<|user|>\n{inp}\n<|assistant|>\n{prompt_base}"
elif self.prompt == "zephyr":
# https://hf.co/HuggingFaceH4/zephyr-7b-beta
prompt = f"<|user|>\n{inp}</s>\n<|assistant|>\n{prompt_base}"
elif self.prompt == "yi":
elif self.prompt in ["yi", "starchat2", "codeqwen"]:
# https://hf.co/01-ai/Yi-34B-Chat
prompt = f"<|im_start|>user\n{inp}<|im_end|>\n<|im_start|>assistant\n{prompt_base}"
elif self.prompt == "codegemma":
prompt = f"<start_of_turn>user\n{inp}<end_of_turn>\n<start_of_turn>model\n{prompt_base}"
elif self.prompt == "codellama-70b":
prompt = f"Source: user\n\n {inp.strip()} Source: assistant\nDestination: user \n\n{prompt_base}"
elif self.prompt == "aurora-m":
Expand Down
Loading