From 4be8de1604c8485a8570c36d823e20c6e70cf3e3 Mon Sep 17 00:00:00 2001 From: mgroeber9110 Date: Fri, 28 Jun 2024 20:27:53 +0200 Subject: [PATCH] server : remove initial start-of-text tokens from llama2, llama3 templates --- examples/server/public/prompt-formats.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/public/prompt-formats.js b/examples/server/public/prompt-formats.js index bdb23e654..8f9c6db41 100644 --- a/examples/server/public/prompt-formats.js +++ b/examples/server/public/prompt-formats.js @@ -56,7 +56,7 @@ export const promptFormats = { // ---------------------------- "llama2": { - template: `[INST] <>\n{{prompt}}\n<>\n\nTest Message [/INST] Test Successful {{history}}`, + template: `[INST] <>\n{{prompt}}\n<>\n\nTest Message [/INST] Test Successful {{history}}`, historyTemplate: `{{message}}`, @@ -75,7 +75,7 @@ export const promptFormats = { // ---------------------------- "llama3": { - template: `<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n{{prompt}}<|eot_id|>\n{{history}}<|start_header_id|>{{char}}<|end_header_id|>\n\n`, + template: `<|start_header_id|>system<|end_header_id|>\n\n{{prompt}}<|eot_id|>\n{{history}}<|start_header_id|>{{char}}<|end_header_id|>\n\n`, historyTemplate: `<|start_header_id|>{{name}}<|end_header_id|>\n\n{{message}}<|eot_id|>\n`,