diff options
author | l3utterfly <gc.pthzfoldr@gmail.com> | 2024-02-05 17:00:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 10:00:47 +0200 |
commit | e6f81775323f6f4e4a30abf022a6028fa86b79ac (patch) | |
tree | 93d13b506ae2287a10515b4af5862e9c0d431a43 /common/common.cpp | |
parent | 30679d438d5225b3aecf5cec6482cbc9f8f87ba5 (diff) |
common : add dynamic temperature parameters to main example cli (#5295)
* added dynamic temp params in main
* added help text
Diffstat (limited to 'common/common.cpp')
-rw-r--r-- | common/common.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/common.cpp b/common/common.cpp index 3302caa2..8c1a6058 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -399,6 +399,18 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) { break; } sparams.penalty_present = std::stof(argv[i]); + } else if (arg == "--dynatemp-range") { + if (++i >= argc) { + invalid_param = true; + break; + } + sparams.dynatemp_range = std::stof(argv[i]); + } else if (arg == "--dynatemp-exp") { + if (++i >= argc) { + invalid_param = true; + break; + } + sparams.dynatemp_exponent = std::stof(argv[i]); } else if (arg == "--mirostat") { if (++i >= argc) { invalid_param = true; @@ -942,6 +954,8 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) { printf(" --repeat-penalty N penalize repeat sequence of tokens (default: %.1f, 1.0 = disabled)\n", (double)sparams.penalty_repeat); printf(" --presence-penalty N repeat alpha presence penalty (default: %.1f, 0.0 = disabled)\n", (double)sparams.penalty_present); printf(" --frequency-penalty N repeat alpha frequency penalty (default: %.1f, 0.0 = disabled)\n", (double)sparams.penalty_freq); + printf(" --dynatemp-range N dynamic temperature range (default: %.1f, 0.0 = disabled)\n", (double)sparams.dynatemp_range); + printf(" --dynatemp-exp N dynamic temperature exponent (default: %.1f)\n", (double)sparams.dynatemp_exponent); printf(" --mirostat N use Mirostat sampling.\n"); printf(" Top K, Nucleus, Tail Free and Locally Typical samplers are ignored if used.\n"); printf(" (default: %d, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0)\n", sparams.mirostat); |