Add LowVRAM option parameter (#642)

renovate/github.com-imdario-mergo-1.x v1.19.2
Ettore Di Giacinto 2 years ago committed by GitHub
parent 4e3c319e83
commit 2f5feb4841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      api/config.go
  2. 4
      api/prediction.go

@ -35,6 +35,7 @@ type Config struct {
NGPULayers int `yaml:"gpu_layers"`
MMap bool `yaml:"mmap"`
MMlock bool `yaml:"mmlock"`
LowVRAM bool `yaml:"low_vram"`
TensorSplit string `yaml:"tensor_split"`
MainGPU string `yaml:"main_gpu"`

@ -48,6 +48,10 @@ func defaultLLamaOpts(c Config) []llama.ModelOption {
llamaOpts = append(llamaOpts, llama.SetNBatch(512))
}
if c.LowVRAM {
llamaOpts = append(llamaOpts, llama.EnabelLowVRAM)
}
return llamaOpts
}

Loading…
Cancel
Save