Skip to content

Commit

Permalink
add chatml
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Aug 6, 2023
1 parent e0c8a8f commit b6fd675
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/axolotl/prompters.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ def match_prompt_style(self):
self.turn_format = "USER: {instruction}\n{input}\nASSISTANT:"
self.turn_no_input_format = "USER: {instruction}\nASSISTANT:"
self.system_format = "SYSTEM:{system}\n"
if self.prompt_style == PromptStyle.CHATML.value:
self.turn_format = "<|im_start|>user\n{instruction}\n{input}<|im_end|>\n<|im_start|>assistant\n"
self.turn_no_input_format = (
"<|im_start|>user\n{instruction}<|im_end|>\n<|im_start|>assistant\n"
)
self.system_format = "<|im_start|>system\n{system}<|im_end|>\n"

def build_prompt(
self,
Expand Down

0 comments on commit b6fd675

Please sign in to comment.