@@ -2430,6 +2430,27 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
24302430 }
24312431 }
24322432 ).set_env (" LLAMA_ARG_N_GPU_LAYERS" ));
2433+ add_opt (common_arg (
2434+ {" --weight-paging" }, " " ,
2435+ " enable NVMe→VRAM demand paging for model weights (allows models larger than VRAM)" ,
2436+ [](common_params & params, const std::string & value) {
2437+ params.weight_paging_enabled = true ;
2438+ }
2439+ ).set_examples ({LLAMA_EXAMPLE_SERVER , LLAMA_EXAMPLE_CLI }).set_env (" LLAMA_ARG_WEIGHT_PAGING" ));
2440+ add_opt (common_arg (
2441+ {" --weight-paging-slots" }, " N" ,
2442+ " number of VRAM slots for weight paging (-1 = auto, default: -1)" ,
2443+ [](common_params & params, const std::string & value) {
2444+ params.weight_paging_slots = std::stoi (value);
2445+ }
2446+ ).set_examples ({LLAMA_EXAMPLE_SERVER , LLAMA_EXAMPLE_CLI }).set_env (" LLAMA_ARG_WEIGHT_PAGING_SLOTS" ));
2447+ add_opt (common_arg (
2448+ {" --weight-paging-prefetch" }, " " ,
2449+ " enable async prefetch of next layer (default: enabled)" ,
2450+ [](common_params & params, const std::string & value) {
2451+ params.weight_paging_prefetch = true ;
2452+ }
2453+ ).set_examples ({LLAMA_EXAMPLE_SERVER , LLAMA_EXAMPLE_CLI }).set_env (" LLAMA_ARG_WEIGHT_PAGING_PREFETCH" ));
24332454 add_opt (common_arg (
24342455 {" -sm" , " --split-mode" }, " {none,layer,row,tensor}" ,
24352456 " how to split the model across multiple GPUs, one of:\n "
0 commit comments