@@ -515,7 +515,14 @@ bool common_params_handle_models(common_params & params, llama_example curr_ex)
515515 opts.skip_download = params.skip_download ;
516516 opts.download_mtp = spec_type_draft_mtp;
517517 opts.download_dflash = spec_type_dflash;
518- opts.download_mmproj = !params.no_mmproj ;
518+ opts.download_mmproj = !params.no_mmproj && params.mmproj .path .empty () && params.mmproj .url .empty ();
519+
520+ // sub-models (draft, mmproj, vocoder) are explicitly specified by the user,
521+ // so we should not auto-discover mtp/mmproj/dflash siblings for them
522+ common_download_opts sub_opts = opts;
523+ sub_opts.download_mtp = false ;
524+ sub_opts.download_mmproj = false ;
525+ sub_opts.download_dflash = false ;
519526
520527 try {
521528 auto res = common_params_handle_model (params.model , opts);
@@ -528,7 +535,7 @@ bool common_params_handle_models(common_params & params, llama_example curr_ex)
528535 // only download mmproj if the current example is using it
529536 for (const auto & ex : mmproj_examples) {
530537 if (curr_ex == ex) {
531- common_params_handle_model (params.mmproj , opts );
538+ common_params_handle_model (params.mmproj , sub_opts );
532539 break ;
533540 }
534541 }
@@ -547,8 +554,8 @@ bool common_params_handle_models(common_params & params, llama_example curr_ex)
547554 params.speculative .draft .mparams .url .empty ()) {
548555 params.speculative .draft .mparams .path = res.dflash .path ;
549556 }
550- common_params_handle_model (params.speculative .draft .mparams , opts );
551- common_params_handle_model (params.vocoder .model , opts );
557+ common_params_handle_model (params.speculative .draft .mparams , sub_opts );
558+ common_params_handle_model (params.vocoder .model , sub_opts );
552559 return true ;
553560 } catch (const common_skip_download_exception &) {
554561 return false ;
@@ -1578,7 +1585,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
15781585 add_opt (common_arg (
15791586 {" --cache-idle-slots" },
15801587 {" --no-cache-idle-slots" },
1581- " save and clear idle slots on new task (default: enabled, requires unified KV and cache-ram)" ,
1588+ " save idle slots to the prompt cache on new task, and clear them when using unified KV (default: enabled, requires cache-ram)" ,
15821589 [](common_params & params, bool value) {
15831590 params.cache_idle_slots = value;
15841591 }
@@ -1840,7 +1847,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
18401847 string_format (" samplers that will be used for generation in the order, separated by \' ;\'\n (default: %s)" , sampler_type_names.c_str ()),
18411848 [](common_params & params, const std::string & value) {
18421849 const auto sampler_names = string_split<std::string>(value, ' ;' );
1843- params.sampling .samplers = common_sampler_types_from_names (sampler_names, true );
1850+ params.sampling .samplers = common_sampler_types_from_names (sampler_names);
18441851 params.sampling .user_sampling_config |= common_params_sampling_config::COMMON_PARAMS_SAMPLING_CONFIG_SAMPLERS ;
18451852 }
18461853 ).set_sampling ());
@@ -2454,8 +2461,8 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
24542461 }
24552462 ).set_examples ({LLAMA_EXAMPLE_SERVER }));
24562463 add_opt (common_arg (
2457- {" --image" , " --audio" }, " FILE" ,
2458- " path to an image or audio file. use with multimodal models, use comma-separated values for multiple files\n " ,
2464+ {" --image" , " --audio" , " --video " }, " FILE" ,
2465+ " path to an image, audio, or video file. use with multimodal models, use comma-separated values for multiple files\n " ,
24592466 [](common_params & params, const std::string & value) {
24602467 for (const auto & item : parse_csv_row (value)) {
24612468 params.image .emplace_back (item);
@@ -3616,6 +3623,13 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
36163623 common_log_set_file (common_log_main (), value.c_str ());
36173624 }
36183625 ).set_env (" LLAMA_ARG_LOG_FILE" ));
3626+ add_opt (common_arg (
3627+ {" --log-prompts-dir" }, " PATH" ,
3628+ " Log prompts to directory (only used for debugging, default: disabled)" ,
3629+ [](common_params & params, const std::string & value) {
3630+ params.path_prompts_log_dir = value;
3631+ }
3632+ ).set_examples ({LLAMA_EXAMPLE_SERVER , LLAMA_EXAMPLE_CLI }));
36193633 add_opt (common_arg (
36203634 {" --log-colors" }, " [on|off|auto]" ,
36213635 " Set colored logging ('on', 'off', or 'auto', default: 'auto')\n "
0 commit comments