Skip to content

Commit a315128

Browse files
authored
update value check for n_gpu_layers field (#826)
1 parent d989ac8 commit a315128

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/server/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class Settings(BaseSettings):
4848
)
4949
n_gpu_layers: int = Field(
5050
default=0,
51-
ge=0,
52-
description="The number of layers to put on the GPU. The rest will be on the CPU.",
51+
ge=-1,
52+
description="The number of layers to put on the GPU. The rest will be on the CPU. Set -1 to move all to GPU.",
5353
)
5454
main_gpu: int = Field(
5555
default=0,

0 commit comments

Comments
 (0)