Skip to content

Commit 9104bc2

Browse files
committed
common : add --no-cont-batching arg (#6358)
1 parent fc690b0 commit 9104bc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/common.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
797797
params.cont_batching = true;
798798
return true;
799799
}
800+
if (arg == "-nocb" || arg == "--no-cont-batching") {
801+
params.cont_batching = false;
802+
return true;
803+
}
800804
if (arg == "-fa" || arg == "--flash-attn") {
801805
params.flash_attn = true;
802806
return true;
@@ -1538,6 +1542,7 @@ void gpt_params_print_usage(int /*argc*/, char ** argv, const gpt_params & param
15381542
options.push_back({ "*", "-np, --parallel N", "number of parallel sequences to decode (default: %d)", params.n_parallel });
15391543
options.push_back({ "*", "-ns, --sequences N", "number of sequences to decode (default: %d)", params.n_sequences });
15401544
options.push_back({ "*", "-cb, --cont-batching", "enable continuous batching (a.k.a dynamic batching) (default: %s)", params.cont_batching ? "enabled" : "disabled" });
1545+
options.push_back({ "*", "-nocb, --no-cont-batching", "disable continuous batching" });
15411546

15421547
options.push_back({ "multi-modality" });
15431548
options.push_back({ "*", " --mmproj FILE", "path to a multimodal projector file for LLaVA. see examples/llava/README.md" });

0 commit comments

Comments
 (0)