From 536b2898f881b0e39c59a3018a1c99eba7601a4b Mon Sep 17 00:00:00 2001 From: Vali98 Date: Mon, 16 Dec 2024 17:05:26 +0800 Subject: [PATCH] feat: fix missing newline in Gemma2 instruct, made ChatML default instruct --- constants/Instructs.ts | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/constants/Instructs.ts b/constants/Instructs.ts index 574082f..df8b5f1 100644 --- a/constants/Instructs.ts +++ b/constants/Instructs.ts @@ -25,6 +25,21 @@ const defaultBooleans = { } const defaultInstructs: InstructType[] = [ + { + system_prompt: "Write {{char}}'s next reply in a chat between {{char}} and {{user}}.", + system_prefix: '<|im_start|>system\n', + system_suffix: '<|im_end|>\n', + input_prefix: '<|im_start|>user\n', + input_suffix: '<|im_end|>\n', + output_prefix: '<|im_start|>assistant\n', + last_output_prefix: '<|im_start|>assistant\n', + output_suffix: '<|im_end|>\n', + stop_sequence: '<|im_end|>', + user_alignment_message: '', + activation_regex: '', + name: 'ChatML', + ...defaultBooleans, + }, { system_prompt: "Write {{char}}'s next reply in a chat between {{char}} and {{user}}.", system_prefix: '### Instruction: ', @@ -55,21 +70,6 @@ const defaultInstructs: InstructType[] = [ name: 'Llama 3', ...defaultBooleans, }, - { - system_prompt: "Write {{char}}'s next reply in a chat between {{char}} and {{user}}.", - system_prefix: '<|im_start|>system\n', - system_suffix: '<|im_end|>\n', - input_prefix: '<|im_start|>user\n', - input_suffix: '<|im_end|>\n', - output_prefix: '<|im_start|>assistant\n', - last_output_prefix: '<|im_start|>assistant\n', - output_suffix: '<|im_end|>\n', - stop_sequence: '<|im_end|>', - user_alignment_message: '', - activation_regex: '', - name: 'ChatML', - ...defaultBooleans, - }, { system_prompt: "Write {{char}}'s next reply in a chat between {{char}} and {{user}}.", system_prefix: '<|system|>\n', @@ -106,8 +106,8 @@ const defaultInstructs: InstructType[] = [ system_suffix: '\n', input_prefix: 'user\n', input_suffix: '\n', - output_prefix: 'model', - last_output_prefix: 'model', + output_prefix: 'model\n', + last_output_prefix: 'model\n', output_suffix: '\n', stop_sequence: '', user_alignment_message: '',