mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
fix(llama.cpp): set -1 as default for max tokens (#2087)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
03adc1f60d
commit
afa1bca1e3
1 changed files with 4 additions and 4 deletions
|
@ -205,15 +205,15 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
|
||||||
defaultTopP := 0.95
|
defaultTopP := 0.95
|
||||||
defaultTopK := 40
|
defaultTopK := 40
|
||||||
defaultTemp := 0.9
|
defaultTemp := 0.9
|
||||||
defaultMaxTokens := 2048
|
|
||||||
defaultMirostat := 2
|
defaultMirostat := 2
|
||||||
defaultMirostatTAU := 5.0
|
defaultMirostatTAU := 5.0
|
||||||
defaultMirostatETA := 0.1
|
defaultMirostatETA := 0.1
|
||||||
defaultTypicalP := 1.0
|
defaultTypicalP := 1.0
|
||||||
defaultTFZ := 1.0
|
defaultTFZ := 1.0
|
||||||
|
defaultInfinity := -1
|
||||||
|
|
||||||
// Try to offload all GPU layers (if GPU is found)
|
// Try to offload all GPU layers (if GPU is found)
|
||||||
defaultNGPULayers := 99999999
|
defaultHigh := 99999999
|
||||||
|
|
||||||
trueV := true
|
trueV := true
|
||||||
falseV := false
|
falseV := false
|
||||||
|
@ -254,7 +254,7 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.Maxtokens == nil {
|
if cfg.Maxtokens == nil {
|
||||||
cfg.Maxtokens = &defaultMaxTokens
|
cfg.Maxtokens = &defaultInfinity
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.Mirostat == nil {
|
if cfg.Mirostat == nil {
|
||||||
|
@ -269,7 +269,7 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
|
||||||
cfg.MirostatTAU = &defaultMirostatTAU
|
cfg.MirostatTAU = &defaultMirostatTAU
|
||||||
}
|
}
|
||||||
if cfg.NGPULayers == nil {
|
if cfg.NGPULayers == nil {
|
||||||
cfg.NGPULayers = &defaultNGPULayers
|
cfg.NGPULayers = &defaultHigh
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.LowVRAM == nil {
|
if cfg.LowVRAM == nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue