From a315128d66ab4d93bd624f1c49343b4685fad4c7 Mon Sep 17 00:00:00 2001 From: Xiaoyu Kevin Hu Date: Wed, 18 Oct 2023 17:25:25 -0500 Subject: [PATCH] update value check for n_gpu_layers field (#826) --- llama_cpp/server/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama_cpp/server/app.py b/llama_cpp/server/app.py index 18cd47c..3dd0a38 100644 --- a/llama_cpp/server/app.py +++ b/llama_cpp/server/app.py @@ -48,8 +48,8 @@ class Settings(BaseSettings): ) n_gpu_layers: int = Field( default=0, - ge=0, - description="The number of layers to put on the GPU. The rest will be on the CPU.", + ge=-1, + description="The number of layers to put on the GPU. The rest will be on the CPU. Set -1 to move all to GPU.", ) main_gpu: int = Field( default=0,