@@ -674,7 +674,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
674674 ));
675675 add_opt (common_arg (
676676 {" --no-context-shift" },
677- string_format (" disables context shift on inifinite text generation (default: %s)" , params.ctx_shift ? " disabled" : " enabled" ),
677+ string_format (" disables context shift on infinite text generation (default: %s)" , params.ctx_shift ? " disabled" : " enabled" ),
678678 [](common_params & params) {
679679 params.ctx_shift = false ;
680680 }
@@ -946,6 +946,13 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
946946 params.sampling .min_p = std::stof (value);
947947 }
948948 ).set_sparam ());
949+ add_opt (common_arg (
950+ {" --top-nsigma" }, " N" ,
951+ string_format (" top-n-sigma sampling (default: %.1f, -1.0 = disabled)" , params.sampling .top_n_sigma ),
952+ [](common_params & params, const std::string & value) {
953+ params.sampling .top_n_sigma = std::stof (value);
954+ }
955+ ).set_examples ({LLAMA_EXAMPLE_MAIN}).set_sparam ());
949956 add_opt (common_arg (
950957 {" --xtc-probability" }, " N" ,
951958 string_format (" xtc probability (default: %.1f, 0.0 = disabled)" , (double )params.sampling .xtc_probability ),
@@ -2324,5 +2331,47 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
23242331 }
23252332 ).set_examples ({LLAMA_EXAMPLE_TTS}));
23262333
2334+ add_opt (common_arg (
2335+ {" --embd-bge-small-en-default" },
2336+ string_format (" use default bge-small-en-v1.5 model (note: can download weights from the internet)" ),
2337+ [](common_params & params) {
2338+ params.hf_repo = " ggml-org/bge-small-en-v1.5-Q8_0-GGUF" ;
2339+ params.hf_file = " bge-small-en-v1.5-q8_0.gguf" ;
2340+ params.pooling_type = LLAMA_POOLING_TYPE_NONE;
2341+ params.embd_normalize = 2 ;
2342+ params.n_ctx = 512 ;
2343+ params.verbose_prompt = true ;
2344+ params.embedding = true ;
2345+ }
2346+ ).set_examples ({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
2347+
2348+ add_opt (common_arg (
2349+ {" --embd-e5-small-en-default" },
2350+ string_format (" use default e5-small-v2 model (note: can download weights from the internet)" ),
2351+ [](common_params & params) {
2352+ params.hf_repo = " ggml-org/e5-small-v2-Q8_0-GGUF" ;
2353+ params.hf_file = " e5-small-v2-q8_0.gguf" ;
2354+ params.pooling_type = LLAMA_POOLING_TYPE_NONE;
2355+ params.embd_normalize = 2 ;
2356+ params.n_ctx = 512 ;
2357+ params.verbose_prompt = true ;
2358+ params.embedding = true ;
2359+ }
2360+ ).set_examples ({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
2361+
2362+ add_opt (common_arg (
2363+ {" --embd-gte-small-default" },
2364+ string_format (" use default gte-small model (note: can download weights from the internet)" ),
2365+ [](common_params & params) {
2366+ params.hf_repo = " ggml-org/gte-small-Q8_0-GGUF" ;
2367+ params.hf_file = " gte-small-q8_0.gguf" ;
2368+ params.pooling_type = LLAMA_POOLING_TYPE_NONE;
2369+ params.embd_normalize = 2 ;
2370+ params.n_ctx = 512 ;
2371+ params.verbose_prompt = true ;
2372+ params.embedding = true ;
2373+ }
2374+ ).set_examples ({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
2375+
23272376 return ctx_arg;
23282377}
0 commit comments