@@ -1436,6 +1436,14 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
14361436 params.split_mode_graph_scheduling = true ;
14371437 return true ;
14381438 }
1439+ if (arg == " -smf16" || arg == " --split-mode-f16" ) {
1440+ params.split_mode_f16 = true ;
1441+ return true ;
1442+ }
1443+ if (arg == " -smf32" || arg == " --split-mode-f32" ) {
1444+ params.split_mode_f16 = false ;
1445+ return true ;
1446+ }
14391447 if (arg == " --numa" ) {
14401448 CHECK_ARG
14411449 std::string value (argv[i]);
@@ -2122,6 +2130,8 @@ void gpt_params_print_usage(int /*argc*/, char ** argv, const gpt_params & param
21222130 options.push_back ({ " *" , " -ser, --smart-expert-reduction" , " experts reduction (default: %d,%g)" , params.min_experts , params.thresh_experts });
21232131 options.push_back ({ " *" , " -mqkv, --merge-qkv," , " merge Q,K,V (default: %d)" , params.merge_qkv });
21242132 options.push_back ({ " *" , " -khad, --k-cache-hadamard," , " Use Hadamard transform for K-cache (default: %d)" , params.k_cache_hadamard });
2133+ options.push_back ({ " *" , " -smf16, --split-mode-f16," , " Use f16 for data exchange between GPUs (default: %d)" , params.split_mode_f16 });
2134+ options.push_back ({ " *" , " -smf32, --split-mode-f32," , " Use f32 for data exchange between GPUs (default: %d)" , !params.split_mode_f16 });
21252135 options.push_back ({ " *" , " -smgs, --split-mode-graph-scheduling," , " Force Split Mode Graph Scheduling (default: %d)" , params.split_mode_graph_scheduling });
21262136 options.push_back ({ " *" , " -vq, --validate-quants" , " validate quantized data while loading the model (default: %d)" , params.validate_quants });
21272137 options.push_back ({ " *" , " -p, --prompt PROMPT" , " prompt to start generation with\n "
@@ -3156,6 +3166,7 @@ struct llama_context_params llama_context_params_from_gpt_params(const gpt_param
31563166 cparams.graph_reuse = params.graph_reuse ;
31573167 cparams.k_cache_hadamard = params.k_cache_hadamard ;
31583168 cparams.split_mode_graph_scheduling = params.split_mode_graph_scheduling ;
3169+ cparams.split_mode_f16 = params.split_mode_f16 ;
31593170 cparams.min_experts = params.min_experts ;
31603171 cparams.thresh_experts = params.thresh_experts ;
31613172 cparams.only_active_experts = params.only_active_exps ;
@@ -4138,6 +4149,7 @@ void yaml_dump_non_result_info(FILE * stream, const gpt_params & params, const l
41384149 fprintf (stream, " graph_reuse: %s # default: false\n " , params.graph_reuse ? " true" : " false" );
41394150 fprintf (stream, " k_cache_hadamard: %s # default: false\n " , params.k_cache_hadamard ? " true" : " false" );
41404151 fprintf (stream, " split_mode_graph_scheduling: %s # default: false\n " , params.split_mode_graph_scheduling ? " true" : " false" );
4152+ fprintf (stream, " split_mode_f16: %s # default: true\n " , params.split_mode_f16 ? " true" : " false" );
41414153 fprintf (stream, " ser: %d,%g # defaulr: -1,0\n " , params.min_experts , params.thresh_experts );
41424154 fprintf (stream, " temp: %f # default: 0.8\n " , sparams.temp );
41434155
0 commit comments