Skip to content

Commit 2f5feb4

Browse files
authored
Add LowVRAM option parameter (#642)
1 parent 4e3c319 commit 2f5feb4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

api/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ type Config struct {
3535
NGPULayers int `yaml:"gpu_layers"`
3636
MMap bool `yaml:"mmap"`
3737
MMlock bool `yaml:"mmlock"`
38+
LowVRAM bool `yaml:"low_vram"`
3839

3940
TensorSplit string `yaml:"tensor_split"`
4041
MainGPU string `yaml:"main_gpu"`

api/prediction.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func defaultLLamaOpts(c Config) []llama.ModelOption {
4848
llamaOpts = append(llamaOpts, llama.SetNBatch(512))
4949
}
5050

51+
if c.LowVRAM {
52+
llamaOpts = append(llamaOpts, llama.EnabelLowVRAM)
53+
}
54+
5155
return llamaOpts
5256
}
5357

0 commit comments

Comments
 (0)