From adf480c3ab3abedc964c8ae381476257583ae134 Mon Sep 17 00:00:00 2001 From: HatsuneMikuUwU33 <173229399+HatsuneMikuUwU33@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:19:37 +0200 Subject: [PATCH] =?UTF-8?q?cvector-generator:=20Moe=20Moe=20Fixie-Fixie=20?= =?UTF-8?q?for=20Lots=20of=20Formats~!=20=E2=99=A1(=E1=90=A2=20=E1=B4=A5?= =?UTF-8?q?=20=E1=90=A2)=E2=99=A1=20(#8052)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update negative.txt * Update positive.txt * Update cvector-generator.cpp * Update cvector-generator.cpp --- examples/cvector-generator/cvector-generator.cpp | 4 ++-- examples/cvector-generator/negative.txt | 2 +- examples/cvector-generator/positive.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/cvector-generator/cvector-generator.cpp b/examples/cvector-generator/cvector-generator.cpp index 9941683db677e..8653bb6305281 100644 --- a/examples/cvector-generator/cvector-generator.cpp +++ b/examples/cvector-generator/cvector-generator.cpp @@ -377,8 +377,8 @@ static int prepare_entries(gpt_params & params, train_context & ctx_train) { // create templated prompts std::vector completions = ctrlvec_load_prompt_file(params.cvector_completions_file, false); auto format_template = [](std::string persona, std::string suffix) { - // entry in positive/negative.txt must already be formatted i.e. "[INST] Act as if you're extremely happy. [/INST]" - return persona + " " + suffix; + // entry in positive/negative.txt must already be formatted i.e. "[INST] Act as if you're extremely happy. [/INST] " + return persona + suffix; }; for (size_t i = 0; i < positive_prompts.size(); ++i) { for (int j = 0; j < std::min((int) completions.size(), params.n_completions); ++j) { diff --git a/examples/cvector-generator/negative.txt b/examples/cvector-generator/negative.txt index 2ac3387f184b0..3e9951752e886 100644 --- a/examples/cvector-generator/negative.txt +++ b/examples/cvector-generator/negative.txt @@ -1 +1 @@ -[INST] Act like a person who is extremely sad. [/INST] \ No newline at end of file +[INST] Act like a person who is extremely sad. [/INST] diff --git a/examples/cvector-generator/positive.txt b/examples/cvector-generator/positive.txt index f28e9aa1aeb72..8802367873cd9 100644 --- a/examples/cvector-generator/positive.txt +++ b/examples/cvector-generator/positive.txt @@ -1 +1 @@ -[INST] Act like a person who is extremely happy. [/INST] \ No newline at end of file +[INST] Act like a person who is extremely happy. [/INST]