@@ -167,6 +167,24 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
167
167
if (params.n_threads_batch <= 0 ) {
168
168
params.n_threads_batch = std::thread::hardware_concurrency ();
169
169
}
170
+ } else if (arg == " -td" || arg == " --threads-draft" ) {
171
+ if (++i >= argc) {
172
+ invalid_param = true ;
173
+ break ;
174
+ }
175
+ params.n_threads_draft = std::stoi (argv[i]);
176
+ if (params.n_threads_draft <= 0 ) {
177
+ params.n_threads_draft = std::thread::hardware_concurrency ();
178
+ }
179
+ } else if (arg == " -tbd" || arg == " --threads-batch-draft" ) {
180
+ if (++i >= argc) {
181
+ invalid_param = true ;
182
+ break ;
183
+ }
184
+ params.n_threads_batch_draft = std::stoi (argv[i]);
185
+ if (params.n_threads_batch_draft <= 0 ) {
186
+ params.n_threads_batch_draft = std::thread::hardware_concurrency ();
187
+ }
170
188
} else if (arg == " -p" || arg == " --prompt" ) {
171
189
if (++i >= argc) {
172
190
invalid_param = true ;
@@ -845,6 +863,10 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
845
863
printf (" -t N, --threads N number of threads to use during generation (default: %d)\n " , params.n_threads );
846
864
printf (" -tb N, --threads-batch N\n " );
847
865
printf (" number of threads to use during batch and prompt processing (default: same as --threads)\n " );
866
+ printf (" -td N, --threads-draft N" );
867
+ printf (" number of threads to use during generation (default: same as --threads)" );
868
+ printf (" -tbd N, --threads-batch-draft N\n " );
869
+ printf (" number of threads to use during batch and prompt processing (default: same as --threads-draft)\n " );
848
870
printf (" -p PROMPT, --prompt PROMPT\n " );
849
871
printf (" prompt to start generation with (default: empty)\n " );
850
872
printf (" -e, --escape process prompt escapes sequences (\\ n, \\ r, \\ t, \\ ', \\\" , \\\\ )\n " );
0 commit comments