From 3d75b8576eec75ab5da3fbb51d196fe46bc265d2 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Wed, 15 Jan 2025 10:48:19 +0400 Subject: [PATCH] add api llama_model_set_n_gpu_layers --- include/llama.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llama.h b/include/llama.h index ce968cc7..fc2e52b1 100644 --- a/include/llama.h +++ b/include/llama.h @@ -525,6 +525,10 @@ extern "C" { // Returns the number of model layers in the model LLAMA_API uint32_t llama_model_n_layers(const struct llama_model * model); + // Retrieve or set the number of GPU layers + LLAMA_API uint32_t llama_model_n_gpu_layers(const struct llama_model * model); + LLAMA_API void llama_model_set_n_gpu_layers(struct llama_model * model, uint32_t value); + // Returns the total number of parameters in the model LLAMA_API uint64_t llama_model_n_params(const struct llama_model * model);