Skip to content

Commit 427bcfd

Browse files
danbevdsx1986
authored andcommitted
arg : fix typo in embeddings argument help [no ci] (ggml-org#9994)
This commit fixes two typos in the help text for the `--embd-normalize` and `--embd-separator` arguments. It also updates common.h which contain the same typo in two comments.
1 parent 18b2f3c commit 427bcfd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

common/arg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
16951695
).set_examples({LLAMA_EXAMPLE_BENCH}));
16961696
add_opt(common_arg(
16971697
{"--embd-normalize"}, "N",
1698-
string_format("normalisation for embendings (default: %d) (-1=none, 0=max absolute int16, 1=taxicab, 2=euclidean, >2=p-norm)", params.embd_normalize),
1698+
string_format("normalisation for embeddings (default: %d) (-1=none, 0=max absolute int16, 1=taxicab, 2=euclidean, >2=p-norm)", params.embd_normalize),
16991699
[](common_params & params, int value) {
17001700
params.embd_normalize = value;
17011701
}
@@ -1709,7 +1709,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
17091709
).set_examples({LLAMA_EXAMPLE_EMBEDDING}));
17101710
add_opt(common_arg(
17111711
{"--embd-separator"}, "STRING",
1712-
"separator of embendings (default \\n) for example \"<#sep#>\"",
1712+
"separator of embeddings (default \\n) for example \"<#sep#>\"",
17131713
[](common_params & params, const std::string & value) {
17141714
params.embd_sep = value;
17151715
}

common/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ struct common_params {
274274

275275
// embedding
276276
bool embedding = false; // get only sentence embedding
277-
int32_t embd_normalize = 2; // normalisation for embendings (-1=none, 0=max absolute int16, 1=taxicab, 2=euclidean, >2=p-norm)
277+
int32_t embd_normalize = 2; // normalisation for embeddings (-1=none, 0=max absolute int16, 1=taxicab, 2=euclidean, >2=p-norm)
278278
std::string embd_out = ""; // empty = default, "array" = [[],[]...], "json" = openai style, "json+" = same "json" + cosine similarity matrix
279-
std::string embd_sep = "\n"; // separator of embendings
279+
std::string embd_sep = "\n"; // separator of embeddings
280280
bool reranking = false; // enable reranking support on server
281281

282282
// server params

0 commit comments

Comments
 (0)