Skip to content

Commit

Permalink
common : default --hf-file to --model (ggerganov#6234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov authored and hodlen committed Apr 1, 2024
1 parent 5856b0f commit 14a54e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,16 +1220,23 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
throw std::invalid_argument("error: unknown argument: " + arg);
}
}

if (invalid_param) {
throw std::invalid_argument("error: invalid parameter for argument: " + arg);
}

if (params.prompt_cache_all &&
(params.interactive || params.interactive_first ||
params.instruct)) {

throw std::invalid_argument("error: --prompt-cache-all not supported in interactive mode yet\n");
}

// short-hand to avoid specifying --hf-file -> default it to --model
if (!params.hf_repo.empty() && params.hf_file.empty()) {
params.hf_file = params.model;
}

if (params.escape) {
process_escapes(params.prompt);
process_escapes(params.input_prefix);
Expand Down

0 comments on commit 14a54e2

Please sign in to comment.