mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-10 03:24:35 +00:00
add metal mem limit
This commit is contained in:
parent
33429ec4e1
commit
78a544d716
5 changed files with 102 additions and 67 deletions
|
@ -731,10 +731,10 @@ gpt_params_context gpt_params_parser_init(gpt_params & params, llama_example ex,
|
|||
}
|
||||
).set_env("LLAMA_ARG_UNLOAD"));
|
||||
add_opt(llama_arg(
|
||||
{"-cm", "--cuda-mem"}, "N",
|
||||
format("maximum cuda memory to use (default: %d)", params.cuda_mem),
|
||||
{"-gm", "--gpu-mem"}, "N",
|
||||
format("maximum GPU memory to use (default: %d)", params.gpu_mem),
|
||||
[](gpt_params & params, int value) {
|
||||
params.cuda_mem = value; // in GiB
|
||||
params.gpu_mem = value; // in GiB
|
||||
}
|
||||
).set_env("LLAMA_ARG_CUDA_MEM"));
|
||||
#ifdef GGML_USE_METAL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue