diff --git a/run_model.py b/run_model.py index 10d0d98..ea9f26b 100755 --- a/run_model.py +++ b/run_model.py @@ -33,7 +33,7 @@ DEEPSEEK2_PROMPT_TEMPLATE="{SYS}\n\nUser: {USER}\n\nAssistant:" NEMOTRON4_PROMPT_TEMPLATE="System\n{SYS}\nUser\n{USER}\nAssistant\n" DEEPSEEK2_0628_PROMPT_TEMPLATE="<|begin▁of▁sentence|>{SYS}\n\n<|User|>{USER}<|Assistant|>" - TULU3_PROMPT_TEMPLATE="<|system|>\n{SYS}\n<|user|>\n{USER}\n<|assistant|>\n" + TULU3_PROMPT_TEMPLATE="<|endoftext|><|system|>\n{SYS}\n<|user|>\n{USER}\n<|assistant|>\n" else: LLAMA_PROMPT_TEMPLATE="[INST] {USER}[/INST]\n" LLAMA3_PROMPT_TEMPLATE="<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\n{USER}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n" @@ -44,7 +44,7 @@ DEEPSEEK2_PROMPT_TEMPLATE="User: {USER}\n\nAssistant:" NEMOTRON4_PROMPT_TEMPLATE="System\n\nUser\n{USER}Assistant\n" DEEPSEEK2_0628_PROMPT_TEMPLATE="<|begin▁of▁sentence|><|User|>{USER}<|Assistant|>" - TULU3_PROMPT_TEMPLATE="<|user|>\n{USER}\n<|assistant|>\n" + TULU3_PROMPT_TEMPLATE="<|endoftext|><|user|>\n{USER}\n<|assistant|>\n" model_file_basename = os.path.basename(model_file) @@ -67,7 +67,7 @@ prompt_template = DEEPSEEK2_PROMPT_TEMPLATE elif any(model_name in model_file_basename.lower() for model_name in ["nemotron"]): prompt_template = NEMOTRON4_PROMPT_TEMPLATE -elif any(model_name in model_file_basename.lower() for model_name in ["tulu-3"]): +elif any(model_name in model_file_basename.lower() for model_name in ["tulu-3", "olmo-2"]): prompt_template = TULU3_PROMPT_TEMPLATE else: raise RuntimeError("Could not detect model prompt template!")