Skip to content

Commit

Permalink
fix(llama.cpp-ggml): fixup max_tokens for old backend (mudler#2094)
Browse files Browse the repository at this point in the history
fix(llama.cpp-ggml): set 0 as default for `max_tokens`

Signed-off-by: Ettore Di Giacinto <[email protected]>
  • Loading branch information
mudler authored Apr 21, 2024
1 parent 284ad02 commit 180cd4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/config/backend_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
defaultMirostatETA := 0.1
defaultTypicalP := 1.0
defaultTFZ := 1.0
defaultInfinity := -1
defaultZero := 0

// Try to offload all GPU layers (if GPU is found)
defaultHigh := 99999999
Expand Down Expand Up @@ -254,7 +254,7 @@ func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
}

if cfg.Maxtokens == nil {
cfg.Maxtokens = &defaultInfinity
cfg.Maxtokens = &defaultZero
}

if cfg.Mirostat == nil {
Expand Down

0 comments on commit 180cd4c

Please sign in to comment.