mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-02-19 04:40:09 +00:00
Port universal assisted decoding to llama-server (#699)
* port universal assisted decoding to server * fix calls * fix LOG_INFO * fix llama_detokenize call * use emplace_back
This commit is contained in:
@@ -282,6 +282,11 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
|
||||
}
|
||||
}
|
||||
|
||||
for (auto & rep : params.replacements_draft) {
|
||||
string_process_escapes(rep.first);
|
||||
string_process_escapes(rep.second);
|
||||
}
|
||||
|
||||
if (!params.kv_overrides.empty()) {
|
||||
params.kv_overrides.emplace_back();
|
||||
params.kv_overrides.back().key[0] = 0;
|
||||
@@ -731,6 +736,14 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (arg == "--spec-replace") {
|
||||
CHECK_ARG
|
||||
std::string target = argv[i];
|
||||
CHECK_ARG
|
||||
std::string draft = argv[i];
|
||||
params.replacements_draft.emplace_back(std::move(target), std::move(draft));
|
||||
return true;
|
||||
}
|
||||
if (arg == "--cfg-negative-prompt") {
|
||||
CHECK_ARG
|
||||
sparams.cfg_negative_prompt = argv[i];
|
||||
|
||||
Reference in New Issue
Block a user