use -1 for auto

This commit is contained in:
Ruben Ortlam
2026-07-28 11:43:20 +02:00
parent b0bb2b088f
commit 848ac71e75

View File

@@ -203,12 +203,12 @@ extern "C" {
};
enum llama_load_mode {
LLAMA_LOAD_MODE_AUTO = 0, // auto-detect based on device capabilities
LLAMA_LOAD_MODE_NONE = 1, // no special loading mode
LLAMA_LOAD_MODE_MMAP = 2, // memory map the model
LLAMA_LOAD_MODE_MLOCK = 3, // force system to keep model in RAM rather than swapping or compressing
LLAMA_LOAD_MODE_MMAP_MLOCK = 4, // mmap + force system to keep model in RAM rather than swapping or compressing
LLAMA_LOAD_MODE_DIRECT_IO = 5, // use direct I/O if available
LLAMA_LOAD_MODE_AUTO = -1, // auto-detect based on device capabilities
LLAMA_LOAD_MODE_NONE = 0, // no special loading mode
LLAMA_LOAD_MODE_MMAP = 1, // memory map the model
LLAMA_LOAD_MODE_MLOCK = 2, // force system to keep model in RAM rather than swapping or compressing
LLAMA_LOAD_MODE_MMAP_MLOCK = 3, // mmap + force system to keep model in RAM rather than swapping or compressing
LLAMA_LOAD_MODE_DIRECT_IO = 4, // use direct I/O if available
};
LLAMA_API const char * llama_load_mode_name(enum llama_load_mode load_mode);