mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 20:05:20 +00:00
arg : add env var to control mmproj (#13416)
* arg : add env var to control mmproj * small note about -hf --mmproj
This commit is contained in:
@ -2204,32 +2204,33 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
|
|||||||
).set_examples({LLAMA_EXAMPLE_SERVER}).set_env("LLAMA_ARG_NO_CONT_BATCHING"));
|
).set_examples({LLAMA_EXAMPLE_SERVER}).set_env("LLAMA_ARG_NO_CONT_BATCHING"));
|
||||||
add_opt(common_arg(
|
add_opt(common_arg(
|
||||||
{"--mmproj"}, "FILE",
|
{"--mmproj"}, "FILE",
|
||||||
"path to a multimodal projector file. see tools/mtmd/README.md",
|
"path to a multimodal projector file. see tools/mtmd/README.md\n"
|
||||||
|
"note: if -hf is used, this argument can be omitted",
|
||||||
[](common_params & params, const std::string & value) {
|
[](common_params & params, const std::string & value) {
|
||||||
params.mmproj.path = value;
|
params.mmproj.path = value;
|
||||||
}
|
}
|
||||||
).set_examples(mmproj_examples));
|
).set_examples(mmproj_examples).set_env("LLAMA_ARG_MMPROJ"));
|
||||||
add_opt(common_arg(
|
add_opt(common_arg(
|
||||||
{"--mmproj-url"}, "URL",
|
{"--mmproj-url"}, "URL",
|
||||||
"URL to a multimodal projector file. see tools/mtmd/README.md",
|
"URL to a multimodal projector file. see tools/mtmd/README.md",
|
||||||
[](common_params & params, const std::string & value) {
|
[](common_params & params, const std::string & value) {
|
||||||
params.mmproj.url = value;
|
params.mmproj.url = value;
|
||||||
}
|
}
|
||||||
).set_examples(mmproj_examples));
|
).set_examples(mmproj_examples).set_env("LLAMA_ARG_MMPROJ_URL"));
|
||||||
add_opt(common_arg(
|
add_opt(common_arg(
|
||||||
{"--no-mmproj"},
|
{"--no-mmproj"},
|
||||||
"explicitly disable multimodal projector, useful when using -hf",
|
"explicitly disable multimodal projector, useful when using -hf",
|
||||||
[](common_params & params) {
|
[](common_params & params) {
|
||||||
params.no_mmproj = true;
|
params.no_mmproj = true;
|
||||||
}
|
}
|
||||||
).set_examples(mmproj_examples));
|
).set_examples(mmproj_examples).set_env("LLAMA_ARG_NO_MMPROJ"));
|
||||||
add_opt(common_arg(
|
add_opt(common_arg(
|
||||||
{"--no-mmproj-offload"},
|
{"--no-mmproj-offload"},
|
||||||
"do not offload multimodal projector to GPU",
|
"do not offload multimodal projector to GPU",
|
||||||
[](common_params & params) {
|
[](common_params & params) {
|
||||||
params.mmproj_use_gpu = false;
|
params.mmproj_use_gpu = false;
|
||||||
}
|
}
|
||||||
).set_examples(mmproj_examples));
|
).set_examples(mmproj_examples).set_env("LLAMA_ARG_NO_MMPROJ_OFFLOAD"));
|
||||||
add_opt(common_arg(
|
add_opt(common_arg(
|
||||||
{"--image"}, "FILE",
|
{"--image"}, "FILE",
|
||||||
"path to an image file. use with multimodal models. Specify multiple times for batching",
|
"path to an image file. use with multimodal models. Specify multiple times for batching",
|
||||||
|
Reference in New Issue
Block a user