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:
parent
485a628806
commit
6971f4928f
2 changed files with 4 additions and 0 deletions
|
@ -2,3 +2,4 @@ filename ggml-vicuna-13b-1.1-q4_0.bin
|
||||||
instruct_mode_policy force
|
instruct_mode_policy force
|
||||||
user_prompt USER:
|
user_prompt USER:
|
||||||
bot_prompt ASSISTANT:
|
bot_prompt ASSISTANT:
|
||||||
|
emits_eos true
|
||||||
|
|
3
main.cpp
3
main.cpp
|
@ -83,6 +83,7 @@ public:
|
||||||
std::string weight_path,
|
std::string weight_path,
|
||||||
user_prompt,
|
user_prompt,
|
||||||
bot_prompt;
|
bot_prompt;
|
||||||
|
bool emits_eos = false;
|
||||||
enum class InstructModePolicy {
|
enum class InstructModePolicy {
|
||||||
Allow = 0b11,
|
Allow = 0b11,
|
||||||
Force = 0b10,
|
Force = 0b10,
|
||||||
|
@ -704,6 +705,8 @@ int main(int argc, char **argv) {
|
||||||
model_cfg.bot_prompt = std::move(value);
|
model_cfg.bot_prompt = std::move(value);
|
||||||
} else if (key == "instruct_mode_policy") {
|
} else if (key == "instruct_mode_policy") {
|
||||||
model_cfg.instruct_mode_policy = parse_instruct_mode_policy(value);
|
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] != '#') {
|
} else if (!key.empty() && key[0] != '#') {
|
||||||
std::cerr << "Failed to parse model configuration file: Unknown key: " << key << std::endl;
|
std::cerr << "Failed to parse model configuration file: Unknown key: " << key << std::endl;
|
||||||
exit(-3);
|
exit(-3);
|
||||||
|
|
Loading…
Add table
Reference in a new issue