@@ -435,11 +435,13 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
435
435
return true ;
436
436
}
437
437
if (arg == " --cpu-strict" ) {
438
- params.cpuparams .strict_cpu = true ;
438
+ CHECK_ARG
439
+ params.cpuparams .strict_cpu = std::stoul (argv[i]);
439
440
return true ;
440
441
}
441
442
if (arg == " --poll" ) {
442
- params.cpuparams .poll = true ;
443
+ CHECK_ARG
444
+ params.cpuparams .poll = std::stoul (argv[i]);
443
445
return true ;
444
446
}
445
447
if (arg == " -tb" || arg == " --threads-batch" ) {
@@ -474,7 +476,8 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
474
476
return true ;
475
477
}
476
478
if (arg == " --poll-batch" ) {
477
- params.cpuparams_batch .poll = true ;
479
+ CHECK_ARG
480
+ params.cpuparams_batch .poll = std::stoul (argv[i]);
478
481
return true ;
479
482
}
480
483
if (arg == " -td" || arg == " --threads-draft" ) {
@@ -509,7 +512,8 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
509
512
return true ;
510
513
}
511
514
if (arg == " --poll-draft" ) {
512
- params.draft_cpuparams .poll = true ;
515
+ CHECK_ARG
516
+ params.draft_cpuparams .poll = std::stoul (argv[i]);
513
517
return true ;
514
518
}
515
519
if (arg == " -tbd" || arg == " --threads-batch-draft" ) {
@@ -537,7 +541,8 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
537
541
return true ;
538
542
}
539
543
if (arg == " --poll-batch-draft" ) {
540
- params.draft_cpuparams_batch .poll = true ;
544
+ CHECK_ARG
545
+ params.draft_cpuparams_batch .poll = std::stoul (argv[i]);
541
546
return true ;
542
547
}
543
548
if (arg == " -p" || arg == " --prompt" ) {
@@ -1627,34 +1632,37 @@ void gpt_params_print_usage(int /*argc*/, char ** argv, const gpt_params & param
1627
1632
options.push_back ({ " *" , " -t, --threads N" , " number of threads to use during generation (default: %d)" , params.cpuparams .n_threads });
1628
1633
options.push_back ({ " *" , " -C, --cpu-mask M" , " CPU affinity mask: arbitrarily long hex. Complements cpu-range (default: \"\" )" });
1629
1634
options.push_back ({ " *" , " -Cr, --cpu-range lo-hi" , " range of CPUs for affinity. Complements --cpu-mask" });
1630
- options.push_back ({ " *" , " --cpu-strict" , " use strict CPU placement (default: %u)\n " , (unsigned ) params.cpuparams .strict_cpu });
1635
+ options.push_back ({ " *" , " --cpu-strict <0|1> " , " use strict CPU placement (default: %u)\n " , (unsigned ) params.cpuparams .strict_cpu });
1631
1636
options.push_back ({ " *" , " --priority N" , " set process/thread priority : 0-normal, 1-medium, 2-high, 3-realtime (default: %d)\n " , params.cpuparams .priority });
1632
- options.push_back ({ " *" , " --poll" , " use polling to wait for work (default: %u)\n " , (unsigned ) params.cpuparams .poll });
1637
+ options.push_back ({ " *" , " --poll <0|1> " , " use polling to wait for work (default: %u)\n " , (unsigned ) params.cpuparams .poll });
1633
1638
options.push_back ({ " *" , " -tb, --threads-batch N" , " number of threads to use during batch and prompt processing (default: same as --threads)" });
1634
1639
options.push_back ({ " *" , " -Cb, --cpu-mask-batch M" , " CPU affinity mask: arbitrarily long hex. Complements cpu-range-batch (default: same as --cpu-mask)" });
1635
1640
options.push_back ({ " *" , " -Crb, --cpu-range-batch lo-hi" ,
1636
1641
" ranges of CPUs for affinity. Complements --cpu-mask-batch" });
1637
- options.push_back ({ " *" , " --cpu-strict-batch" , " use strict CPU placement (default: same as --cpu-strict)" });
1642
+ options.push_back ({ " *" , " --cpu-strict-batch <0|1>" ,
1643
+ " use strict CPU placement (default: same as --cpu-strict)" });
1638
1644
options.push_back ({ " *" , " --priority-batch N" , " set process/thread priority : 0-normal, 1-medium, 2-high, 3-realtime (default: --priority)" });
1639
- options.push_back ({ " *" , " --poll-batch" , " use polling to wait for work (default: --poll) " });
1645
+ options.push_back ({ " *" , " --poll-batch <0|1> " , " use polling to wait for work (default: same as --poll" });
1640
1646
options.push_back ({ " speculative" , " -td, --threads-draft N" , " number of threads to use during generation (default: same as --threads)" });
1641
1647
options.push_back ({ " speculative" , " -Cd, --cpu-mask-draft M" , " Draft model CPU affinity mask. Complements cpu-range-draft (default: same as --cpu-mask)" });
1642
1648
options.push_back ({ " speculative" , " -Crd, --cpu-range-draft lo-hi" ,
1643
1649
" Ranges of CPUs for affinity. Complements --cpu-mask-draft" });
1644
- options.push_back ({ " speculative" , " --cpu-strict-draft" , " Use strict CPU placement for draft model (default: same as --cpu-strict)" });
1650
+ options.push_back ({ " speculative" , " --cpu-strict-draft <0|1>" ,
1651
+ " Use strict CPU placement for draft model (default: same as --cpu-strict)" });
1645
1652
options.push_back ({ " speculative" , " --priority-draft N" , " Set draft process/thread priority : 0-normal, 1-medium, 2-high, 3-realtime (default: same as --priority)" });
1646
- options.push_back ({ " speculative" , " --poll-draft" , " Use polling to wait for draft model work (default: same as --poll])" });
1653
+ options.push_back ({ " speculative" , " --poll-draft <0|1> " , " Use polling to wait for draft model work (default: same as --poll])" });
1647
1654
options.push_back ({ " speculative" , " -tbd, --threads-batch-draft N" ,
1648
1655
" number of threads to use during batch and prompt processing (default: same as --threads-draft)" });
1649
1656
options.push_back ({ " speculative" , " -Cbd, --cpu-mask-batch-draft M" ,
1650
1657
" Draft model CPU affinity mask. Complements cpu-range-draft-batch (default: same as --cpu-mask-draft)" });
1651
1658
options.push_back ({ " speculative" , " -Crbd, --cpu-range-batch-draft lo-hi" ,
1652
1659
" Ranges of CPUs for affinity. Complements --cpu-mask-draft-batch)" });
1653
- options.push_back ({ " speculative" , " --cpu-strict-batch-draft" ,
1660
+ options.push_back ({ " speculative" , " --cpu-strict-batch-draft <0|1> " ,
1654
1661
" Use strict CPU placement for draft model (default: --cpu-strict-draft)" });
1655
1662
options.push_back ({ " speculative" , " --priority-batch-draft N" ,
1656
1663
" Set draft process/thread priority : 0-normal, 1-medium, 2-high, 3-realtime (default: --priority-draft)" });
1657
- options.push_back ({ " speculative" , " --poll-batch-draft" , " Use polling to wait for draft model work (default: --poll-draft)" });
1664
+ options.push_back ({ " speculative" , " --poll-batch-draft <0|1>" ,
1665
+ " Use polling to wait for draft model work (default: --poll-draft)" });
1658
1666
1659
1667
options.push_back ({ " speculative" , " --draft N" , " number of tokens to draft for speculative decoding (default: %d)" , params.n_draft });
1660
1668
options.push_back ({ " speculative" , " -ps, --p-split N" , " speculative decoding split probability (default: %.1f)" , (double )params.p_split });
0 commit comments