mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 00:45:58 +08:00
Fix/4742 ollama num gpu option not consistent with allowed values (#4751)
This commit is contained in:
parent
f4a240d225
commit
705a6e3a8e
@ -534,12 +534,14 @@ class OllamaLargeLanguageModel(LargeLanguageModel):
|
|||||||
),
|
),
|
||||||
ParameterRule(
|
ParameterRule(
|
||||||
name='num_gpu',
|
name='num_gpu',
|
||||||
label=I18nObject(en_US="Num GPU"),
|
label=I18nObject(en_US="GPU Layers"),
|
||||||
type=ParameterType.INT,
|
type=ParameterType.INT,
|
||||||
help=I18nObject(en_US="The number of layers to send to the GPU(s). "
|
help=I18nObject(en_US="The number of layers to offload to the GPU(s). "
|
||||||
"On macOS it defaults to 1 to enable metal support, 0 to disable."),
|
"On macOS it defaults to 1 to enable metal support, 0 to disable."
|
||||||
min=0,
|
"As long as a model fits into one gpu it stays in one. "
|
||||||
max=1
|
"It does not set the number of GPU(s). "),
|
||||||
|
min=-1,
|
||||||
|
default=1
|
||||||
),
|
),
|
||||||
ParameterRule(
|
ParameterRule(
|
||||||
name='num_thread',
|
name='num_thread',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user