1
0
Fork 0
mirror of https://gitlab.com/niansa/discord_llama.git synced 2025-03-06 20:48:25 +01:00

Added emits_eos model config key

This commit is contained in:
niansa 2023-04-25 17:27:30 +02:00
parent 485a628806
commit 6971f4928f
2 changed files with 4 additions and 0 deletions

View file

@ -2,3 +2,4 @@ filename ggml-vicuna-13b-1.1-q4_0.bin
instruct_mode_policy force
user_prompt USER:
bot_prompt ASSISTANT:
emits_eos true

View file

@ -83,6 +83,7 @@ public:
std::string weight_path,
user_prompt,
bot_prompt;
bool emits_eos = false;
enum class InstructModePolicy {
Allow = 0b11,
Force = 0b10,
@ -704,6 +705,8 @@ int main(int argc, char **argv) {
model_cfg.bot_prompt = std::move(value);
} else if (key == "instruct_mode_policy") {
model_cfg.instruct_mode_policy = parse_instruct_mode_policy(value);
} else if (key == "emits_eos") {
model_cfg.emits_eos = parse_bool(value);
} else if (!key.empty() && key[0] != '#') {
std::cerr << "Failed to parse model configuration file: Unknown key: " << key << std::endl;
exit(-3);