Skip to content

Commit

Permalink
cvector-generator: Moe Moe Fixie-Fixie for Lots of Formats~! ♡(ᐢ ᴥ ᐢ)♡ (
Browse files Browse the repository at this point in the history
#8052)

* Update negative.txt

* Update positive.txt

* Update cvector-generator.cpp

* Update cvector-generator.cpp
  • Loading branch information
HatsuneMikuUwU33 authored Jun 22, 2024
1 parent 3aa184a commit adf480c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/cvector-generator/cvector-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ static int prepare_entries(gpt_params & params, train_context & ctx_train) {
// create templated prompts
std::vector<std::string> 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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cvector-generator/negative.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[INST] Act like a person who is extremely sad. [/INST]
[INST] Act like a person who is extremely sad. [/INST]
2 changes: 1 addition & 1 deletion examples/cvector-generator/positive.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[INST] Act like a person who is extremely happy. [/INST]
[INST] Act like a person who is extremely happy. [/INST]

0 comments on commit adf480c

Please sign in to comment.