Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c5f2f17

Browse filesBrowse files
ggerganovtybalex
authored andcommitted
common : default --hf-file to --model (ggml-org#6234)
1 parent 6a2e69c commit c5f2f17
Copy full SHA for c5f2f17

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎common/common.cpp

Copy file name to clipboardExpand all lines: common/common.cpp
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,16 +1220,23 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
12201220
throw std::invalid_argument("error: unknown argument: " + arg);
12211221
}
12221222
}
1223+
12231224
if (invalid_param) {
12241225
throw std::invalid_argument("error: invalid parameter for argument: " + arg);
12251226
}
1227+
12261228
if (params.prompt_cache_all &&
12271229
(params.interactive || params.interactive_first ||
12281230
params.instruct)) {
12291231

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

1235+
// short-hand to avoid specifying --hf-file -> default it to --model
1236+
if (!params.hf_repo.empty() && params.hf_file.empty()) {
1237+
params.hf_file = params.model;
1238+
}
1239+
12331240
if (params.escape) {
12341241
process_escapes(params.prompt);
12351242
process_escapes(params.input_prefix);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.