mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-13 02:10:39 +02:00
no host by default
This commit is contained in:
@@ -51,6 +51,7 @@ struct load_model_inputs
|
||||
const int visionmaxtokens = -1;
|
||||
const bool use_mmap = false;
|
||||
const bool use_mlock = false;
|
||||
const bool no_host = false;
|
||||
const bool use_mtp = false;
|
||||
const bool use_smartcontext = false;
|
||||
const bool use_contextshift = false;
|
||||
|
||||
@@ -3231,6 +3231,7 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in
|
||||
}
|
||||
model_params.load_mode = inputs.use_mlock ? LLAMA_LOAD_MODE_MLOCK : (inputs.use_mmap ? LLAMA_LOAD_MODE_MMAP : LLAMA_LOAD_MODE_NONE);
|
||||
model_params.n_gpu_layers = inputs.gpulayers;
|
||||
model_params.no_host = inputs.no_host;
|
||||
kcpp_permit_any_repack = (inputs.use_mmap?false:true);
|
||||
|
||||
//set device overrides if needed
|
||||
|
||||
@@ -273,6 +273,7 @@ class load_model_inputs(ctypes.Structure):
|
||||
("visionmaxtokens", ctypes.c_int),
|
||||
("use_mmap", ctypes.c_bool),
|
||||
("use_mlock", ctypes.c_bool),
|
||||
("no_host", ctypes.c_bool),
|
||||
("use_mtp", ctypes.c_bool),
|
||||
("use_smartcontext", ctypes.c_bool),
|
||||
("use_contextshift", ctypes.c_bool),
|
||||
@@ -1969,6 +1970,7 @@ def load_model(model_filename):
|
||||
inputs.blasthreads = args.blasthreads
|
||||
inputs.use_mmap = args.usemmap
|
||||
inputs.use_mlock = args.usemlock
|
||||
inputs.no_host = True
|
||||
inputs.use_mtp = args.usemtp
|
||||
inputs.lora_filename = "".encode("UTF-8")
|
||||
inputs.lora_multiplier = args.loramult
|
||||
|
||||
Reference in New Issue
Block a user