Skip to content

Commit

Permalink
Merge pull request #194 from bigcode-project/loubnabnl-patch-8
Browse files Browse the repository at this point in the history
add support for codellama-70b prompt
  • Loading branch information
loubnabnl authored Feb 16, 2024
2 parents 00967d1 + 0261c52 commit 2ec0159
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bigcode_eval/tasks/humanevalpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def get_prompt(self, prompt_base, instruction, context=None):
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}'
elif self.prompt == "codellama":
prompt = f"[INST] {inp.strip()} [/INST] {prompt_base}"
elif self.prompt == "codellama-70b":
prompt = f"Source: user\n\n {inp.strip()} Source: assistant\nDestination: user \n\n{prompt_base}"
else:
raise ValueError(f"The --prompt argument {self.prompt} wasn't provided or isn't supported")
# Strip off the final \n to make the tokens more natural
Expand Down

0 comments on commit 2ec0159

Please sign in to comment.